PDA

View Full Version : parsing midi file - How to separate running data from next time varlen?


Max M
08-20-2003, 05:51 AM
I am writing a parser for midi files.

Due to running status you have to take care that there might be more
than one set of data after a status byte.

But how do you tell the difference between a running data byte and the
next varlen time event?


regards max M

midiprog2000
08-23-2003, 06:38 AM
Hi Max,

Even in case of running status there will be a delta time (varlen time as you called it) in between the two messages. If there is no status byte after the delta time value (the first byte after the delta time value is smaller then &h7F), then running status has to be applied. Therefore, the last status byte you received has to be remembered (stored in a variable).

Kind regards,
Alain
www.mididesign.be