HISE Logo Forum
    • Categories
    • Register
    • Login

    Save DraggableFilterPanel EQ state in preset

    Scheduled Pinned Locked Moved General Questions
    19 Posts 3 Posters 514 Views
    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.
    • Adam_GA
      Adam_G
      last edited by

      Does anyone know if it's possible/how to save the state of a DraggableFilterPanel connected to a Parametriq EQ in Presets?

      SaveInPreset: 1 doesnt seem to work

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @Adam_G
        last edited by

        @Adam_G You need to save the EQ in the preset rather than the tile. Engine.addModuleStateToUserPreset()

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        Adam_GA 2 Replies Last reply Reply Quote 0
        • Adam_GA
          Adam_G @d.healey
          last edited by

          @d-healey you are the man David, that worked like a charm. thank you

          1 Reply Last reply Reply Quote 0
          • Adam_GA
            Adam_G @d.healey
            last edited by

            @d-healey is it the same with an xy panel?

            d.healeyD 1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey @Adam_G
              last edited by

              @Adam_G XY panel is just a panel isn't it?

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

              Adam_GA 1 Reply Last reply Reply Quote 0
              • Adam_GA
                Adam_G @d.healey
                last edited by

                @d-healey yes and is connected to knobs which all have save in preset enabled but the panel doesnt repaint when the preset is changed. is there a command for that?

                ustkU 1 Reply Last reply Reply Quote 0
                • ustkU
                  ustk @Adam_G
                  last edited by

                  @Adam_G So the panel waits for a repaint order from your knobs

                  Can't help pressing F5 in the forum...

                  1 Reply Last reply Reply Quote 0
                  • Adam_GA
                    Adam_G
                    last edited by Adam_G

                    can i set .repaint on preset change? @ustk

                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @Adam_G
                      last edited by

                      @Adam_G Put the repaint command in the knob's callback (or use the user preset handler's post callback).

                      Libre Wave - Freedom respecting instruments and effects
                      My Patreon - HISE tutorials
                      YouTube Channel - Public HISE tutorials

                      Adam_GA 1 Reply Last reply Reply Quote 0
                      • Adam_GA
                        Adam_G @d.healey
                        last edited by

                        @d-healey its in the knobs callbacks but i added it to the preset handlers post callback. i think its something else in my project thats wonky because the dots just returning to the exact same spot in the panel each time but its in a weird place.

                        ustkU 1 Reply Last reply Reply Quote 0
                        • ustkU
                          ustk @Adam_G
                          last edited by ustk

                          @Adam_G How are you setting the coordinates? panels value? data object? just reading knob values in the paint routine?
                          Is the panel saveInPreset enabled? (it shouldn't)

                          The way I would do it is to set panel.data.x/y in each knob CB and repaint. So each time a knob is recalled from a preset, the panel data updates, and then it repaints. (I generally only use a panel's value if I need it to be stored in presets (you don't need it here because the knobs are taking care of this), otherwise, stick with the data object which is volatile.

                          Can't help pressing F5 in the forum...

                          Adam_GA 1 Reply Last reply Reply Quote 0
                          • Adam_GA
                            Adam_G @ustk
                            last edited by Adam_G

                            @ustk thanks for the help! i am indeed using the data object. here is the code im using to link the knobs

                            const var XYPadPnl = Content.getComponent("XYPadPnl");
                            const var knobs = []; 
                            for (i = 0; i < 4; i++)
                            {
                                knobs[i] = Content.getComponent("Knob"+(i+1));
                                knobs[i].setControlCallback(XYPad);
                            }
                            // Mouse CB
                            XYPadPnl.setMouseCallback(function(event)
                            {
                                if (event.clicked || event.drag  || event.mousewheel)
                                {
                                    this.data.x = Math.range(event.x / this.getWidth(), 0,  1);
                                    this.data.y = Math.range(event.y / this.getHeight(), 0, 1);       
                                    knobs[0].setValue(1*this.data.x);
                                    knobs[1].setValue(1-(1*this.data.y));
                                    knobs[2].setValue(1*this.data.y);
                                    knobs[3].setValue(1-(1*this.data.x));
                                    knobs[0].changed();
                                    knobs[1].changed();
                                    knobs[2].changed();
                                    knobs[3].changed();        
                                }    
                            });
                            
                            

                            its not my own, someone here on the forum wrote it but i dont recall who. probably @d-healey haha

                            ustkU 1 Reply Last reply Reply Quote 0
                            • ustkU
                              ustk @Adam_G
                              last edited by

                              @Adam_G Why do you have 4 knobs for an XY pad?

                              Can't help pressing F5 in the forum...

                              Adam_GA 1 Reply Last reply Reply Quote 0
                              • Adam_GA
                                Adam_G @ustk
                                last edited by Adam_G

                                @ustk multiple effects linked to it. works very well, just have the issue with it loading in an odd position

                                ustkU 1 Reply Last reply Reply Quote 0
                                • ustkU
                                  ustk @Adam_G
                                  last edited by

                                  @Adam_G But since they handle the same value two knobs are enough. Each knob can control as many parameters as you want

                                  Can't help pressing F5 in the forum...

                                  Adam_GA 1 Reply Last reply Reply Quote 0
                                  • Adam_GA
                                    Adam_G @ustk
                                    last edited by

                                    @ustk good point, so you think that would resolve the positioning issue?

                                    ustkU 1 Reply Last reply Reply Quote 0
                                    • ustkU
                                      ustk @Adam_G
                                      last edited by

                                      @Adam_G Here's a simple version:

                                      HiseSnippet 1339.3ocsW80aaaCDWJIJaVasXEXOsmNzGFTGRcs655FPPQShsSsQaRLpSSSwvPAsDsEQnI8jnhi1P.1Gs839Lrm1Gg8MX6HkjsbqiqqApfQPt+7i52c73wScij9z3XYjkckSSGSsr+RmdoBUXiPBSX0ook8scNhDqnQPlpCRGShioAV11a9LsB6JaYYd92md.gSD9zYprrNSx7oufMholos6dOmw4GRBnmxFUx6GsWGeongjKSP9roSMqwD+KHCoGSztsgik81sBXJYTOEQQisr25.YPZuP4DQl+mwhY84TsPcqd3Bko9PIOPyXsVqFgLdP2h3N1BWktyxBalkE9ZmiXAro5mkM9JiAXFhx4C6MlmdaNG8peSzaATxtDk1JiR2womeDarZlEMe9BmNBbyY.AS6koRluVa72a6zPhdHTUGQtfdXDJLEg2iqUaG.+y8100ES8wJ3RRDb0yE8gm.E3FRUMjiFKEnf2c0FuK5+L2SWl6oum6m+ltjftB9MBovAMLW2G7.3Iq1CztSylsNFd9wmbPuUEjd8OVBQTBGDTZ.njvXNla.UHcDvD.A+EEQRgXlHScDE0PAofmBODtPH6GWsZU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ZVivub3s995v+9XikEi4gqAlueMv7n0.yOrFXd7Zf4GWCL+zRwn+ns8STxQYGGPEcaY5fZa2RPvJKSUn0+CedkMd.
                                      

                                      Can't help pressing F5 in the forum...

                                      Adam_GA 1 Reply Last reply Reply Quote 0
                                      • Adam_GA
                                        Adam_G @ustk
                                        last edited by

                                        @ustk thanks! this one does correctly save in presets. guess its time to change some code haha. appreciate the help 😀

                                        ustkU 1 Reply Last reply Reply Quote 0
                                        • ustkU
                                          ustk @Adam_G
                                          last edited by ustk

                                          @Adam_G And a version without knobs :)

                                          HiseSnippet 1178.3ocsVs0biSCEVtslYsgkgkgm3IQeXGG1tYSfsEF5zg1ljRCPayzzsWlc5ripsRrnJRAK4lFf9Kh+b7O.NR1Nwoa1KSF17faOW024hNG0IQFRUJYBxw6jwCoHmOws6XgNtQLgIPsahb9T2CHJMMAmwZ2wCIJEMB43r7OYX33sBx96e9wcIbhHjNkEBcpjER+U1.ldJ2Na+KLNeORD8D1fRZ+7saGJEMjbYJfmkcqgFRBulzmdHwn1RtHmOpUDSKS5pIZpB4rxtxnwcikiDY5eJSwthSMD0QcAGkwdOIOxfXCWTiXFOpSQbqPfW5LMKrbVV3KbOfEwlveZ13yrBvSsnb9vYoYg2xy.u5kgWsRvaNPxoDjVICROxsaXBandpDCd9X21Bn3zi.o8xPISWzR+8JtMjfFBc0Ajqo6k.DSrHXiZ0VCCeprouuOj6UZ7MjD74WzgD0QvwagKLtOU2PNXnT.DAqVnvpFCe1yvTgJMgh0wDM7gBNgmRwLElHvxq9MZn1m0CGng.Q1KnvZiSO0nYPkJ3uZK7pYptZEeuIpnJT4k0pBXE9boErvg1ApIZ7wxTMSP8KagURtffdohPMSJB5Ww+O885WsGz7sCmGj0nopdEG5x.mBhTlnzvchPhPy98T5nXllZzw2yjfTr+fBIm501LidDPniYJSDcFKRGGTA+TqVVSxNyVbNanBhjBMyi8WV6R7WiGsF997qmy23mrulX+th3+.Yphhar6LgtkYCBmeEDTSic5MPcyF+l5fkpZTBARId.Ou4fnsvGPzwUSHh9zbCtE+r6GkPEYMLttIy3MG3OGmLtjS1mx5Gqy8RImDFaLHJvv4toA74WXhVlfCkUbQngkhh32zqlH4AgEMpqk0HZiatLjvw2BPZh3Yi3MKzYroxBku4pW8KsUT.MMOBe196bRqSacL9r1mrO9b7iwWf2u0wsLZ36AvQI4zpCSXl6L29C3UwOAPvSf+9W3wYjiMUzM8eWWyx5Lsg2jh6qE317z69WoL2gRM8HQfMA4emO99h50atxxOONMYthMS0SdaFFHRGbEMob4wnHLpa14mtu44mkGuGlk7JonTzVvzGMjJdSC8Q4Ybyr1bTAppsSZeXwjVhfxQLXdpuaQpFYgLx4yc+4tGcHLTZ85qaFKswkHzKZ2jnIEdDbNbfCoIZlIVbZRuAVElMK2ysIUcsVNzpad8F47f2iy+1o6KYaOtLwHyUxxLhsWuJyAZcjiJZf.P8ktM3L3+VCuu7FXE+iwMggB8Yh9HE4FZaQmDJz4AnbIzquQB1EJiR4D8rKHMuJHW.T0mYqjYyiPwziK+pg+21Z99BwG41goCimOFWZNXDJoeHvX9aMdnaqd8f8dSA3Jt6c9GlGVfx1J1GFKmvfVI2CSGzEVzERgSW.salacPw1Xpktlg1jA5REQVh+E9kKrtg1IWX8BgnAjvD4qBytUYdMyCrb.LIrOjyCdQIPiqWbYx0E1qiF.Or5Ugglv+ovU14ay2r.17sKfMOeArY8EvlMV.a9tEvlu+sZi4Ms6jpkCxtN.L5zxNKywokf.cV1tPz+Az.7jcA
                                          

                                          Can't help pressing F5 in the forum...

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post

                                          28

                                          Online

                                          1.7k

                                          Users

                                          11.8k

                                          Topics

                                          102.7k

                                          Posts