Problem with Midi library callback functions

Hello, I have the following problem, for each CC message that my DAW sends, the program returns the same message, creating a loop that ruins everything, the daw is configured to send and receive, but how do I configure my code so that it does not forward what it receives? ? Thank you.
Harware: nRF52840 Adafruit
DAW: Ableton

#include <MIDI.h>

#include <Adafruit_TinyUSB.h>

Adafruit_USBD_MIDI usb_midi;
MIDI_CREATE_INSTANCE(Adafruit_USBD_MIDI, usb_midi, MIDI);

void setup() {
 MIDI.begin(MIDI_CHANNEL_OMNI);

  MIDI.setHandleControlChange(handleonControlChange);
}
void handleonControlChange(uint8_t channel, uint8_t control, uint8_t value) {
  Serial.printf("Note off: channel = %d, control = %d, value - %d", channel, control, value);
  Serial.println();
}
void loop() {
MIDI.read();
}

Add MIDI.turnThruoff() after MIDI.begin(...).

That was the problem, thank you very much!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.