Skip to content

ESP32 having two MIDI INs #318

Answered by copych
copych asked this question in Q&A
Discussion options

You must be logged in to vote

This seems to work

#ifdef MIDI_VIA_SERIAL
  // default settings for Hairless midi is 115200 8-N-1
  struct CustomBaudRateSettings : public MIDI_NAMESPACE::DefaultSerialSettings {
    static const long BaudRate = 115200;
  };
  MIDI_NAMESPACE::SerialMIDI<HardwareSerial, CustomBaudRateSettings> serialMIDI(Serial);
  MIDI_NAMESPACE::MidiInterface<MIDI_NAMESPACE::SerialMIDI<HardwareSerial, CustomBaudRateSettings>> MIDI((MIDI_NAMESPACE::SerialMIDI<HardwareSerial, CustomBaudRateSettings>&)serialMIDI);
#endif

#ifdef MIDI_VIA_SERIAL2
  // MIDI port on UART2,   pins 16 (RX) and 17 (TX) prohibited, as they are used for PSRAM  
  struct Serial2MIDISettings : public midi::DefaultSettings{
    static c…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by copych
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant