Arduino MIDI Library v4.2
Changelog
- Fix bug when receiving large SysEx messages - Issue #22
- Fix Thru bug - Issue #13
- Removed preprocessor-based settings, replaced by an overridable template-based struct. This allows to change settings without editing the library code.
Compatibility
Instanciation
The default MIDI object has been removed, so you will need to create it using one of the following macros:
For straightforward compatibility with sketches written with v4.1 and older:
MIDI_CREATE_DEFAULT_INSTANCE();
To specify which serial port to use:
MIDI_CREATE_INSTANCE(HardwareSerial, Serial2, MIDI);
To override settings - see http://arduinomidilib.fortyseveneffects.com/a00013.html#details
struct MySettings : public midi::DefaultSettings
{
static const bool UseRunningStatus = false; // Messes with my old equipment!
};
MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial, MIDI, MySettings);
SysEx Callback
The SysEx callback has a new signature:
void handleSysEx(byte* data, unsigned size);
This fixes a bug when receiving SysEx messages larger than 255 bytes.