The Problem: I wanted to use an Akai LPK25 USB MIDI keyboard with legacy hardware synthesizers, but it lacked a 5-pin DIN or TRS MIDI output. It only spoke USB MIDI, which normally requires a full PC host.
The Architecture:
Akai LPK25 -> USB -> [Waveshare RP2350-USB-A (USB Host Stack)] -> UART -> 3.5mm TRS MIDI Out
The Build:
Using the Raspberry Pi Pico SDK and the TinyUSB library, I engineered custom C++ firmware for the RP2350 microcontroller. The Waveshare board handles the USB Host negotiation natively. The firmware parses incoming USB MIDI packets in real-time, extracts the Note On/Off, Velocity, and Control Change data, and re-transmits it over the RP2350's hardware UART formatted for standard MIDI (31250 baud).
I also integrated a hardware panic button using physical interrupts to broadcast an "All Notes Off" command (CC 123) across all 16 MIDI channels, preventing stuck notes during live performance.