Pulling Music Out Of Thin Air with a Raspberry Pi

Pianos are great instruments, but being rather heavy and requiring a fair amount of space they are certainly not known for their convenience. Sure, there are more portable varieties available, but they rarely resemble the elegance and classiness of a grand piano. One option is of course to build a downscaled version yourself — and since you’re already customizing the instrument, why stop at the way you play it. [2fishy] didn’t stop there either and ended up with a wooden, space friendly, light controlled piano housing a Raspberry Pi.

Inspired by the concept of a laser harp, [2fishy] followed the same principle but chose a simpler and safer alternative by using LEDs instead. For each playable tone, a LED is mounted opposite a light dependent resistor, creating an array of switches that is then connected to the Raspberry Pi’s GPIO pins. A Python script is handling the rest, polling the GPIO states and — with a little help from pygame, triggering MIDI playback whenever the light stream is interrupted.

There are enough LED/LDR pairs to play one full octave and have some additional control inputs for menu and octave shifting. This concept will naturally require some adjustments to your playing — you can get an idea of it in the demonstration video after the break. And if this design is still not the right size for you, or if you prefer to play in total darkness, this similar MIDI instrument using ultrasonic distance sensors could be of interest.

Continue reading “Pulling Music Out Of Thin Air with a Raspberry Pi”

Wireless MIDI Floor Piano!


[Jianan Li] just finished documenting one of his most recent projects, a wireless MIDI floor piano that he and a small group made for Duke University’s Hackathon!

He was inspired to do this project after reading our recent coverage on a DIY Pressure Plate. Having only 24 hours to compete in the Hackathon, they had to choose something that was fairly easy to build out of cheap materials, and quick to assemble. This was just the ticket.

The piano features 25 of the aluminum foil pressure plates, whose state are read by the Arduino Mega. This is then transmitted by an XBee radio to an Arduino Uno, which acts as the receiver for the laptop that processes the signals. They even added a remote control using an ATtiny85 to allow for octave and instrument changes — it also uses an XBee to communicate back to the Uno. For a 24 hour build, the quality is quite impressive, and it doesn’t sound half bad either — Take a listen after the break!

Continue reading “Wireless MIDI Floor Piano!”