|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
MIDI protocol support. More...
Classes | |
| struct | MidiEvent |
| class | Parser |
| MIDI byte stream parser — state machine with running status. More... | |
Typedefs | |
| using | MidiCallback = void(*)(const MidiEvent &event) |
| Callback type for parsed MIDI events. | |
Enumerations | |
| enum class | MessageType : uint8_t { NoteOff = 0x80 , NoteOn = 0x90 , PolyPressure = 0xA0 , ControlChange = 0xB0 , ProgramChange = 0xC0 , ChannelPressure = 0xD0 , PitchBend = 0xE0 , Clock = 0xF8 , Start = 0xFA , Continue = 0xFB , Stop = 0xFC , ActiveSensing = 0xFE , SystemReset = 0xFF , SysEx = 0xF0 , SysExEnd = 0xF7 , TimeCode = 0xF1 , SongPosition = 0xF2 , SongSelect = 0xF3 , TuneRequest = 0xF6 , None = 0x00 } |
Functions | |
| template<typename UartDriver > | |
| void | poll (Parser &parser) |
| Poll UART for MIDI bytes and feed them to the parser. | |
| uint8_t | expected_data_bytes (uint8_t status) |
| Number of data bytes expected for a channel message status byte. | |
MIDI protocol support.
Stream-based MIDI parser with running status, real-time passthrough, SysEx handling, and channel filtering. Template-based input polling.
| using sbl::midi::MidiCallback = typedef void(*)(const MidiEvent& event) |
|
strong |
|
inline |
Number of data bytes expected for a channel message status byte.
Definition at line 147 of file types.hpp.
Referenced by sbl::midi::Parser::push().
|
inline |
Poll UART for MIDI bytes and feed them to the parser.
Drains all available bytes from the UART RX buffer. Non-blocking — returns immediately if no data available.
| UartDriver | UART driver class with available() and read_byte() |
Definition at line 29 of file input.hpp.
References sbl::midi::Parser::push().