MIDI Library – Callbacks

I published the release 3.1 of the Arduino MIDI Library, that adds the callback feature.

This allows you to handle input messages more easily and more efficiently. Instead of checking which message was read, connect a function to a type that will be called back (hence the name) when a message of this type is received. The data is passed in the function’s parameters so you no longer need to call MIDI.getType, MIDI.getData1 etc..
Also, version 3.1 corrects a few bugs on Thru, Running Status and the interleaving of RealTime messages. If you had troubles with your MIDI-equipped sound card, give a try to this update, the trouble might be caused by Active Sensing messages messing around with other types.