Playing music at end of print ...
February 02, 2021 02:19PM
I want to be able to play a song over the speaker fitted to my MK3 I3 at the end of a print job and repeat it until I come and stop it.

With the music on the SDCard I can play it via the serial connection with :-
M23 /MUSIC.GCO
M24
and I can repeat it by reentering the same commands :-)

However, when I add this to the end of job gcode (in SLIC3R's setup) the job completes OK and the controller shows MUSIC.GCO on the controller screen but it doesnt play!

Here is my end of job GCODE :-
M104 S0 ; turn off heater
G91 : Switch to relative position mode
G1 Z10 F250 ; lift nozzle by 10mm
G90 : Go back to absolute mode
G1 X0 Y170 F2000 ; move bed Y axis out so work is accessible
M84 ; disable motors
: Tell everyone we've finished
M23 /MUSIC.GCO
M24

... is there something else I need to do to get it to play ??

Regards - puzzled,
Dave
Re: Playing music at end of print ...
February 07, 2021 04:27PM
It probably has to do with the MUSIC.GCO file, not your end script. Could you maybe post it?
I suppose you are using M300 in your MUSIC.GCO, and it looks like you need a speeker and not just a buzzer: [marlinfw.org]
Re: Playing music at end of print ...
February 08, 2021 05:01AM
Hi, thanks for the reply - a speaker IS fitted, and the file music.gco DOES play with :-

M23 /MUSIC.GCO
M24

but just not at the end of a print job.

After further research I have discovered that the way to play a .GCO file from within a .GCO file is to use the following command :-

M32 P !/MUSIC.GCO#

and it works very well.

Thanks all,
Dave
Sorry, only registered users may post in this forum.

Click here to login