Turn MacroPad RP2040's StemmaQT port into Audio Out + MIDI In
The Adafruit MacroPad RP2040 is really fun and could be a great musical instrument, with its 12 keys, rotary encoder, OLED display, RP2040 chip, and 8MB of flash storage.
If it only had a way to get MIDI into it and Audio out of it! Well now you can, with MacroPadSynthPlug!
MacroPadSynthPlug is a small board that plugs into a StemmaQT / Qwiic port and gives you TRS-A MIDI In and Audio line out. It's not I2C, but is using those pins.
The MacroPad RP2040 can now be a stand-alone MIDI synth!
Examples provided for both CircuitPython and Arduino:
- drum_machine - CircuitPython-based drum sequencer (demo1,demo2 )
- dronesynth - Arduino Mozzi 12-oscillator drone synth (demo)
- remixer - CircuitPython-based song remixer (source)
- monosynth1 - Arduino Mozzi 2-oscillator bass monosynth w/ resonant low-pass filter (source)
The Raspberry Pi RP2040 chip on the MacroPad RP2040 is amazingly configurable.
Normally a port like the StemmaQT I2C port would only be usable as an I2C bus. With the MacroPad RP2040, the two StemmaQT pins have the possible functionality:
- MacroPad RP2040 StemmaQT SDA -- GP20 - UART1 TX - PWM2B
- MacroPad RP2040 StemmaQT SCL -- GP21 - UART1 RX - PWM2A
MacroPadSynthPlug is a simple combination of two circuits:
-
For MIDI in: StemmaQT SCL has an optoisolator circuit and TRS MIDI In jack
-
For PWM Audio Out: StemmaQT SDA has a PWM filtering circuit and Audio Out jack
This is an "abuse" of the StemmaQT port, as it's meant only for I2C devices. But it's safe, will not damage other StemmaQT devices, but it does mean you "lose" the StemmaQT port for its normal use with I2C.
Short answer: Yes, with caveats
-
For audio out, any board that can do PWM on StemmaQT SDA can use the Audio Out side of MacroPadSynthPlug
-
For MIDI In, any boards that can do UART In on StemmaQT SCL can do TRS MIDI input. A "software serial" for TRS MIDI In may work, and of course USB MIDI In will always work
This makes this list of boards this works with kinda small.
-
- with a PIO-based UART libary like
SerialPIO
oradafruit_pio_uart
- as an example, see qtpy_mpsp_synth
- with a PIO-based UART libary like
-
Raspberry Pi Pico or Pico 2
Seems like fun? I have built many little hardware synths, like:
and wanted the MacroPad RP2040 to join in the fun.