This Robotic Slide Whistle Can Play All the Hits

Mitxela’s most recent project has finally made slide whistles cool.

Cameron Coward
4 years agoMusic / Robotics

There is a good chance that the first musical instrument that you ever played was a slide whistle, and yet those iconic instruments always seem to be relegated to dusty cardboard boxes in the offices of Foley artists. Like recorders and kazoos, slide whistles aren’t treated like “real” instruments, which is unfair. They’re perfectly capable of producing a range of notes. If we’re going to say that trombones are legitimate instruments, then we have to accept slide whistles, too. To prove how beautiful slide whistle music can be without having to actually master the instrument, Mitxela built this amazing MIDI-controlled robotic slide whistle.

Slide whistles are incredibly simple instruments, which is why they’re popular kids toys. It’s just a whistle that has an internal plunger to adjust the length in order to change the pitch of the note being played. Basically, it is a continuously-variable pan flute. To play it, you just blow in one end while you move the plunger in and out. Because there is a smooth translation from one note to the next, you get that classic Foley sound effect if you keep blowing as you move the plunger. But as long as you stop blowing between notes, you can get a sort of flute-like sound. Best of all, slide whistles are dirt cheap and can probably be found in the toy aisle at your local dollar store.

While Mitxela actually seems fairly skilled at playing the slide whistle, he figured he could achieve better results by taking advantage of the precision of digital control. He put a cheap plastic slide whistle into a laser-cut wood frame. Two high-quality Dynamixel AX-12 servo motors are used to pull the plunger in and out, while a third servo motor opens and closes a valve on the fipple (mouthpiece) to stop air flow. The air is provided by the same sort of air pump that you’d use to blow up an air mattress, but that has been modified so that Mitxela can control its power. That was necessary because the air pressure affects the note being played and higher notes require more pressure.

The steps between notes on a slide whistle are not consistent, meaning the distance you need to move the plunger to move from an A note to a B note is longer than moving from an F note to a G note. To determine which positions corresponded to specific notes, Mitxela setup a script to move through the entire scale while recording the output. That provided him with a map of the notes. He then used a Microchip ATmega328P microcontroller to control the servos in order to move the plunger to whichever note he required. The ATmega328P receives MIDI input, which means that Mitxela can play music on a MIDI controller or feed data from a MIDI file and the slide whistle will happily play along. I think it’s safe to say that this project has dramatically increased your respect for the humble slide whistle and Mitxela’s musical skills.

Cameron Coward
Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles