back to Arduino and ESP32-S2-Saola-1

TinyUSB MIDI - GitHub

Bottom line:  ESP32TinyUSB MIDI does not composite with other devices of interest
(CDC, gamepad)
trying MIDI over Wi-Fi, and specifically WebSocket (TCP),
to avoid running AsyncUDP in addition to AsyncTCP/ESPAsyncWebServer
 
Known Issue with current Arduino ESP32TinyUSB library:
"tinyusb callbacks cant be overriden and are used by arduino-esp32"
 
Most Arduino MIDI examples want hacking for ESP32-S2
Most Arduino MIDI sketches use #include "MIDI.h" paradigm;
often, also digitalWrite(LED_BUILTIN, HIGH);
  ...which LED_BUILTIN does not exist on most ESP32-S2 boards.
Instead, downloaded freenove-ws2812-lib-for-esp32/
  and created esp32s2LED library to minimize LED substitution hassles.

Arduino MIDI Library - GitHub

MIDIUSB library   - reference
Arduino MIDI.h was originally intended for specific MIDI hardware connections,
then USB-MIDI transport layer was inserted for optional USB or serial connections.

Testing USBMIDI_CREATE_DEFAULT_INSTANCE()

Simply hacking midi_test to use #include <USB-MIDI.h> provoked this error.

Tricking Arduino's USB-MIDI transport layer to use ESP32TinyUSB
  seemingly has not previously been hacked by creating a USBMIDI.h doppelgänger.

Using Esp32TinyUSB with USB-MIDI by replacing Arduino's MIDIUSB

  ... with a "glue" class CMidiUSB and this set of libraries

First success: miditest.ino, but only implementing MIDI.read(),
which means that writes are going elsewhere... need to investigate USB-MIDI code...

tttapa / Control-Surface - GitHub many example sketches

EspTinyUSB/examples/device/midi

This video is misleading; it may have worked for platformio, but as a Arduino library,
ESP32TinyUSB is broken for MIDI by an enumeration value of 5,
which exceeds ESP32-S2 active endpoints; enable it by
changing midiusb.cpp://#define EPNUM_MIDI 0x05 to 0x04
but more than 3 or so USB composite devices is probably doomed.

GitHub

Other Arduino MIDI links:


source @ GitHub

Arduino MIDI sketch from Notes and Volts   Arduino MIDI Library Input Test


silveirago / DIY-Midi-Controller Workshop sketch



Seed Studio Xiao M0 USB MIDI Arduino sketch   adafruit article
maintained by blekenbleu