Hi Chris,
I “think” I’m setting the PROG/FUN correctly; took all of the debug Serial.println statements out. Again, I can loop with MIDI.noteon and MIDI.noteoff and that works great on the MIDI out.
Now trying to a quick “MIDI.read()” and see that all of the notes from MIDI in are actually going out. Is there supposed to be a MIDI.write()? It doesn’t seem to exist. Here’s my simple sketch for MIDI out:
#include <MIDI.h>
// Simple tutorial on how to receive and send MIDI messages.
// Here, when receiving any message on channel 4, the Arduino
// will blink a led and play back a note for 1 second.
MIDI_CREATE_DEFAULT_INSTANCE();
static const unsigned ledPin = 10; // LED pin on Arduino Uno
static const unsigned ledMidi = 9;
void setup()
{
pinMode(ledPin, OUTPUT);
pinMode(ledMidi,OUTPUT);
MIDI.begin(MIDI_CHANNEL_OMNI); // Launch MIDI and listen to channel 4
digitalWrite(ledPin,HIGH);
digitalWrite(ledMidi,HIGH);
delay(5000);
digitalWrite(ledPin,LOW);
digitalWrite(ledMidi,LOW);
delay(5000);
}
void loop()
{
digitalWrite(ledPin, HIGH);
digitalWrite(ledMidi,HIGH);
delay(1000);
digitalWrite(ledPin, LOW);
digitalWrite(ledMidi,LOW);
delay(1000);
digitalWrite(ledPin, HIGH);
digitalWrite(ledMidi,HIGH);
MIDI.sendNoteOn(42, 127, 1); // Send a Note (pitch 42, velo 127 on channel 1)
delay(1000); // Wait for a second
MIDI.sendNoteOff(42, 0, 1); // Stop the note
digitalWrite(ledPin, LOW);
digitalWrite(ledMidi,LOW);
}