MIDI running status


I figured it was about time to stick a bit of MIDI inside some new plugins. I’ve managed to read sensible MIDI data in the MidiMessage class, but a question comes to mind. Running Status is the feature in which messages without an Command/Channel status byte are interpreted to be the same sort of command as the previously-received command.

Is that handled in the innards of Juce, with Juce prepending the appropriate status byte to the MidiMessage? Or will I need to parse for that situation?

Thanks much for any response.


A MidiMessage object can only hold a complete message with a correct initial byte, so I wouldn’t worry about that. (But do let me know if you get any problems with partial messages!)


Thanks for the quick response Jules. I may not have expressed myself completely. Running Status is a clear and permissible part of the MIDI spec, designed in to maximize available bandwidth. For example, take a sequence of bytes: B1 07 22 08 20 09 03. This is actually a sequence of three controller messages on channel 1. The first three bytes (B1 07 22) are easily parseable. Then there comes the part of the sequence without bit #7 set (08 20 09 03). Because of Running Status, the initial B1 is sticky, and we treat that 4-byte sequence as this: B1 08 20 B1 09 03.

My post was to find out if you’re dealing with running status internally, so that MidiMessages would be created from the 08 20 09 02 part of the sequence (rather than simply throwing the data on the floor.

Many thanks.


Yes, I know what it is! I guess I wasn’t very clear in my answer. Yes, any implicit bytes will be taken care of before it gets as far as being put into MidiMessage. (Like I said, it’s not actually possible to create a MidiMessage from data that has a missing status byte, so you can safely assume that it must have been handled)


Thank you very much! I appreciate the clarification.