works: MIDI-IN: code + schematics

first, your code fragment does not update the value of "incomingByte"... you have to re-read form the serial buffer, like in the first line of your code, to get the next received byte.

plus:
ok, i'm really not into midi right now. but if i remember correctly there was something else to mention:

AFTERTOUCH messages are like NOTE ON (OFF) messages without explictly mentioning which note to play or stop. in that case you have to ON/OFF the last note which was explicitly sent. the code i posted at the beginning of this thread does not reflect this, because my (midiman oxygen) keyboard did not seem to use aftertouch.

keep me/us updated please and good luck.

//kuk