MIDI in Code, without MIDI Library

Maybe you could have a look to my light midiXParser class released to the open source community, handling also everything from basic midi messages, and more complex like running status and sysex.

example :

midiXparser midiParser;
midiParser.setChannelVoiceMsgFilter(midiXparser::noteOffMsk | midiXparser::noteOnMsk );  
loop() 
{

    if ( Serial.available() && ( midiParser.parse( Serial.read() ) {
    // Do something for notes on/off

    } 
    (...)  
}

This is more "low level" than the very good midi library from FortySevenEffects but it does the job quite well.
A bunch of tests are provided with the demo INO sketch...