Making music with Ultrasonic Sensors, MIDI, and a Raspberry Pi

I have been working on a fun project to make an exhibit for my local makerspace to take to events. I had a ton of spare ultrasonic sensors lying around so I decided to experiment with turning them into a musical instrument using a Raspberry Pi running a software synth.

This project has now been featured on Hackaday! There is also a very detailed Instructable if you want to replicate this project.

The code is very simple. The Raspberry Pi is polling each sensor (with the help of an octasonic breakout board that I designed about a year ago) and translating the distance into a MIDI instruction ("note on" or "note off"). These MIDI instructions are then piped into the stdin of a fluidsynth process, which converts the MIDI instructions into music.

This is my first exposure to MIDI and I love how simple it is to hack music. I'll post an update once we have this project finished and mounted on a frame.

Contact Me

Buy My Things!

I sell on Tindie

Recent Posts

Sparkfun AVC

2014 2015 2016

Archived Posts

2012 2013 2014 2015 2016 2017