Günter Nagler
08-20-2003, 08:26 AM
Max M wrote:
>
> 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?
in a running status you are missing only the status byte (0x80 - 0xEF),
but the time varlen must be there e.g. can be 0 if no pause till next
event.
So you don't need to distinguish between data and time they are occuring
alternating, starting with time.
Günter
>
> 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?
in a running status you are missing only the status byte (0x80 - 0xEF),
but the time varlen must be there e.g. can be 0 if no pause till next
event.
So you don't need to distinguish between data and time they are occuring
alternating, starting with time.
Günter