Crowdsourced concerts with a Raspberry Pi


An idea that I’ve been bouncing around in my head over the past year or so is audience participation in live music - enabling members to play a part in a performance using their mobile phones.

The design I came up with is built around the following requirements:

  • Portability: Taking advantage of it should be as easy as plugging it in and “pressing play.”
  • Simple implementation: I want my friends to be able to utilize this too, without having to understand the code or install extra software dependencies.
  • Control: It should be possible to toggle the tool and assign participants on-the-fly, and it would be nice to have control schemes that can change during a set.
  • Quality: Most importantly it needs to sound good, regardless of what a participant does. This is the most interesting challenge.
Early UI design for the client-facing web app.
Early UI design for the client-facing web app.

I managed to develop a working prototype earlier this year. It centers around a Raspberry Pi using a Pisound HAT. Client devices can visit a web app which connects them to a WebRTC gateway to communicate their controls to the Pi unit. As far as implementation and portability goes, I’m proud of the angle that I took: only a single MIDI cable is required to connect to a performer’s computer.

I wrote the software in NodeJS. This app filters incoming parameter changes from clients and fits them into a queue component that I’ve been calling a “quantized scheduler” - control changes aren’t sent to the host computer until an appropriate time. Drums should play on beat and that cool stutter effect should synchronize with the song tempo. Using a second MIDI cable enables 2-way communication between the Pi and the host, making synchronization virtually flawless - the Pi is then able to predict time markers by listening to an incoming clock signal and schedule outgoing packets accordingly. This sort of functionality is actually something that I’ve worked into my own live sets in the past to protect myself from ruining my own shows - consequently this ended up being one of the easiest parts for me to make!

I’m excited to eventually get this done, but it’s still missing some important features - namely an administrative interface and a tool to design custom control layouts.