A doubt about midi files

This is the forum for miscellaneous technical/programming questions.

Moderator: 2ffat

A doubt about midi files

Postby mark_c » Thu Jul 09, 2020 12:20 am

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
mark_c
BCBJ Master
BCBJ Master
 
Posts: 243
Joined: Thu Jun 21, 2012 1:13 am

Re: A doubt about midi files

Postby HsiaLin » Sat Jul 11, 2020 6:12 pm

I know nothing about midi but you might find this interesting.
Attachments
midi-2011.zip
(40.53 KiB) Downloaded 175 times
HsiaLin
BCBJ Master
BCBJ Master
 
Posts: 326
Joined: Sun Jul 08, 2007 6:29 pm


Return to Technical

Who is online

Users browsing this forum: No registered users and 24 guests