-
Hi Guys, Wondered if I could get some help with my code - I've used one of the examples and managed to get it to send a MIDI note continuously My Mac is able to connect to the session and receive these MIDI notes but after 2/3 minutes my connection to the RTP session times out. Wondered if anyone had experienced this and could help? I'm using a W5500 and the Ethernet3 library. Code & image attached #include <Ethernet3.h> // Enter a MAC address for your controller below. unsigned long t1 = millis(); APPLEMIDI_CREATE_DEFAULTSESSION_INSTANCE(); void(* resetFunc) (void) = 0; // declare reset fuction at address 0 // ----------------------------------------------------------------------------- DBG_SETUP(115200); Ethernet.init(4); // maxSockNum = 4 Socket 0...3 -> RX/TX Buffer 4k if (Ethernet.begin(mac) == 0) { AppleMIDI.directory.push_back(IPAddress(192, 168, 0, 177)); DBG(F("OK, now make sure you an rtpMIDI session that is Enabled")); MIDI.begin(); // Stay informed on connection status MIDI.setHandleNoteOn([](byte channel, byte note, byte velocity) { DBG(F("Sending MIDI messages every second")); // ----------------------------------------------------------------------------- MIDI.sendNoteOn(01,55,01); delay(100); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @EdBeardon there are many issues with the use of Start with removing |
Beta Was this translation helpful? Give feedback.
Hi @EdBeardon
there are many issues with the use of
delay(100);
in the main loop. Don;t do this! Look at this example to send notes every x secondsStart with removing
delay(100);
andMIDI.sendNoteOne
and see if it remains connected