A doubt about midi files

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

Post Reply
mark_c
BCBJ Master
BCBJ Master
Posts: 244
Joined: Thu Jun 21, 2012 1:13 am

A doubt about midi files

Post by mark_c »

Hello,
but, isn't it strange that to play a "type 1" midi file you have to do all this work?
1) calculate abs-time of each track
2) reorder the events by abs-time
3) recalculate the delta times in respect of the original time

invented example not working:

ch, note, velocity, delta-time, abs-time
track1
90,3c, 100,50,50
90,4c, 100,50,100
80,3c, 100,50,150
track2
90,3c, 100,30,30
90,4c, 100,30,60
80,3c, 100,30,90

sort
90,3c, 100,30,30
90,3c, 100,50,50
90,4c, 100,30,60
80,3c, 100,30,90
90,4c, 100,50,100
80,3c, 100,50,150

now the delta times must be recalculated according to the total original time
HsiaLin
BCBJ Master
BCBJ Master
Posts: 332
Joined: Sun Jul 08, 2007 6:29 pm

Re: A doubt about midi files

Post by HsiaLin »

I know nothing about midi but you might find this interesting.
Attachments
midi-2011.zip
(40.53 KiB) Downloaded 354 times
Post Reply