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

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] MIDI files contain strange byte sequences ?
From: Pedro Lopez-Cabanillas (plcl_AT_telefonica.net)
Date: Sun Aug 10 2003 - 02:09:43 EEST


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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sun Aug 10 2003 - 02:19:48 EEST