MD_MIDIFile Standard MIDI File Processing 2.6
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 16 |
#define | TRACK_PRIORITY 1 |
#define | SD_FAT_TYPE 0 |
#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) | |
Typedefs | |
typedef SdFat | SDFAT |
SDFat class used. | |
typedef File | SDDIR |
File type for folders. | |
typedef File | SDFILE |
File type for files. | |
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 nor DUMP_DATA should be set to 1 when MIDI messages are being transmitted through the serial port as Serial.print() functions are called to print information to the serial monitor.
#define MIDI_MAX_TRACKS 16 |
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 SD_FAT_TYPE 0 |
Defines the type of file system that is supported by the SDFat library
The library and application code should use the typedefs SDFAT, SDFILE, SDDIR
#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 nor DUMP_DATA should be set to 1 when MIDI messages are being transmitted through the serial port as 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().