Simple MIDI Handler
Parses bytes from an input into valid MidiEvents.
The MidiEvents fill a FIFO queue that the user can pop messages from.
More...
Simple MIDI Handler
Parses bytes from an input into valid MidiEvents.
The MidiEvents fill a FIFO queue that the user can pop messages from.
#include <midi.h>
Classes | |
struct | Config |
Public Member Functions | |
MidiHandler () | |
~MidiHandler () | |
void | Init (Config config) |
void | StartReceive () |
void | Listen () |
bool | HasEvents () const |
bool | RxActive () |
MidiEvent | PopEvent () |
void | SendMessage (uint8_t *bytes, size_t size) |
void | Parse (uint8_t byte) |
|
inline |
|
inline |
|
inline |
Checks if there are unhandled messages in the queue
Initializes the MidiHandler
config | Configuration structure used to define specifics to the MIDI Handler. |
|
inline |
Start listening
Feed in bytes to parser state machine from an external source. Populates internal FIFO queue with MIDI Messages.
byte | MIDI byte to be parsed |
|
inline |
Pops the oldest unhandled MidiEvent from the internal queue
|
inline |
|
inline |
SendMessage Send raw bytes as message
|
inline |
Starts listening on the selected input mode(s). MidiEvent Queue will begin to fill, and can be checked with HasEvents()