Posts | Comments

Planet Arduino

Archive for the ‘flute’ Category

It’s one thing to be able to transcribe music from a flute, and it’s another to be able to make a flute play pre-written music. The latter is what [Abhilash Patel] decided to pursue in the flute player machine, an Arduino-based project that uses an air flow mechanism and PVC pipes to control the notes produced by a makeshift flute. It’s currently able to play 17 notes, just over two octaves starting from the lowest frequency of E.

In order to play songs, the tones have to either be directly coded and uploaded to the Arduino, composed with a random note generator, or detected from a microphone. While a real flute can be used for the machine, [Patel] uses a PVC flute, constructed with some knowledge of flute playing.

The resonant frequency is based on the effective length, hole sizes, and pipe diameter, so it is fairly difficult to correctly tune a homemade flute. Nevertheless, calculating the length as c/2f where c is the speed of sound (~345 m/s) and f is the frequency of the note can help with identifying the location of the holes. [Patel] cut the PVC pipe and sealed off one end, drilling a blowing hole at 1.5 x the pipe diameter. After playing the flute, the end of the pipe was filled until the frequency exactly matched the desired note.

The hole covering uses cuttings of pipe attached to a cable connecting to a servo. The motors are isolated inside a box to keep the wires clear and area all able to be powered with 5 V. As for the software, the code is primarily used to control when the fan is blowing and which holes are covered to produce a note.

Listen to the flute play “My Heart Will Go On” from Titanic in the video below. Now the next step might just be making the flute playing machine automatically play sheet music – imagine the possibilities!

We aren’t sure this technically qualifies as music synthesis, but what else do you call a computer playing music? In this case, the computer is a Teensy, and the music comes from a common classroom instrument: a plastic recorder. The mistaken “flute” label comes from the original project. The contraption uses solenoids to operate 3D printed “fingers” and an air pump — this is much easier with a recorder since (unlike a flue) it just needs reasonable air pressure to generate sound.

automated-recorder-solenoid-driverA Teensy 3.2 programmed using the Teensyduino IDE drives the solenoids. The board reads MIDI command sent over USB from a PC and translates them into the commands for this excellent driver board. It connects TIP31C transistors, along with flyback diodes, to the solenoids via a terminal strip.

On the PC, a program called Ableton sends the MIDI messages to the Teensy. MIDI message have three parts: one sets the message type and channel, another sets the velocity, and one sets the pitch. The code here only looks at the pitch.

This is one of those projects that would be a lot harder without a 3D printer. There are other ways to actuate the finger holes, but being able to make an exact-fitting bracket is very useful. Alas, we couldn’t find a video demo. If you know of one, please drop the link in the comments below.

We have seen bagpipe robots (in fact, we’ve seen several). We’ve also seen hammering shotguns into flutes, which is certainly more melodious than plowshares.


Filed under: Arduino Hacks, ARM, musical hacks

If you take an object and turn it into something else, does that constitute a hack?  Can a musical robot call to question the ethics of firearms exports? If you take a disabled shotgun and turn it into a flute, does it become an art piece? Deep questions indeed — and deliberately posed by [Constantine Zlatev] along with his collaborators [Kostadin Ilov] and [Velina Ruseva].

The Last Gun — a mechano-robotic flute, as [Zlatev] calls it — is built from recovered industrial parts, played using compressed air, and controlled by an Arduino and Raspberry Pi. After graphing the annual arms exports from the United States, the installation plays a mournful tune for each year that they rise, and a jubilant theme for each year they fall.

While The Last Gun appears to be a modified and improved over the previous version — which looks somewhat like a mad engineer’s harp — details are sadly scant on the machining and build processes. However, left to their own devices, one can expect to see many more mechanically musical projects in this team’s future — wherein the actuating of servos pluck at the hearts and minds of its participants.

If instead you’re keen on a jam session with a more humanoid robot, that’s also an option.

[Thanks for the tip, Itay!]


Filed under: Arduino Hacks, musical hacks, Raspberry Pi


  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook