Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Turn your printer into a Juke Box.

    Scheduled Pinned Locked Moved
    3D Printing General Chat
    6
    15
    3.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Phaedruxundefined
      Phaedrux Moderator
      last edited by Phaedrux

      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.)

      Z-Bot CoreXY Build | Thingiverse Profile

      A Former User? evomotorsundefined 2 Replies Last reply Reply Quote 5
      • A Former User?
        A Former User @Phaedrux
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • A Former User?
          A Former User
          last edited by

          oh, and challenge accepted?
          https://www.youtube.com/watch?v=NATZy-ZqD7A&feature=youtu.be&t=10

          1 Reply Last reply Reply Quote 0
          • mrehorstdmdundefined
            mrehorstdmd
            last edited by

            uh, no thanks!

            https://drmrehorst.blogspot.com/

            1 Reply Last reply Reply Quote 0
            • evomotorsundefined
              evomotors @Phaedrux
              last edited by

              @Phaedrux Too bad I don't have panel due.

              A Former User? 1 Reply Last reply Reply Quote 0
              • A Former User?
                A Former User @evomotors
                last edited by A Former User

                @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 should could 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)

                evomotorsundefined 1 Reply Last reply Reply Quote 0
                • oliofundefined
                  oliof
                  last edited by

                  The 12864s I tried had simple buzzers without tone modulation ... Caveat emptor

                  <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                  1 Reply Last reply Reply Quote 0
                  • evomotorsundefined
                    evomotors @A Former User
                    last edited by

                    @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 should could 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

                    A Former User? oliofundefined 2 Replies Last reply Reply Quote 0
                    • A Former User?
                      A Former User @evomotors
                      last edited by

                      @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.

                      evomotorsundefined 1 Reply Last reply Reply Quote 0
                      • evomotorsundefined
                        evomotors @A Former User
                        last edited by

                        @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.

                        1 Reply Last reply Reply Quote 0
                        • oliofundefined
                          oliof @evomotors
                          last edited by

                          @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.

                          <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                          1 Reply Last reply Reply Quote 0
                          • A Former User?
                            A Former User
                            last edited by

                            Afaik Duet3 6HC isnt built with support for that? So hacking something in the pi might be easier than maintaining a fork.

                            1 Reply Last reply Reply Quote 0
                            • oliofundefined
                              oliof
                              last edited by

                              I missed the duet3 mention (-;

                              <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                              1 Reply Last reply Reply Quote 0
                              • mhundefined
                                mh
                                last edited by

                                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?

                                Phaedruxundefined 1 Reply Last reply Reply Quote 0
                                • Phaedruxundefined
                                  Phaedrux Moderator @mh
                                  last edited by

                                  @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.

                                  Z-Bot CoreXY Build | Thingiverse Profile

                                  1 Reply Last reply Reply Quote 0
                                  • droftartsundefined droftarts referenced this topic
                                  • o_lampeundefined o_lampe referenced this topic
                                  • o_lampeundefined o_lampe referenced this topic
                                  • hareshPrajapatiundefined hareshPrajapati referenced this topic
                                  • jumpedwithbothfeetundefined jumpedwithbothfeet referenced this topic
                                  • Phaedruxundefined Phaedrux referenced this topic
                                  • Exerqtorundefined Exerqtor referenced this topic
                                  • First post
                                    Last post
                                  Unless otherwise noted, all forum content is licensed under CC-BY-SA