How to make your 3DPrinter Sing

Choose a song and hit on PRINT!

4 1,040

Get real time updates directly on you device, subscribe now.

How to make your 3DPrinter Sing
5 (100%) 3 votes

The Internet is an amazing place. And we can find all sort of content related to 3DPrinting.

Most of the printers can be controlled with an Arduino, and the premise of an Arduino is to connect all kind of sensors, small engines or a buzzer…

So first things first. Let’s go to our RepRap Wiki to see our GCode Commands list. If you search for a command like M300 you will find this:

M300 Command

 

 

That is the first thing that we need to make this The Voice Printer.

Make your printer play the beep on the buzzer can help you on two things: Tell you that it’s about to start a print job after the heating, home and bed leveling, and tell you that the print job it’s finished. However, nothing stops you to make that noise something nice to hear(And not make your ears bleed).

Well, so what do you need to do this:

  • Check if your firmwares support the M300 command
  • Connect a buzzer to your printer
  • A GCode file.
  • Choose the song that you want to play

The M300 command needs to have two inputs, the S parameter that will receive the frequency in Hertz that the buzzer will play the song and the P parameter that will be for how long the song will play. So, using a few M300 on your GCode you can make a Symphony.

What I found is that you need RTTTL text. RTTTL stands for Ring Tone Text Transfer Language, this language was developed by Nokia a lot of years ago to make your phone play custom songs. So around the web, you can find a lot of RTTTL samples that you can use on your printer. Here is a example of how a RTTTL code looks like:

[code]

smb:d=4,o=5,b=100:16e6,16e6,32p,8e6,16c6,8e6,8g6,8p,8g,8p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,16p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16c7,16p,16c7,16c7,p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16d#6,8p,16d6,8p,16c6

[/code]

Wait a minute… Lays, How am I going to use RTTTL text? I need a GCode!

Do you remember that 3DPrinting is what it is today because of the Community? So, don’t fear my friend, I have the solution. =D

Colin Edwards, most known on GitHub by the name DDRBoxman created a system that gets the RTTTL code and turns into a GCode snippet that you can append to your GCode file. So, the RTTTL sample that I used above, in GCode flavor looks like this:

[code]

;smb
M300 S2637 P150
M300 S2637 P150
M300 S0 P75
M300 S2637 P300
M300 S2093 P150
M300 S2637 P300
M300 S3135 P300
M300 S0 P300
M300 S1567 P300
M300 S0 P300
M300 S2093 P300
M300 S0 P150
M300 S1567 P300
M300 S0 P150
M300 S1318 P300
M300 S0 P150
M300 S880 P300
M300 S987 P300
M300 S932 P150
M300 S880 P300
M300 S1567 P225
M300 S2637 P150
M300 S3135 P150
M300 S1760 P300
M300 S2793 P150
M300 S3135 P300
M300 S2637 P300
M300 S2093 P150
M300 S2349 P150
M300 S987 P300
M300 S0 P150
M300 S2093 P300
M300 S0 P150
M300 S1567 P300
M300 S0 P150
M300 S1318 P300
M300 S0 P150
M300 S880 P300
M300 S987 P300
M300 S932 P150
M300 S880 P300
M300 S1567 P225
M300 S2637 P150
M300 S3135 P150
M300 S1760 P300
M300 S2793 P150
M300 S3135 P300
M300 S2637 P300
M300 S2093 P150
M300 S2349 P150
M300 S987 P300
M300 S0 P300
M300 S3135 P150
M300 S2959 P150
M300 S2793 P150
M300 S2489 P150
M300 S0 P150
M300 S2637 P150
M300 S0 P150
M300 S1661 P150
M300 S880 P150
M300 S2093 P150
M300 S0 P150
M300 S880 P150
M300 S2093 P150
M300 S2349 P150
M300 S0 P300
M300 S3135 P150
M300 S2959 P150
M300 S2793 P150
M300 S2489 P150
M300 S0 P150
M300 S2637 P150
M300 S0 P150
M300 S4186 P150
M300 S0 P150
M300 S4186 P150
M300 S4186 P150
M300 S0 P600
M300 S3135 P150
M300 S2959 P150
M300 S2793 P150
M300 S2489 P150
M300 S0 P150
M300 S2637 P150
M300 S0 P150
M300 S1661 P150
M300 S880 P150
M300 S2093 P150
M300 S0 P150
M300 S880 P150
M300 S2093 P150
M300 S2349 P150
M300 S0 P300
M300 S2489 P150
M300 S0 P300
M300 S2349 P150
M300 S0 P300
M300 S2093 P150

[/code]

Those samples are from a game that everyone knows, and I will let you discover which one is it. (I wasn’t able to add the audio here =/ )

So, Lays, that looks fun, but How am I going to do all that?

Sit back and enjoy life for a second now.

First, you can find all kind of Arcade songs on this website, there you can get the RTTTL code and convert to GCode on Colin website, after that you just need to copy the generated GCode and add to the begin or end of your GCode. If you don’t want an Arcade song, you can put the name of the song and append RTTTL in the and on Google and search around until you find your song.


Well, let me know in the comments if you found out which song I used in this post! Don’t forget to subscribe our mail list to get all the news.

Enjoy Life!

That’s all folks!

Get real time updates directly on you device, subscribe now.

4 Comments
  1. Michael Perkins says

    Pretty cool little hack

  2. RedbaronFPV says

    Could all 5 axis be used in the musical creation, for a printer symphony?

  3. Tom Baxter says

    I have heard of using GCode to make music with your stepper motors, but not by actually hooking up a speaker/buzzer to the printer. This is pretty cool!

    Oh.. I believe that the theme belongs to a game starring our two favorite princess saving plumbers! 🙂

  4. Bjørnar says

    Cool, might have to test this one out

Leave A Reply

Your email address will not be published.