std :: audio::midi
Struct std::MidiParser
struct MidiParser {
unsigned char running;
unsigned char msg[3];
int have;
int need;
struct MidiMsg last;
[]unsigned char sysex;
unsigned long sysex_len;
int in_sysex;
int sysex_overflow;
}A byte-stream parser: running status, real-time bytes interleaved with other messages, sysex reassembly into a caller-owned buffer. Allocation- free; safe on a real-time thread.
Fields
current running status (0 = none)
bytes in msg
bytes msg needs
the last complete short message
sysex buffer (empty: sysex dropped)
Methods
'sysex_buf' receives reassembled sysex messages (F0 .. F7); pass an empty slice to drop them.
One byte in; MIDI_PARSE_*.
The last complete sysex (after MIDI_PARSE_SYSEX): sysex[0..sysex_len].