Human brains are wired for music. Scientists think the oldest musical instruments were flutes that date back somewhere between 67,000 and 37,000 years ago. We assume though that people were banging on wood or their thighs, or knocking two rocks together long before that. Almost anything can be a musical instrument. A case in point: [elifer5000] walked into a room containing a lot of running 3D printers, and thought it seemed musical. Next thing you know, he harnessed 3D printers as a MIDI instrument.
At a hackathon, he found some software that converts a MIDI file to GCode. The only problem is a common printer has three axes and, therefore, can only produce (at most) three notes at once. The obvious answer to this problem is to use more printers, and that’s what he did, as you can see below.
Apparently the speed the stepper motor moves is proportional to the pitch of the tone it emits. Of course, the distance of travel at a given speed corresponds to how long the tone will endure. Given that, it is a pretty simple math problem to figure out the parameters of the note.
Common printers have a slow Z axis, so the final product only uses the X and Y axis on each printer. That means you might even be able to use a CNC machine or a plotter as part of your printer orchestra.
One problem arose when trying to handle a MIDI file in realtime. When you start a note, you don’t know how long it will last. You will only know the note has ended when it stops. That makes sense when you remember that a MIDI keyboard won’t know how long you will press a key when you first push on it. The code uses a small “micronote” of 50 milliseconds and plays it until the stop signal arrives.
The Python code takes a bit of calibration because every printer is a little different. The result is — as you might expect — a bit electronic, but pleasing enough and sure beats two rocks. We’ve seen music played on floppy drives and hard drives before. Or, you can go the other way and use a hard drive as a microphone.
Move over, Floppotron.
Sacrilege!!!
I like the Floppotron better than this. At least on this demo it just doesn’t sound that great, and the Floppotron has way more retro appeal.
But all I’ve ever seen the Floppotron do were pre-programmed sequences. This is able to operate in real time, using MIDI. That’s a bunch of extra points, in my book.
That is a pretty good point. Realtime anything is awesome.
Hi, I’m the author of the video.
I had heard of floppy drives and dot matrix playing music before, but frankly didn’t have the knowledge at the time to understand what was driving the sound. It was only after starting to try ideas during that hackathon that I discovered that it was the stepper motors that were making the sound.
What I didn’t see at the time (this was 2 years ago), was any of those projects trying to control it in realtime. I thought that was the innovation I brought to the table. I haven’t checked if someone has done that since.
I agree that the sound here is not the best. It’s only from the phone’s microphone. With the tension of showing this to a roomful of my co-workers I had forgotten to record the audio input in the computer.
The next year, when we had a hackathon again (and now a bit more knowledgeable), I expanded on this idea by controlling 5 stepper motors directly with an Arduino. This allowed much finer control, as well as creating effects such as vibrato, pitch shifting, stuttering, directly on the motors. You can see it here:
https://youtu.be/GinPW0C-tOg
This time I was prepared to record the audio, but my battery was drained while I waited for my turn, and I had to restart everything while the crowd waited. Oh well!
Oh wow! That definitely goes above and beyond the Floppotron in several ways!
Dang, after all that time we spent trying to make printers quieter…
Now someone should make printer play imperial march during (or just after) printing of vader’s helmet.
Floppotron?!?! What about BD594 back in 2009 playing music on a HP scanner and 8″ floppy drive long before it was popular. I also recall people playing music via a CPU on AM frequencies. This is not new however any thing with a coil can play music.
Playing music via a CPU on AM frequencies sounded so farfetched that I had to look it up, and found it here:
https://github.com/fulldecent/system-bus-radio
Wow! Thanks for the tip! Now just need to test this with an AM radio…
It’s true, anything with a coil can play music, but I think part of the fun is discovering how you can hack devices with coils to coerce it and make music. My favorite that I saw lately was tesla coil music.
More fun are large delta printers. Because of the way that the speed varies — even on “simple” linear moves — sometimes they sound like they are talking to you.
Or maybe it’s just me.
But I don’t have actual conversations with them.
Only rarely…
I’ve seen this done on a Tormach PCNC. Here’s a video of someone playing the mario theme on a cnc router 3 years ago https://www.youtube.com/watch?v=cxHQpyB4vAE
Four axes. Hence, four notes. Plus the cooling fan whine if you don’t use fast PWM.
My antique replicator made a most satisfying sound while printing round things. Like a computer in an old sci-fy show. New Sidewinder X1 is so quiet.
It happens that absurd inventions give impetus to create something great, I hope it will be the same here.