Turn your printer into a Juke Box.
-
If you happen to have a PanelDue, you can use the internal buzzer to play tones with the M300 command. In the past I've used this feature to compose some little tunes to play when starting or ending a print, and occasionally I've converted some arduino piezo buzzer code to play some more complicated songs. But now there is a tool available (not mine) that will convert a complete midi song into gcode commands, which allows for some rather impressive music playback.
Tool here: https://alexyu132.github.io/midi-m300/
GitHub here: https://github.com/alexyu132/midi-m300
Video example here: https://www.reddit.com/r/3Dprinting/comments/g3lqm2/i_wrote_a_program_that_converts_midi_files_to/
Example Gcode output if you want to test it out: TetrisA.g
Simply download any midi song you want from the internet. It generally works best with single instrument midi files, but even multi instrumental tracks work surprisingly well. Upload it to the tool, choose which instruments to include (might need to experiment), check the box for Duet support which adds G4 commands after each tone to give it time to play, and then generate the gcode. You can preview it right there, and if it's to your liking, copy and paste the gcode into a text file, save it with a filename and .g extension, and upload it to the macros folder of the Duet. Run the macro to enjoy.
(Note: If you don't have a PanelDue connected, it will still play the tones through the DWC if you're connected. I haven't tested it with the 12864 display connected to a Maestro, but it may also work.)
-
great stuff!
@Phaedrux said in Turn your printer into a Juke Box.:
I haven't tested it with the 12864 display connected to a Maestro, but it may also work.
it does (even on the Wifi with some elbow-grease:)
it will still play the tones through the DWC if you're connected
my experience is this doesn't work as well, but could be performance issues, or old bugs as I haven't tried lately.
-
oh, and challenge accepted?
https://www.youtube.com/watch?v=NATZy-ZqD7A&feature=youtu.be&t=10 -
uh, no thanks!
-
@Phaedrux Too bad I don't have panel due.
-
@evomotors said in Turn your printer into a Juke Box.:
@Phaedrux Too bad I don't have panel due.
as it uses the standard M300 code it
shouldcould work with 12864 based displays that are cheap as chips; and as of 3.2 should be supported for Duet 2 Wifi as wella s Duet 2 Maestro. (just make sure to get the correct chipset for your board) -
The 12864s I tried had simple buzzers without tone modulation ... Caveat emptor
-
@bearer said in Turn your printer into a Juke Box.:
@evomotors said in Turn your printer into a Juke Box.:
@Phaedrux Too bad I don't have panel due.
as it uses the standard M300 code it
shouldcould work with 12864 based displays that are cheap as chips; and as of 3.2 should be supported for Duet 2 Wifi as wella s Duet 2 Maestro. (just make sure to get the correct chipset for your board)I'm on Duet 3 with SBC. I wonder if one of the spear connectors on Duet 3 can be used for this
-
@evomotors said in Turn your printer into a Juke Box.:
Duet 3 with SBC
suspect you'd need to tinker with the firmware to pull that off, and then it might be easier to try to deal with it on the SBC - or let DWC take care of it, however i've not found DWC to 100% flawless with playback of M300 sequences.
-
@bearer said in Turn your printer into a Juke Box.:
@evomotors said in Turn your printer into a Juke Box.:
Duet 3 with SBC
suspect you'd need to tinker with the firmware to pull that off, and then it might be easier to try to deal with it on the SBC - or let DWC take care of it, however i've not found DWC to 100% flawless with playback of M300 sequences.
I tried with DWC, doesn't sounds right.
-
@evomotors if you're not using an 12864 you can still enable it and then use the buzzer pin to drive whatever you want. It'll silence DWC as well.
-
Afaik Duet3 6HC isnt built with support for that? So hacking something in the pi might be easier than maintaining a fork.
-
I missed the duet3 mention (-;
-
Hmm... The PanelDue 3.0 buzzer seems to be a DC version that has a built-in frequency generator and a little "+" on the housing indicating its polarity?
Was that different in earlier versions? -
@mh said in Turn your printer into a Juke Box.:
Hmm... The PanelDue 3.0 buzzer seems to be a DC version that has a built-in frequency generator and a little "+" on the housing indicating its polarity?
Was that different in earlier versions?This post might better belong as a new thread in the paneldue forum for better visibility.
-
-
-
-
-
-
-