#MIDI and Alternative REPL console
1 messages · Page 1 of 1 (latest)
Thanks for the link @forest prairie I definitely needed that information to enable MIDI as the S2 doesn’t have it on by default. But I think the problem is that connecting the MIDI controller and PC to a hub with the S2 doesn’t work… the MIDI controller interacts with the PC. It would be better to have the REPL on the other UART based USB connector instead, if that is possible.
you want to connect a USB midi device to the board ?
that would require USB host on the board itself
which Circuitpython doesn't support
To provide further context: I want to develop a MIDI controller using CircuitPython on the S2. The CP interfaces to an existing MIDI controller (Novation LaunchPad) as the input device, mapping its keys and setting its LEDs and produces MIDI out on a separate interface.
yeah like a man-in-the-middle USB device
if you have a serial MIDI interface on the device, you could connect it to the board, I think there might be a guide about that
Thanks @steady egret I didn’t realize I couldn’t be a USB Host.
there is some demo somewhere of using a pico or RP2040 USB host feather as a passthrough that converts some USB device into another (not in CP), but I don't know of anything for the ESP
I wouldn't even know where to find that passthrough, but it's mentioned in some recent adafruit videos
that on the other hand is an example of using serial midi to USB midi I think:
https://learn.adafruit.com/qt-py-rp2040-usb-to-serial-midi-friends
here is one example of that USB passthrough:
https://www.youtube.com/watch?v=Lo_cRACZqqI
the Intellikeys is a popular accessibility device with custom overlays, that is no longer supported. even though it has a USB plug it doesn't work like many USB devices: it doesn't enumerate as an HID keyboard, instead it downloads the firmware from the computer driver! that means it'll never work with many modern devices ike chromebooks or iPad...
so something similar for USB MIDI should be possible
I seem to keep running into use cases where I think CP would be the perfect solution and stumble. 🙁 I had read thru the midi friends article… will check out the intellikeys project.
the thing is USB host on the RP2040 is done via PIO, and I don't even think you can do USB host and client at the same time on an ESP32-S2 hardware
if the only access to the LaunchPad is USB, it might be possible to use a small converter board that converts its USB midi to serial (there's probably some Arduino code that exists), and the S2 board connect to that and work like the learn guide above.
(And yes you can echo the REPL to the UART port to save on endpoints, or even use the web REPL heh)
For future reference, how do I move the REPL to the UART USB port?
I like the idea of a translator for the Launchpad USB MIDI to ‘normal’ MIDI IN/OUT although it makes interfacing awkward. Then I could continue with the S2 and CP, using the USB MIDI as the output.
adding that to mpconfigboard.h should do it, with the correct pins (those are the ones for the ESP32-S3 DevkitC)
#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44)
#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43)
here is an article pointing to multiple projects providing USB-midi solutions
https://diyelectromusic.wordpress.com/2022/03/22/arduino-and-usb-midi/