How to calculate the temporary length of a midi file

I read midi files in as3 (flash cs5) using a useful library called midas ( http://code.google.com/p/midas3/ ) - the midi-as3 library.

I am trying to figure out a simple way to calculate the entire duration of a midi file (e.g. total time 4 minutes or 6 minutes ...). I suppose I can calculate the last note of each track + check the tempo and figure it out, but I was wondering if:

Is the duration of a midi file written somewhere in data that I could just pull out and use?

or

Is there an easy way to calculate it without skipping the whole file and compare the latest notes / tempo.

+3
source share
1 answer

, , . MIDI , .

Edit: , " " MIDI . MIDI , IFF. , , , ( !), .

+4

All Articles