3D printing some sweet music

3d-printer-music

If you don’t mind ending up with oddly shaped 3D printed parts you can get your printer to sing to you. The exhibit shown above is doing just that. The Lulzbot is being driven specifically to produce a certain frequency of sound with its stepper motors. The results of a few different songs are what’s hanging on the wall to the right. You can hear it printing Bizet’s Carmen in the clip after the break.

[Rickard Dahlstrand] hacked together a Python script capable of parsing a MIDI file and outputting a G-code equivalent that will produce the frequencies and durations necessary to hear the audio on a stepper motor. As we mentioned, he uses a Lulzbot but the script appears to include setting for Cupcake, Thingomatic, Shapercube, and Ultimaker. The parser script as well as the example G-code files for a library of classical music can be downloaded from his repository.

Now if you’re looking for some other crazy CNC music ideas you can’t beat this wineglass music hack.

29 thoughts on “3D printing some sweet music

    1. its “art” i guess….
      that being said, just run the printer sans plastic, get the same tunes with zero mess.
      better still, listen to the REAL audio, much better quality :P

    2. It would be cool if, instead of moving the head randomly across the build surface, the machine was actually making a model related to the song as it moved. It would sound the same, but the model produced in the process could then be put into a device (maybe Kinect based) that could look at the model and then replay the song from the model alone.

      1. I bet you could do it. you’d just need to alter the speed of the motors, on their usual course, to play the notes. Might require a few pauses to sync the music with the build.

        Tho with the speed of 3D printers, 4 hours of low-quality MIDI squawking might be more than you could cope with.

        1. its pretty challenging to do this because the relative speed of each axis (in relation to the others) is dictated by the 3D model. The easiest way I could imagine doing this is printing an object made up entirely of 45 degree angles — that way at least the X and Y will be operating at equal speeds.

          I think it would be very difficult or impossible to make a printer play nice sounding music while printing an arbitrary object.

  1. Just to clarify and give credit to the right people. The python script mid2cnc.py was originally written by Miles Lightwood and adapted after that by lots of other smart people. I just hacked it to not only play the music but also extrude and print the results.

    Glad you liked it!!

    Rickard.

    1. Actually, by me originally :p The crusty original and a bit of discussion on the underlying math is at http://tim.cexx.org/?p=633 . I’m impressed how the quick-n-dirty script has grown into something much more polished at the hands of smart folks all across the internet. Kudos!

  2. Great! Would be even better if somehow made to play songs when printing ANY object. Of course, id would cost the speed, but would be adorable to listen songs while waiting for parts beeing printed…

    1. Because they’ve done that, along with literally every other electronic thing on the planet. (Even memory. Some early computer techs used writes to core memory to interfere with an FM radio, producing music.)

    2. Unfortunately too many in the hacker community & in the DIY community at large don’t or may never “get it”. Those who embrace 3D printers for “artistic ” or trinket/do-dad production for profit are going the be that sector that determines the fate of more inexpensive 3D printers being market to all of us. In the event I had access to 3D it’s highly unlikely that I’m employ this process, although I would buy print made by another if I liked how it looked. My point being, don’t to dismiss how others use tools, they are our companions so the economy of scale can result in less expensive 3D printers

    3. Unless there are inkjet printers that can place really thick layers of ink, that wouldn’t be the same. This makes an image that has depth to it & I suspect it’s appearance changes as you look at it from different angles & directions

  3. Crud, I’ve be beat to the punch. I’ve been working on a Ruby midi parser for 3D printers. Maybe I’ll finish it anyway.

  4. I seem to recall the Commodore 1541 drive’s head stepper motor was made to play that Daisy tune (also sung by HAL as he sort of died) in just the same way.

  5. History repeats.

    There was a program for the Commodore 64 that played “Bicycle built for two” using the stepper motor in the floppy drive.

  6. If extruding something edible, say sugar, one could indeed 3D-print sweet music.

    I’ll take Flight of the Bumblebee, thank you! Yum, yum.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s