Expand description
Canonical MIDI 1.0 message model + a zero-alloc streaming parser with running status.
MidiMessage is the Copy enum every other lane reconciles to. It covers
the channel-voice messages, system-common, and system-real-time messages.
SysEx payloads are variable-length and are not carried in this Copy enum;
the streaming parser consumes SysEx bytes (emitting nothing) so a stream that
interleaves SysEx still yields the surrounding channel messages correctly.
Use crate::midi::message::sysex to frame/unframe SysEx over buffers.
MessageParser is a byte-at-a-time state machine. It carries running
status (a data byte with no preceding status re-uses the last channel-voice
status), decodes system-real-time bytes that are interleaved mid-message
without disturbing running status, and never allocates.
Structs§
- Message
Parser - A zero-alloc, byte-at-a-time MIDI 1.0 stream parser with running status.
Enums§
- Midi
Message - The canonical MIDI 1.0 message model (excluding SysEx payload bytes).
Functions§
- parse_
into - Convenience: parse into a caller-provided output buffer, returning the count
written. Errors
AudioError::OutputBufferTooSmallif more messages are produced than fit. Zero-alloc. - parse_
stream - Parse a full byte slice, invoking
on_msgfor each complete message. Zero-alloc: state lives in a stackMessageParser; no buffers are grown.