Arduino MIDI File Parser
All Classes Files Functions Variables Modules Pages
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MidiFileParser Class Reference

Midi File parser. Provide the data via write: You should try to keep the buffer as full as possible while parsing. You get the next parsing result by calling the parse() method. More...

#include <MidiFileParser.h>

Collaboration diagram for MidiFileParser:
Collaboration graph
[legend]

Public Member Functions

bool begin (bool log=true, int bufferSize=MIDI_BUFFER_SIZE)
 Initializes & starts the processing.
 
size_t write (const uint8_t *data, size_t len)
 Feed/Provide the midi data to the parser.
 
int availableForWrite ()
 Max number of bytes that we can write.
 
midi_parser_stateparse ()
 Parse data in order to provide the next midi element.
 
midi_parser_stateparseTimed ()
 Parse data in order to provide the next midi element considering the times.
 
 operator bool ()
 Returns false after an error or when all data has been consumed.
 
void end ()
 Ends the processing: currently does nothing.
 
const char * midi_status_name (int status)
 Provides the string description for the midi_status value.
 
const char * midi_file_format_name (int fmt)
 Provides the string description for the file format.
 
const char * midi_meta_name (int type)
 Provides the string description for the midi_meta value.
 

Protected Member Functions

void logStatus (midi_parser_status status)
 
void reset ()
 
int midi_event_datalen (int status)
 
uint16_t midi_parse_be16 (const uint8_t *in)
 
uint32_t midi_parse_be32 (const uint8_t *in)
 
uint64_t midi_parse_N (const uint8_t *from_bytes, int len)
 
uint64_t midi_parse_variable_length (int32_t *offset)
 
enum midi_parser_status midi_parse_header ()
 
enum midi_parser_status midi_parse_track ()
 
bool midi_parse_vtime ()
 
enum midi_parser_status midi_parse_channel_event ()
 
int midi_parse_sysex_event ()
 
enum midi_parser_status midi_parse_meta_event ()
 
enum midi_parser_status midi_parse_event ()
 
enum midi_parser_status midi_parse ()
 

Protected Attributes

bool log_active = false
 
int write_len = 256
 
midi_parser_state parser_state
 
bool is_ok = true
 

Detailed Description

Midi File parser. Provide the data via write: You should try to keep the buffer as full as possible while parsing. You get the next parsing result by calling the parse() method.

Author
Phil Schatzmann

The documentation for this class was generated from the following file: