|
| 1 | +# USB MIDI 2.0 Device — Arduino IDE |
| 2 | + |
| 3 | +ESP32-S3 USB MIDI 2.0 device example using tusb_ump. |
| 4 | +Tested on LilyGO T-Display-S3. |
| 5 | + |
| 6 | +## Setup |
| 7 | + |
| 8 | +1. **Board:** ESP32S3 Dev Module |
| 9 | +2. **Tools > USB Mode:** USB-OTG (TinyUSB) |
| 10 | +3. **Tools > USB CDC On Boot:** Disabled |
| 11 | +4. **LovyanGFX:** install via Library Manager |
| 12 | +5. **tusb_ump:** copy repo into `~/Arduino/libraries/tusb_ump/` |
| 13 | +6. **Build flags:** copy `platform.local.txt.example` as `platform.local.txt` to: |
| 14 | + - Linux: `~/.arduino15/packages/esp32/hardware/esp32/<version>/` |
| 15 | + - macOS: `~/Library/Arduino15/packages/esp32/hardware/esp32/<version>/` |
| 16 | + - Windows: `%LOCALAPPDATA%\Arduino15\packages\esp32\hardware\esp32\<version>\` |
| 17 | +7. **Restart Arduino IDE**, then open `tdisplay_s3_midi2.ino` and upload. |
| 18 | + |
| 19 | +## Files |
| 20 | + |
| 21 | +| File | Description | |
| 22 | +|------|-------------| |
| 23 | +| `tdisplay_s3_midi2.ino` | Main sketch (setup/loop, buttons, UMP RX/TX) | |
| 24 | +| `usb_descriptors.cpp` | USB MIDI 2.0 config descriptor (dual alt settings) | |
| 25 | +| `UMPDisplay.h` | LovyanGFX display handler | |
| 26 | +| `mapping.h` | Pin assignments, colours, layout | |
| 27 | +| `platform.local.txt.example` | Build flags template for Arduino IDE | |
| 28 | + |
| 29 | +## Controls |
| 30 | + |
| 31 | +| Button | Action | |
| 32 | +|--------|--------| |
| 33 | +| BTN1 (GPIO0) | Toggle NoteOn / NoteOff (C5) | |
| 34 | +| BTN2 (GPIO14) | Cycle velocity: 32 > 64 > 96 > 127 | |
| 35 | + |
| 36 | +See the [PlatformIO version](../../platformio/tdisplay_s3_midi2/) for an |
| 37 | +alternative build setup that doesn't require `platform.local.txt`. |
0 commit comments