![]() |
MD_MIDIFile Standard MIDI File Processing
2.3
Library to play Standard MIDI Files (SMF)
|
Main header file for the MD_MIDIFile library. More...
#include <Arduino.h>
#include <SdFat.h>
Classes | |
struct | midi_event |
struct | sysex_event |
struct | meta_event |
class | MD_MFTrack |
class | MD_MIDIFile |
Macros | |
#define | DUMP_DATA 0 |
#define | SHOW_UNUSED_META 0 |
#define | MIDI_MAX_TRACKS 24 |
#define | TRACK_PRIORITY 1 |
#define | ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0])) |
#define | DUMPS(s) |
Print a string. | |
#define | DUMP(s, v) |
Print a value (decimal) | |
#define | DUMPX(s, x) |
Print a value (hex) | |
Main header file for the MD_MIDIFile library.
#define DUMP_DATA 0 |
Set to 1 to to dump the file data instead of processing callback. Neither SHOW_UNUSED_META or DUMP_DATA should not be set to 1 when MIDI messages are being transmitted through the serial port as the Serial.print() functions are called to print information to the serial monitor.
#define MIDI_MAX_TRACKS 24 |
Max number of MIDI tracks. This may be reduced or increased depending on memory requirements. 16 tracks is the maximum available to any MIDI device. Fewer tracks may not allow many MIDI files to be played, while a minority of SMF may require more tracks.
#define SHOW_UNUSED_META 0 |
Set to 1 to display unused META messages. DUMP_DATA must also be enabled for this to have an effect. Neither SHOW_USED_META or DUMP_DATA should not be set to 1 when MIDI messages are being transmitted through the serial port as the Serial.print() functions are called to print information to the serial monitor.
#define TRACK_PRIORITY 1 |
Events may be processed in 2 different ways. One way is to give priority to all events on one track before moving on to the next track (TRACK_PRIORITY) or to process one event from each track and cycling through all tracks round robin fashion until no events are left to be processed (EVENT_PRIORITY). This macro definition enables the mode of operation implemented in getNextEvent().