Hello!
I've been struggling with this for a while now. My goal is to make a metronome out of LEDs controlled by an Arduino Mega. The Mega receives midi data through serial by using Serial Midi Converter by Spiekenzielabs (Serial_MIDI). I started experimenting with the code by Kuk (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1187962258/0). At first I got nothing - no blinking leds even though serial was being transmitted (I debugged this by turning a status led on when serial.available > 0). I suspected the problem was with the line
if (incomingByte== 144){ // note on message starting starting
It really makes no sense, since I specifically sent a note on command (144) from Ableton Live. Then I tried this
if (incomingByte > 144){ // note on message starting starting
Which resulted in the condition coming through and I got a blinking led. I started tracing the incoming command by narrowing the byte to smaller and smaller ranges and finally got down to it being 252 - the midi command for STOP. What the..?
I just want to define four notes which would light up corresponding leds on the Arduin metronome. Any help?