Hello all, I am a little nervous about posting my message, as I realize I am a little over my head here.
I have an
off-brand Nano on which I am trying to use Jan Ostman's
Solina code.
I am using a 6n137 that I had lying around to get MIDI in. I used this basic schematic:

I'm using an Arturia Keystep to try to feed MIDI into the Nano. It looks to me like the MIDI data is getting in, because I'm getting a flashing led (RX) whenever I press a key down and release a key on the Keystep. However, I get no sound at all after I upload the code onto the Nano.
I added the MIDI code provided by Jan, although I didn't know where to put it in the original sketch. I believe I just pasted it into the end.
ISR(USART_RX_vect) {
uint8_t MIDIRX;
MIDIRX = UDR0;
/*
Handling "Running status"
1.Buffer is cleared (ie, set to 0) at power up.
2.Buffer stores the status when a Voice Category Status (ie, 0x80 to 0xEF) is received.
3.Buffer is cleared when a System Common Category Status (ie, 0xF0 to 0xF7) is received.
4.Nothing is done to the buffer when a RealTime Category message is received.
5.Any data bytes are ignored when the buffer is 0.
*/
if ((MIDIRX>0xBF)&&(MIDIRX<0xF8)) { MIDIRUNNINGSTATUS=0; MIDISTATE=0; return; } if (MIDIRX>0xF7) return;
if (MIDIRX & 0x80) {
MIDIRUNNINGSTATUS=MIDIRX;
MIDISTATE=1;
return;
}
if (MIDIRX < 0x80) {
if (!MIDIRUNNINGSTATUS) return;
if (MIDISTATE==1) {
MIDINOTE=MIDIRX;
MIDISTATE++;
return;
}
if (MIDISTATE==2) {
MIDIVEL=MIDIRX;
MIDISTATE=1;
if ((MIDIRUNNINGSTATUS==0x80)||(MIDIRUNNINGSTATUS==0x90)) handleMIDINOTE(MIDIRUNNINGSTATUS,MIDINOTE,MIDIVEL);
//if (MIDIRUNNINGSTATUS==0xB0) handleMIDICC(MIDINOTE,MIDIVEL);
return;
}
}
return;
}
I also added these global variables:
volatile uint8_t MIDISTATE=0;
volatile uint8_t MIDIRUNNINGSTATUS=0;
volatile uint8_t MIDINOTE;
volatile uint8_t MIDIVEL;
With this code I got RX led flashing on note press and release, but no audio whatsoever, except a clicking sound that correlated with the key presses.
After this didn't work, I tried
Morocco Dave's adaptation of Jan's code, with the exact same results.
Does anyone have any suggestions where to start troubleshooting?
Please be kind, but tell me if I should scrap this project and start with the basics. I am new to Arduino and coding. I also realize I am using someone else's code and I don't understand it.
Thanks!