[sdiy] MIDI running status implementation - status bytes

Neil Johnson neil.johnson71 at gmail.com
Fri Jan 31 14:32:44 CET 2014


> I don't see see any ambiguity. The status byte (8x-Ex) always comes
> with a channel. Any data bytes belong to the last received status.
> What I've done in a MIDI project I'm working on is to sort of decouple
> the status and data byte logic. Reception of a status byte (8x-Ex)
> just sets a "current status" variable (and resets the data byte
> counter) and does nothing else. Reception of two consecutive data
> bytes triggers a command execution assuming that the "current status"
> contains a cupported message and is on a valid channel.

Umm, not all messages have two data bytes.  Program Change and Channel
AT have only one data byte.

I wrote a general-purpose MIDI bytestream parser a while ago which I
believe correctly handles running status:



More information about the Synth-diy mailing list