daisy::MidiParser¶
Module: LIBDAISY / HUMAN_INTERFACE / MIDI
Utility class for parsing raw byte streams into MIDI messages. More...
#include <midi_parser.h>
Public Functions¶
Name | |
---|---|
MidiParser() | |
~MidiParser() | |
void | Init() |
bool | Parse(uint8_t byte, MidiEvent * event_out) Parse one MIDI byte. If the byte completes a parsed event, its value will be assigned to the dereferenced output pointer. Otherwise, status is preserved in anticipation of the next sequential byte. Return value indicates if a new event was parsed or not. |
void | Reset() Reset parser to default state. |
Detailed Description¶
Utility class for parsing raw byte streams into MIDI messages.
Implemented as a state machine designed to parse one byte at a time
Public Functions Documentation¶
function MidiParser¶
function ~MidiParser¶
function Init¶
function Parse¶
Parse one MIDI byte. If the byte completes a parsed event, its value will be assigned to the dereferenced output pointer. Otherwise, status is preserved in anticipation of the next sequential byte. Return value indicates if a new event was parsed or not.
Parameters:
- byte Raw MIDI byte to parse
- event_out Pointer to output event object, value assigned on parse success
Return:
- true If a new event was parsed
- false If no new event was parsed
function Reset¶
Reset parser to default state.
---¶
Updated on 2024-01-03 at 19:41:01 +0000