Glen Akins Turns MIDI Control Surfaces Into Quick-Boot Soundboards, with a Raspberry Pi RP2040

TinyUSB library delivers the ability to trigger audio file playback from microSD cards on receipt of MIDI-over-USB messages.

Gareth Halfacree
13 minutes agoMusic / 3D Printing / HW101

Maker Glen Akins has released an open source MIDI soundboard, designed with live streaming in mind — and capable of playing pre-recorded sound effects out through either an integrated or external speaker via instructions from a connected MIDI control surface.

"This project is a follow on to my Lizard single-purpose soundboard project but supporting many more buttons and audio samples," Akins explains of the build. "That project already had the hardware to support tons of audio samples but the number of buttons was limited by the number of available microcontroller pins. After some research, I decided the most practical way to add lots of robust buttons to the project was to use an off-the-shelf MIDI controller like the Midi Fighter Spectra or Novation Launchpad Mini MK3."

Traditionally, a MIDI control surface is used to trigger samples and beat patterns via MIDI commands sent to either a synthesizer or software running on a desktop or laptop. Akins was looking for something self-contained, though: "I didn’t want to use a PC to play back sounds," he explains, "because I wanted something small and reliable that booted quickly and had a minimal risk of systems sounds making it into the live audio."

The solution: a Raspberry Pi RP2040 microcontroller, running TinyUSB with its integrated MIDI-over-USB support. Built around the Raspberry Pi Pico development board, the initial version of the build included an I2S amplifier connected to a built-in speaker; later development delivered two variants built around the smaller Adafruit QT Py RP2040 development board, one of which is designed to include an integrated speaker with the other delivering playback over a line-level output for integration into streaming or other external audio systems.

The only real stumbling block in the project was an issue with stuttering audio, which a debugging session eventually traced not to a software problem but the performance of the microSD card used to store the samples for playback. "The microSD card I was using would periodically take 22ms to complete the read block command," Akins explains, "and it'd do this for six read block commands in a row! The solution turned out to be an easy fix: I changed to a different brand of microSD cards and the problem disappeared."

The project is documented in full on Akins' website, with source code, PCB design and production files, and 3D-print files for both variants' cases plus control surface stands available on GitHub under an unspecified license.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles