|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
MIDI byte stream parser — state machine with running status. More...
#include <parser.hpp>
Public Member Functions | |
| void | set_callback (MidiCallback cb) |
| Set the callback for parsed MIDI events. | |
| void | set_channel (uint8_t ch) |
| Set channel filter. | |
| void | push (uint8_t byte) |
| Feed one byte from UART RX. | |
| void | push (const uint8_t *data, uint16_t len) |
| Feed multiple bytes. | |
MIDI byte stream parser — state machine with running status.
Definition at line 35 of file parser.hpp.
|
inline |
Feed multiple bytes.
Definition at line 158 of file parser.hpp.
References push().
|
inline |
Feed one byte from UART RX.
State machine processes the byte and dispatches complete messages via the callback. System Real-Time messages are dispatched immediately, even mid-message.
Definition at line 59 of file parser.hpp.
References sbl::midi::expected_data_bytes(), sbl::midi::TuneRequest, and sbl::midi::MidiEvent::type.
Referenced by sbl::midi::poll(), and push().
|
inline |
Set the callback for parsed MIDI events.
Definition at line 41 of file parser.hpp.
|
inline |
Set channel filter.
| ch | Channel 0-15, or 0xFF for omni (receive all channels) |
Definition at line 48 of file parser.hpp.