Some of the steps I've tried:1) I've verified my input pin works using a simple potentiometer. I can get Serial.Available to read an input byte with that set-up2) I've tried both midi plug wiring options as described in this thread.3) I've tried the circuit with and without the diode.

if you are already getting some serial data, i'd suggest checking just for a "144" (note-on message). Every keystroke should cause at least one.

if you're not receiving any data, you most likely have a problem with the opto setup. are you using the 4n28? can you verify that the optocpupler [still] works?i'm not sure about your 2-watt resitors, but if they're that big, i could imagine them adding some noise. still i think you should get correct data in one of let's say a 100 key strokes.

remember that you need to set your keyboard (or whatever midi device you'Re using) to use midi channel 1 to use it with this code here.

I got a Korg MicroKorg for xmas a while back only to find that it didn't have a sequencer built in . So, I've decided I'm going to make an Arduino do some MIDI IN/OUT, and act as a cool sequencer accessory. I'm using a small backlit serial LCD, some multi-color LED bar graph displays, a few HC595's, a large pot, and (possibly) 2 Arduinos. I figure I'll have two Arduinos to make the setup easier to program (master-slave config). I hope to get it to the point where the Arduino(s) will get all key, knob, and other MIDI status messages from the microKorg, and save that info in each step along with the program number (for each unique program sound). It'll then be able to play it back in sequence at a variable tempo. I'll update here if you'd all like!

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.