/macropadsynthplug

Abuse StemmaQT port by turning it into Audio Out + MIDI In

Primary LanguagePythonCreative Commons Zero v1.0 UniversalCC0-1.0

MacroPadSynthPlug!

abuse MacroPad RP2040's StemmaQT port by turning it into Audio Out + MIDI In

Get one now at Tindie!

Demo video on Youtube: CircuitPython drum machine demo

What is this?

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 the StemmaQT port (but is not I2C!) and gives you TRS-A MIDI In and Audio line out.

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)

How?

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, or maybe as GPIO pins.

But with the RP2040, those two StemmaQT pins, can be:

  • SDA - GP20 - UART1 TX - PWM2B
  • SCL - GP21 - UART1 RX - PWM2A

This means we could use the StemmaQT port for all sorts of musical things, like:

  • MIDI In / Out!
  • Stereo PWM audio out!
  • MIDI In / Audio Out (Hey this is what MacroPadSynthPlug does)

To get audio out, all we need is a small PWM filtering circuit. To get MIDI in, a small optoisolator circuit is needed. MacroPadSynthPlug is just this.

This is sort of 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 it's normal use.

Why?

Seems like fun? I have built many RP2040-based little hardware synths, like:

and wanted the MacroPad RP2040 to join in the fun.

Does this work for other boards with StemmaQT?

Short answer: not really

For any non-RP2040-based board, this almost definitely will not work.

And while the RP2040 is a very configuraable, not all functions are availbe on all pins. So it probably won't work on other RP2040-based boards too. For instance:

  • QTPy RP2040? Sorta. Its StemmaQT SDA/SCL is on GPIO22/23, which has PWM but no UART RX
  • KB2040 "Keeboar"? Yes! Its StemmaQT SDA/SCL is on GPIO12/13, which has PWM & UART0 RX!

Are these for sale?

Yes! Get one now at Tindie!

Action shots