title: daisy::MidiHandler summary: Simple MIDI Handler Parses bytes from an input into valid MidiEvents. The MidiEvents fill a FIFO queue that the user can pop messages from.
daisy::MidiHandler¶
Module: LIBDAISY / HUMAN_INTERFACE / MIDI
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...
#include <midi.h>
Public Classes¶
Name | |
---|---|
struct | Config |
Public Functions¶
Name | |
---|---|
MidiHandler() | |
~MidiHandler() | |
void | Init(Config config) |
void | StartReceive() |
void | Listen() |
bool | HasEvents() const |
MidiEvent | PopEvent() |
void | SendMessage(uint8_t * bytes, size_t size) |
void | Parse(uint8_t byte) |
Detailed Description¶
Simple MIDI Handler Parses bytes from an input into valid MidiEvents. The MidiEvents fill a FIFO queue that the user can pop messages from.
Author: shensley
Date: March 2020
Public Functions Documentation¶
function MidiHandler¶
function ~MidiHandler¶
function Init¶
Parameters:
- config Configuration structure used to define specifics to the MIDI Handler.
Initializes the MidiHandler
function StartReceive¶
Starts listening on the selected input mode(s). MidiEvent Queue will begin to fill, and can be checked with HasEvents()
function Listen¶
Start listening
function HasEvents¶
Return: True if there are events to be handled, else false.
Checks if there are unhandled messages in the queue
function PopEvent¶
Return: The event to be handled
Pops the oldest unhandled MidiEvent from the internal queue
function SendMessage¶
SendMessage Send raw bytes as message
function Parse¶
Parameters:
- byte MIDI byte to be parsed
Note: Normally application code won't need to use this method directly.
Feed in bytes to parser state machine from an external source. Populates internal FIFO queue with MIDI Messages.
---¶
Updated on 2024-01-03 at 19:41:01 +0000