Hands-free Raspberry Pi Airdrum | The MagPi 89

We’re always going to beat the drum for projects that seek to improve the lives of people with disabilities. That’s why we fell in love with the Airdrum, which was created to allow anyone, in particular people with disabilities, to play a musical instrument.

The Airdrum – speaker and MIDI song demo

This video demonstrates the speaker functionality with playing a song from a midi file on the Raspberry pi using Fluidsynth. (The hand movement is just for fun) The Airdrum is powered by a power supply for demonstration purposes.

Raspberry Pi Airdrum

Designed by two Dutch electrical engineering students, Alessandro Verdiesen and Luuk van Kuijk, the project came to life during their first year at university. “We aimed to develop a musical instrument that could be used to generate music by moving,” explains Alessandro, who has recently been working on a fully modular version 2.0.

After speaking with therapists and health care institutions, the pair decided to make a drum that could be played by moving objects above a set of panels and they put Raspberry Pi at its heart. “The basic functionality of the Airdrum is to detect the distance of an object above each connected panel and play a sound,” says Alessandro. “These panels contain IR distance sensors and coloured LEDs for visual feedback.”

Sorting the bass-ics

From the outset, Alessandro and Luuk needed their project to be accessible, affordable, adjustable and, in the latest iteration, modular, with each drummable section containing an Arduino Mini, an IR sensor, and LEDs. They also wanted the instrument to have a broader appeal and be suitable for everybody, including professional musicians, so it had to sound as good as it played.

“We needed it to be as versatile as it can be and allow people to choose custom sounds, colours, and lights while being a standalone instrument and a multi-purpose input/output device,” Alessandro reveals. To make it easy to place the modules together, they used magnetic connections between the panels. This allowed them to be placed together in various configurations, with a minimum of two per Airdrum.

These speaker modules can bookend the sensor panels, although the sound can be outputted via the Raspberry Pi to a different sound system too

With a structured plan that divided milestones into electrical, mechanical, and software components, the pair used 3D printing for the enclosure, which allowed rapid prototyping for quick interactions. They used speaker panels to bookend the modules for auditive feedback.

Panel beating

Each of the panels includes a buck converter so that the current through the connectors can be drawn to a minimum. The master module panel contains Raspberry Pi 3 running custom programs written in C and Python, as well as the free, open-source software synthesiser FluidSynth. It connects to the other panels through I2C, constantly polling the panels for their measurements and for the configuration of their colour.

“If an object has been detected, the Raspberry Pi generates a sound and outputs it on the AUX audio jack,” says Alessandro. “This output is then used by the mono D-class amplifiers in the speaker panels to make the tones audible.”

Custom-made Airdrum detecting modules fit snugly into their 3D-printed cases and can be arranged in a full circle if you have enough of them

The pair chose Raspberry Pi because of its versatility and technical prowess. “The Airdrum needed something powerful enough to run software to generate audio through MIDI using the input from the panels and the Raspberry Pi is a great universal and low-cost development board with integrated DAC for audio,” explains Alessandro. “It also has a I2C bus to act as a data transfer master unit and they’re compact enough to fit inside of the casing. The Raspberry Pi enables easy implementation of future upgrades, too.”

Indeed, the pair want to explore the MIDI possibilities and connect the Airdrum with a smartphone or tablet. An app is being planned, as is a built-in synthesiser. “The people we have shown the Airdrum to have been very enthusiastic,” Alessandro says. “That has been very motivating.”

Read The MagPi for free!

There’s loads more amazing projects and tutorials in The MagPi #89, out today, including our 50 tools and tips for makers, and a huge accessory guide! You can get The MagPi #89 online at our store, or in print from the Raspberry Pi Store in Cambridge and all good newsagents and supermarkets. You can also access The MagPi magazine via our Android and iOS apps.

Don’t forget our amazing subscription offers either, which include a free gift of a Raspberry Pi Zero W when you subscribe for twelve months.

And, as with all our Raspberry Pi publications, you can download the free PDF from our website.