Arduino MIDI Library  Version 4.3
MIDI_Callbacks.ino

This example shows how to use callbacks for easier MIDI input handling.