Problems porting midi controller project to ESP32 board

Continuing the discussion from MIDI USB on the Nano ESP32:

I had a basic arduino sending messages to midi via a female midi port plugged into the midi in on the back of a synth, it worked great turning my arduino into a midi controller. I'm now trying to convert it to an esp32 project so I can incorporate mobile device to adjust settings in the esp32. For the life of me I can't get it to send a signal or make any noise from the synth. I'm now looking at your solution of sending midi via usb, but I'm wondering how it shows up in my syth app on windows? I don't see any new midi devices showing up?

What ESP32 board are you using?

Only an ESP32-S3 (or maybe an ESP32-C3) based board supports midi over USB. The older ESP32 boards only support midi over bluetooth.

I'm using ESP32 DEVKIT V1 TYPEC I have a project managing my inputs and communicating back and forth the a mobile app, but it's not sending or not sending properly midi to my connected device... I've been trying with this very basic set up to just prove a connection, it's susposed to be the most basic test project, but it's still not connecting ...

 #define MIDI_TX_PIN 17

void setup() {
  Serial1.begin(31250, SERIAL_8N1, -1, MIDI_TX_PIN); // UART for MIDI
}

void loop() {
  Serial1.write(0x90); // Note On, channel 1
  Serial1.write(60);   // Middle C
  Serial1.write(127);  // Velocity
  delay(500);

  Serial1.write(0x80); // Note Off, channel 1
  Serial1.write(60);   // Middle C
  Serial1.write(0);    // Velocity
  delay(500);
}

I have my vin connected to the 220 ohm then the female midi, my ground to ground, and signal to tx2 (pin17), the female midi connected to the esp32 is connected to the midi in port in the back of a physical synth... but sadly I hear no sound. I would like to stick to physical midi cable, but i have too I am considering your way of usbmidi

I'm using ESP32 DEVKIT V1 TYPEC

That is one of the older versions of the ESP32 that does not support midi over USB, only midi over Bluetooth.

You will never be able to get this to work, look out for an ESP32-S3 board.

not even for esp32 wired directly to the female midi port? Esp32 can't do that?

All I can tell you is that USB midi does not work on the older ESP32 boards because they do not have the hardware to support it. I have only been trying to get USB midi working on ESP32-S3 boards, not the 'classic' 5 port wired DIN midi - which is not physically the same as USB midi.

You might be able to get the classic midi working on an old ESP32, I don't know. Maybe this is a pointer for you:
https://www.reddit.com/r/esp32/comments/17mf98i/din_midi_with_an_esp32/

Terrible idea on a 3.3V board. Don't connect any voltage sources above 3.3V or below 0V to the GPIO pins. Hopefully the resistors and IR LED limited the damage.

When using a 3.3V UART, you should either use a 5V buffer, or select resistor values appropriate for 3.3V. See 5 Pin DIN Electrical Specs – MIDI.org for details.

Thanks Pieter, I had a look at the document you shared and I believe I will need 420ohm since I'm not getting 5volts from my eps32. Thanks again, fingers crossed this works!!

You will need the optical couplers to be of the type TPL2962 or HCPL2060L to work with 3V3 MIDI systems.