Class daisy::MidiHandler¶
ClassList > daisy > MidiHandler
Simple MIDI Handler Parses bytes from an input into valid MidiEvents. The MidiEvents fill aFIFO queue that the user can pop messages from.More...
#include <midi.h>
Classes¶
Type | Name |
---|---|
struct | Config |
Public Functions¶
Type | Name |
---|---|
bool | HasEvents () const |
void | Init (Config config) |
void | Listen () |
MidiHandler () |
|
void | Parse (uint8_t byte) |
MidiEvent | PopEvent () |
bool | RxActive () |
void | SendMessage (uint8_t * bytes, size_t size) |
void | StartReceive () |
~MidiHandler () |
Detailed Description¶
Author:
shensley
Date:
March 2020
Public Functions Documentation¶
function HasEvents¶
Checks if there are unhandled messages in the queue
Returns:
True if there are events to be handled, else false.
function Init¶
Initializes the MidiHandler
Parameters:
config
Configuration structure used to define specifics to the MIDI Handler.
function Listen¶
Start listening
function MidiHandler¶
function Parse¶
Feed in bytes to parser state machine from an external source. Populates internal FIFO queue with MIDI Messages.
Note:
Normally application code won't need to use this method directly.
Parameters:
byte
MIDI byte to be parsed
function PopEvent¶
Pops the oldest unhandled MidiEvent from the internal queue
Returns:
The event to be handled
function RxActive¶
function SendMessage¶
SendMessage Send raw bytes as message
function StartReceive¶
Starts listening on the selected input mode(s). MidiEvent Queue will begin to fill, and can be checked with HasEvents()
function ~MidiHandler¶
The documentation for this class was generated from the following file external-docs/libDaisy/src/hid/midi.h