Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esp32-S3 does not appear as Midi-USB #1108

Open
ashojon opened this issue Jan 5, 2025 · 1 comment
Open

Esp32-S3 does not appear as Midi-USB #1108

ashojon opened this issue Jan 5, 2025 · 1 comment

Comments

@ashojon
Copy link

ashojon commented Jan 5, 2025

Describe the bug
I have an ESP32-S3 board and am trying to build a USB and BLE MIDI controller using the Control Surface library. Both USB and BLE MIDI work perfectly in the Arduino IDE. However, when I use PlatformIO with Visual Studio Code, the USB MIDI does not appear in Windows MIDI monitor software.

That is what I used as setting in Arduino IDE

Set board to ESP32-S3 in Tools -> Board -> esp32 -> ESP32S3 Dev Module
Set USB mode to USB-OTG Tools -> USB Mode -> USB-OTG (TinyUSB)
Connect the dev board to the PC (UART USB port)
Select the according port in Tools -> Port

That is what I used as Setting in Platformio

[env:esp32s3usbotg]
platform = espressif32
board = esp32s3usbotg
framework = arduino
board_build.mcu = esp32s3
lib_deps = https://github.com/tttapa/Control-Surface.git#main
lib_ignore = MIDIUSB

Expected behavior
Esp32-S3 should recognized as MIDI-USB

Code

  • Please post the full code required to reproduce the problem.
  • If the code doesn't do what you expect, include a detailed description of what you expected the code it to do.
  • Don't post code that is too long. Try to narrow down the problem, try one component or aspect of your project at a time.
  • Don't post snippets, always post a complete (compilable) sketch.
  • Post your code between triple back ticks with the cpp language specifier, as shown below. This ensures that the code is displayed correctly and that syntax highlighting is enabled. (See the GitHub Markdown guide.)
#include <Arduino.h>
#include <Control_Surface.h>

USBMIDI_Interface midi;
BluetoothMIDI_Interface midi_ble;

void setup() {
    Serial.begin(460800);
    midi_ble.setName("MIDI_BLE_32");
   
  midi_ble.begin();
  midi.begin(); // Initialize the MIDI interface
}

void loop() {

    // Send a MIDI Note On message for the given note to trigger it
    midi.sendNoteOn(note, velocity);
  
    delay(500);
   
    // Send a MIDI Note Off message to turn it off again
    midi.sendNoteOff(note, velocity);
    delay(500);
    
    midi_ble.update();
    midi.update();
}
@ashojon ashojon changed the title Midi-USB Esp32-S3 does not appear as Midi-USB Jan 5, 2025
@tttapa
Copy link
Owner

tttapa commented Jan 13, 2025

I don't use PlatformIO myself, so I'm afraid I won't be able to provide detailed support.

Control Surface uses the built-in USB library from the ESP32 Arduino Core. Could you please test https://github.com/espressif/arduino-esp32/blob/master/libraries/USB/examples/MIDI/MidiController/MidiController.ino and report back? If that also doesn't work, it's probably a problem with PlatformIO rather than Control Surface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants