LED metronome

I’m trying to sync a LED to the midi clock in ableton live or logic. I am using the serial to midi intermediate software to relay the message. I can see that the clock is sending some sort of data back to the arduino because i can see the Rx and Tx lights on the arduino flashing in sync with the bpm. I have done a Serial.println to look at the data as well as change the baud rate to 9600 so the output is decipherable. I know that; byte midi_clock = 0xf8 and i was expecting to see this hexidecimal output from my serial print. However, I am not seeing this output at all, in fact the only midi command i am rarely seeing at random is 0x80 or Note-off which makes no sense as no midi sequence is present.
Anyone give me some ideas on how to obtain or deal with the clock data? Thanks.

You’ll need to use a separate serial port if you want to both use the serial monitor and receive MIDI.

You need to set the midi port’s baud rate to 31250, which is MIDI’s data rate. However, you’ll want your serial monitor to be something standard like 9600 (or maybe 57600). You’ll need to use something like SoftwareSerial (or NewSoftSerial) to receive the MIDI so that you can use the hardware serial to send messages to the computer for monitoring.

-Paul

Paul I think this phrase is important:-

I am using the serial to midi intermediate software to relay the message.

So I am assuming that the baud rate this sends in not the MIDI rate. The serial monitor can’t handle the MIDI rate.

Having said that you have to determine what is being sent to the arduino. This can be tricky if the serial ports are tied up. This is where a bit of ingenuity and a few LEDs can come in. I would attach one or two LEDs to the board that you can light up when you see various things in your software.
The first would be when serialAvailable() reports something. That is, is data being received at the rate you think. Next try and find out what that data is, compare and light LED or output each bit to several pin outputs and go along with a flying lead and see what they are.

If you can give more details of your hardware maybe we could come up with a better strategy.

Thanks for the info, I actually ended up getting the metronome to work by identifying the midi data that was clock oriented with a sort of guess and check method. I finally got some optocouplers so i plan on building an actual hardware interface. Thanks, for the info!