[linux-audio-dev] MIDI files contain strange byte sequences ?

Pedro Lopez-Cabanillas plcl at telefonica.net
Sat Aug 9 19:23:01 UTC 2003


El Sábado, 9 de Agosto de 2003 18:00, Benno Senoner escribió:
> Basically I read the  MTrk shown below and after the
> ff 01 TEXT meta event which contains the text 'Reset Volume'
> there are sequences of 00 07 7f till the next ff 01 text event
> 'Reset Pan'.
> But the midi file spec says that after each event (the Reset Volume text)
> you need to read the deltatime (0 in this case) and then read the status
> byte in that case 7 means running status active thus another
> text event should follow.
> so you interpret ff 7 as META_CUE event of length 127.
> But this does not make sense since there are no 127 bytes following.
> That way the midi reader gets lost and aborts.

IIRC, sysex events and meta-events cancel any running status which was in 
effect. Running status does not apply to and may not be used for these 
messages. 

If the above rule was applied, you can't assume 0xff as a running status byte  
and use it for the next messages after the text meta-event, but in this case 
there is not a status byte for them. If the rule was half-applied, then may 
be a running status of 0xb1 from the message preceding the meta-event, which 
makes sense because the text says 'Reset Volume' and 07 is the volume 
controller number.

Regards,
Pedro

-- 
ALSA Library Bindings for Pascal
http://alsapas.alturl.com




More information about the Linux-audio-dev mailing list