Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Solved Music skipping beats after firmware update (3.4.0beta6)

    Tuning and tweaking
    10
    28
    821
    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.
    • gtaman
      gtaman last edited by gtaman

      Hey everyone, I've been keeping myself busy by converting midi files to M300 so my printer can play them. After creating a playlist, I decided to update my board's software for the kicks. I upgraded from V2.something to 3.4.0beta6. I finally got it configured, but my music macros sound terrible now. It sounds fine for a couple seconds, and then it skips a couple notes before it sounds good again. I think the printer is doing other things in the background related to the new firmware while it plays the music. Is there any way to make it focus on the macro? Maybe a way to disable resource heavy functions such as networking for a bit? Could this be fixed in a update, or will it get worse as the updates get bigger and take up more space?

      Thank you,
      -Robert

      P.S. Worst part is, The printer prints better than ever now -_- Can't decide if I want print quality or Mario 64 music 😕 For a little beeper speaker, it did sound pretty good.

      deckingman DonStauffer nikscha 3 Replies Last reply Reply Quote 0
      • deckingman
        deckingman @gtaman last edited by

        @gtaman Seriously? You want your 3D printer hardware and firmware to focus more on playing music than other tasks?

        Ian
        https://somei3deas.wordpress.com/
        https://www.youtube.com/@deckingman

        gtaman 1 Reply Last reply Reply Quote 0
        • gtaman
          gtaman @deckingman last edited by gtaman

          @deckingman The last part was a joke, but I did prefer when it could do both. I haven't updated my Panel due yet, maybe that would solve it, but at the same time I don't want to get stuck even further into the upgrade. The only reason I wanted to upgrade was for the custom boot logo lol. Everything worked fine before 😛 Oh i guess heated chamber support too.

          Besides, it is a cool feature. It just got pushed to the side by the other heavy lifting. Sure It can still do a jingle, but what if I want to hear Beethoven's symphony when my print is done lol. But yes, If there was a way to halt everything until a macro is finished, that would be cool. Something like an interrupt?

          Oh, and I saw your 6 input hotend earlier, that thing is cool 🙂

          dc42 1 Reply Last reply Reply Quote 0
          • dc42
            dc42 administrators @gtaman last edited by

            @gtaman it could be the daemon process that is interrupting the music. If you have no daemon.g file in /sys, try creating one containing this:

            while true
                G4 S1000
            

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            gtaman 1 Reply Last reply Reply Quote 1
            • gtaman
              gtaman @dc42 last edited by gtaman

              @dc42
              That totally fixed it! 😄
              Thank you very much, You are a genius. 🙂

              I never thought i'd be dancing to a printer, but here I am xD
              Works even better than before.

              o_lampe 1 Reply Last reply Reply Quote 0
              • Topic has been marked as a question  dc42 dc42 
              • Topic has been marked as solved  dc42 dc42 
              • Referenced by  gtaman gtaman 
              • Referenced by  gtaman gtaman 
              • o_lampe
                o_lampe @gtaman last edited by

                @gtaman
                Downside is, that it totally blocks Daemon.g for other purposes.
                Would be cool to block it only while playing the sound.
                Any ideas? Renaming the original file and replace it with Davids two-liner and back again?

                jay_s_uk gtaman dc42 3 Replies Last reply Reply Quote 1
                • jay_s_uk
                  jay_s_uk @o_lampe last edited by

                  @o_lampe maybe add a variable thats turned on at the beginning of the macro and then off at the end?

                  Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                  o_lampe 1 Reply Last reply Reply Quote 1
                  • o_lampe
                    o_lampe @jay_s_uk last edited by

                    @jay_s_uk
                    Yes, replace the while true line with a real boolean variable 👍

                    1 Reply Last reply Reply Quote 1
                    • gtaman
                      gtaman @o_lampe last edited by

                      @o_lampe

                      Hmm, I don't think I've used Daemon.g, so I don't even know what it does. I'll have to look more into it. Both of those ideas seem good though 🙂

                      o_lampe 2 Replies Last reply Reply Quote 0
                      • o_lampe
                        o_lampe @gtaman last edited by

                        @gtaman
                        It's actually the same:

                        • create a global variable blockDaemon
                        • set global.blockDaemon = true at the start of the M300 file
                        • set global.blockDaemon = false at the end

                        Then anyone using Daemon.g for real can add these lines

                        while global.blockDaemon = true
                                  G4 S1000
                        
                        gtaman 1 Reply Last reply Reply Quote 4
                        • gtaman
                          gtaman @o_lampe last edited by

                          @o_lampe Nice! 😄 I saved it and I’ll try it out tomorrow. Heading to bed now, Have a good one! 🙂

                          1 Reply Last reply Reply Quote 0
                          • o_lampe
                            o_lampe @gtaman last edited by

                            @gtaman said in Music skipping beats after firmware update (3.4.0beta6):

                            I don't think I've used Daemon.g, so I don't even know what it does

                            I does what your imagination (and the conditional meta commands) are capable off.
                            It could run a playlist for instance

                            1 Reply Last reply Reply Quote 1
                            • DonStauffer
                              DonStauffer @gtaman last edited by

                              @gtaman I noticed the same thing.

                              jens55 1 Reply Last reply Reply Quote 0
                              • jens55
                                jens55 @DonStauffer last edited by

                                Anybody have a good source for a bill receptor (if that's what it is called) ? User feeds it a dollar and in turn it plays a music track. Feed it $5 and get an hour of 3D printing service (or 6 music tracks). Find a pub, arrange to locate the printer and watch the money roll in 🙂
                                Just got to figure out how to deliver the printed part to the customer in such a way that they can't mess up the process.

                                gtaman 1 Reply Last reply Reply Quote 1
                                • jens55
                                  jens55 last edited by

                                  ... and if it's not obvious, add a smiley face to my last post!

                                  1 Reply Last reply Reply Quote 0
                                  • jens55
                                    jens55 last edited by

                                    But seriously folks, I would love to have the printer play a different jingle for all the major events that require operator attention. Unfortunately my printer is run 99% remotely so I'd never get to hear it 😞

                                    engikeneer 1 Reply Last reply Reply Quote 0
                                    • engikeneer
                                      engikeneer @jens55 last edited by

                                      @jens55 you just need a bigger speaker 😉

                                      Home-built CoreXY, Duet Wifi, Chimera direct drive, 2x BMG, 300x300x300 build volume
                                      i3 clone with a bunch of mods

                                      jens55 1 Reply Last reply Reply Quote 2
                                      • jens55
                                        jens55 @engikeneer last edited by

                                        @engikeneer .... I am not an engikeneer so I didn't think far enough. Wish I would have finished my degree ...

                                        I am sure the neighbours will also really appreciate the sound tracks !

                                        1 Reply Last reply Reply Quote 0
                                        • gtaman
                                          gtaman @jens55 last edited by gtaman

                                          @jens55

                                          Conveyor bed that automatically ejects prints 😄 I've seen it somewhere just not in a public machine. I think the hardest part would be reliability, but it is possible. You could also set it to cancel and kick a job out if the time runs out before the print is done xD I haven't used bill receptors because they're expensive, but I did put a coin selector in a claw machine I built 😄 It was just some generic thing from ebay and it works quite well surprisingly.

                                          1 Reply Last reply Reply Quote 0
                                          • dc42
                                            dc42 administrators @o_lampe last edited by dc42

                                            @o_lampe said in Music skipping beats after firmware update (3.4.0beta6):

                                            @gtaman
                                            Downside is, that it totally blocks Daemon.g for other purposes.
                                            Would be cool to block it only while playing the sound.
                                            Any ideas? Renaming the original file and replace it with Davids two-liner and back again?

                                            @o_lampe said in Music skipping beats after firmware update (3.4.0beta6):

                                            @gtaman
                                            Downside is, that it totally blocks Daemon.g for other purposes.
                                            Would be cool to block it only while playing the sound.
                                            Any ideas? Renaming the original file and replace it with Davids two-liner and back again?

                                            If you already have a daemon.g file that is coded as a while loop so that it never terminates under normal conditions, and it spends most of its time in G4 delay calls, then you may not have the original problem anyway. The reason that not having a daemon.g file causes interruptions to timed tasks such as playing tunes is that every 10 seconds RRF will try to open daemon.g if it is not already open; and trying to open a non-existent file on the SD card requires the whole directory to be searched, which may require several sector transfers.

                                            Of course you could also choose to have daemon.g play the tune, triggered when it sees a global variable change state.

                                            Duet WiFi hardware designer and firmware engineer
                                            Please do not ask me for Duet support via PM or email, use the forum
                                            http://www.escher3d.com, https://miscsolutions.wordpress.com

                                            Baenwort 1 Reply Last reply Reply Quote 0
                                            • Baenwort
                                              Baenwort @dc42 last edited by

                                              @dc42 said in Music skipping beats after firmware update (3.4.0beta6):

                                              @o_lampe said in Music skipping beats after firmware update (3.4.0beta6):

                                              @gtaman
                                              Downside is, that it totally blocks Daemon.g for other purposes.
                                              Would be cool to block it only while playing the sound.
                                              Any ideas? Renaming the original file and replace it with Davids two-liner and back again?

                                              @o_lampe said in Music skipping beats after firmware update (3.4.0beta6):

                                              @gtaman
                                              Downside is, that it totally blocks Daemon.g for other purposes.
                                              Would be cool to block it only while playing the sound.
                                              Any ideas? Renaming the original file and replace it with Davids two-liner and back again?

                                              If you already have a daemon.g file that is coded as a while loop so that it never terminates under normal conditions, and it spends most of its time in G4 delay calls, then you may not have the original problem anyway. The reason that not having a daemon.g file causes interruptions to timed tasks such as playing tunes is that every 10 seconds RRF will try to open daemon.g if it is not already open; and trying to open a non-existent file on the SD card requires the whole directory to be searched, which may require several sector transfers.

                                              Of course you could also choose to have daemon.g play the tune, triggered when it sees a global variable change state.

                                              Is it enough to have a blank daemon.g or does it need contents?

                                              o_lampe dc42 2 Replies Last reply Reply Quote 0
                                              • o_lampe
                                                o_lampe @Baenwort last edited by o_lampe

                                                @baenwort said in Music skipping beats after firmware update (3.4.0beta6):

                                                Is it enough to have a blank daemon.g or does it need contents?

                                                You could add something like the below lines in your Daemon.g (empty or not) to have a controlable looptime.
                                                Set a low value when you need faster processing or higher, when you don't.

                                                while  true
                                                        //do other things
                                                       ....
                                                        G4 S{global.DaemonLoopSpeed}
                                                
                                                Baenwort 1 Reply Last reply Reply Quote 0
                                                • dc42
                                                  dc42 administrators @Baenwort last edited by

                                                  @baenwort said in Music skipping beats after firmware update (3.4.0beta6):

                                                  Is it enough to have a blank daemon.g or does it need contents?

                                                  It need to have a loop with a delay call in the body.

                                                  I have it in mind to add a new GCode command to start/stop daemon.g.

                                                  Duet WiFi hardware designer and firmware engineer
                                                  Please do not ask me for Duet support via PM or email, use the forum
                                                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                                                  DonStauffer 1 Reply Last reply Reply Quote 1
                                                  • nikscha
                                                    nikscha @gtaman last edited by

                                                    @gtaman would you mind sharing your gcode music collection?

                                                    gtaman 1 Reply Last reply Reply Quote 0
                                                    • gtaman
                                                      gtaman @nikscha last edited by gtaman

                                                      @nikscha
                                                      Here is my favourite in the code text below. I just found it, and i've been imagining it for weeks I tell you, WEEKS! Its the commodore 64 tribute from GTA Vice city. I think I'm going to use this for my main sound. Also, this thread had a bunch I shared earlier:
                                                      https://forum.duet3d.com/topic/26269/sound-for-duet?_=1639741054776

                                                      Also Don't be scared to make your own:
                                                      https://alexyu132.github.io/midi-m300/ -tool
                                                      https://www.vgmusic.com -midi music
                                                      https://bitmidi.com/ -midi music
                                                      There are Mp3 to midi converters too, but i havent found a good one

                                                      code_text
                                                      M300 P161 S370
                                                      G4 P161
                                                      M300 P166 S0
                                                      G4 P166
                                                      M300 P161 S370
                                                      G4 P161
                                                      M300 P166 S0
                                                      G4 P166
                                                      M300 P161 S370
                                                      G4 P161
                                                      M300 P166 S0
                                                      G4 P166
                                                      M300 P163 S330
                                                      G4 P163
                                                      M300 P163 S370
                                                      G4 P163
                                                      M300 P163 S440
                                                      G4 P163
                                                      M300 P161 S370
                                                      G4 P161
                                                      M300 P166 S0
                                                      G4 P166
                                                      M300 P163 S330
                                                      G4 P163
                                                      M300 P487 S370
                                                      G4 P487
                                                      M300 P166 S0
                                                      G4 P166
                                                      M300 P161 S294
                                                      G4 P161
                                                      M300 P166 S0
                                                      G4 P166
                                                      M300 P161 S294
                                                      G4 P161
                                                      M300 P166 S0
                                                      G4 P166
                                                      M300 P163 S294
                                                      G4 P163
                                                      M300 P161 S277
                                                      G4 P161
                                                      M300 P166 S0
                                                      G4 P166
                                                      M300 P161 S277
                                                      G4 P161
                                                      M300 P166 S0
                                                      G4 P166
                                                      M300 P163 S277
                                                      G4 P163
                                                      M300 P327 S330
                                                      G4 P327
                                                      M300 P327 S349
                                                      G4 P327
                                                      M300 P1000 S370
                                                      G4 P654
                                                      
                                                      
                                                      1 Reply Last reply Reply Quote 1
                                                      • First post
                                                        Last post
                                                      Unless otherwise noted, all forum content is licensed under CC-BY-SA