Plays a music at the end of a print



IIt is possible to play some music (8bits) at the end of your prints in the following cases:

  • If you have a LCD display with a Buzzer
  • If you electronic board supports an audio output
  • If your firmware supports M300 commands (Marlin, Repetier)

How does it work?

It is possible to  generate a certain amount of Audio sounds by modulating the output signal of the Display Buzzer.

M300  Gcode command allows to do just that.

You can have the full command details by looking at the dedicated page ::

Can I find existing sounds/musics?

There are some tools that already exist. They allow you to convert any RTTTL format ringtones into M300 compatible Gcodes.

You can find one here: : , it’s an online generator that can convert Ringtones into M300 compatible Gcodes.

This generator also allows to render the audio output of each convertion.

However, if you want a pack of already converted songs with more than 11000 ringtones check this link:

You will also find a batch convertor here::

With the originals ringtones here:

How to proceed?

Each converted file has  Gcode extension.

Each .Gcode file is a simple text file that you can open and edit with a standard text editor such as notepad++, notepad or any other.

Here is an example of what is inside one of these converted files:

Open your slicer:

Each slicer should allow you to customize at least the start and the end of your gcode.

The part that we are looking for is to customize the end of our gcode, so that the music will play once the print is over.

The sollowing example is done using Cura .

In the Tab section of cura you will see « Start/End-GCode« .

inside you should be able to choose « end.gcode » from a list

Then a text zone will appear at the bottom with some text in color.

This text are the actual instructions used by your 3D printer when the print is finished.

Now you only need to copy/paste the content of your M300 converted ringtone file into the end of the text editor.

This is it!

now you can slice normaly any 3D object you want, your music will be played at the end of each new prints.

How to easily test your converted files?

Depending on your firmware version, the audio output of the songs might be crapy (For example,  marlin version before 1.1.0.RC3 better handle the audio output)

So it’s very interesting to test those songs before using them everywhere.

You can copy/paste the already converted files (with .gocde extention) into a SD card and play them directly from your LCD display.


Due to some memory restriction, firmwares are often limited to display a maximum amount of files per folder.

Adding directly the 11 000 files inside a single folder will most likely crash your firmware when it will try to list all the files.

So it’s advised to only test a pack of 20 or 30 files max per forlder.