How To Play The Imperial March On A 3D Printer

As 3D printing enthusiasts, we have all heard the not so sweet sounds stepper motors tend to create while they are printing an object. Once in a while, if planets align just right, some of the sounds coming out of the printer while printing an object will have a musical feel to it. Exploiting that concept, people have successfully been able to make their CNC machines sing for more than a decade.

Everything from regular CNC machines to more advanced laser and plasma cutters will use stepper motors to control the movement of individual axes, the position and speed at which those motors move is dictated by some code, usually G-Code (The one 3D printers use as well). CNC stands for Computer Numerical Control, meaning that even 2D printers and 3D printers are CNC machines at heart (their technical name would be CNC extruders, but 3D printer sounds way cooler).

By knowing the exact amount of steps it takes for a stepper motor to move one millimeter and by adjusting the speed and direction of the motor, we can make the motor resonate at a constant frequency. By repeating these movements one after the other at different speeds we create music.

Taking in account that everyone else has had their take at it, I decided to also have a go at it and make my own video, staring my Printrbot Simple Metal. Now that the teaser for the new Star Wars VII movie is finally out, I settled on the iconic Imperial March as a suitable tune.

The process consists of taking a MIDI file with the respective song and converting it to G-Code your printer can understand. It took me some time, as some of the channels inside the MIDI file weren’t corresponding well to the axes of the printer. I will make a tutorial soon on how to convert MIDI files to G-Code, so stay tuned for future updates. But just because I’m cool like that, I’m giving away the G-Code I used to shoot the video for freeeeeee. Just bear in mind, It was designed to work on the Printrbot Metal, so any attempts to run the code on a printer that has a lower build volume of less than 150 mm will potentially damage your printer. (More like 120mm, but have at least 150mm to give the printer room to breathe).

To run the code, first make sure that your printer has a higher build volume than 120 mm, reset your printer and home it, the code will automatically position the head of the printer on the zero position, as it is the reference point for all other coordinates in the code.

Failure to follow the instructions on this website correctly can end up damaging your 3D printer. I take no responsibility if such a thing happens.

To download: Right Click -> Save File As.

Thank you for reading, don’t forget to leave a comment if you have any questions.

One comment

  • I’m still learning from you, as I’m making my way to the top as well. I definitely liked reading all that is posted on your site.Keep the tips coming. I liked it!

Leave a Reply to Cheap Nike Air Cancel reply

Your email address will not be published. Required fields are marked *