The way we handle Running Status is ugly and probably buggy. For example, if a corrupt stream starts with channel event without a status byte (MSB not set), then whatever initial state stored in MidiEventFactory::previousChannelEventCode is used. We need to store a state which tells whether MidiEventFactory::previousChannelEventCode is initialized by a previous full midi channel event. Also, by storing an "is-initialized state", we can detect errors in the MIDI file. Running Status is reset by System Common messages ( but not Real Time Category messages). Hence, a channel event without a status byte right after a common message is an error.
The way we handle Running Status is ugly and probably buggy. For example, if a corrupt stream starts with channel event without a status byte (MSB not set), then whatever initial state stored in
MidiEventFactory::previousChannelEventCodeis used. We need to store a state which tells whetherMidiEventFactory::previousChannelEventCodeis initialized by a previous full midi channel event. Also, by storing an "is-initialized state", we can detect errors in the MIDI file. Running Status is reset by System Common messages ( but not Real Time Category messages). Hence, a channel event without a status byte right after a common message is an error.