HISE Logo Forum
    • Categories
    • Register
    • Login

    Linking knobs together via a button

    Scheduled Pinned Locked Moved General Questions
    31 Posts 3 Posters 5.1k 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.
    • pcs800P
      pcs800 @d.healey
      last edited by

      @d-healey

      HiseSnippet 764.3ocsU0taZCCE0lhqVx9PqR6AH+LLUUEJEVq5OVKPYCsRKpzUs+UYbbHVjXGk3zMzT0dk2avlcRJDVQ8CjVPhj6GG6St9buYXrfPSRDw.n4kyhn.3qPilwk9c7wLNneW.7MnA3DIM1J2U6YQ3jDpK.B23SZGPipfrqe+w13.LmPW3B.tRvHzSYgL4BuCO5KrffdXW5krvRYu2Q8IBdGQfHUwmMPNfHLYJdB8LrNsJHvmwI9.36Q6tqGYeGm8aznoCF2vEi2qNswATuVdjlNG33Ntoi5WK.bySbYRQ7HIVRSTKZag6rQ9huyy2fqXIrwATsQcvH0Nm6FzwmE3N7thSB..qNbQoZi7R06PCXtr49WTxdaV.qEHJWzfUdHJU+YPIXIJUMmRagFQhYQxEQz74kn9b0InGVc1TlJ44Bp7KHpiPkAWtSHdJsWrxXNB6VNNaao9q1gllLd.iSs7R4DISvsD7S6RCvyzviEA1DQXjfqVnsstAGjRqY9SSirLpuSBUdrTFyFmJo1E9xtoUAWvl3OGzglFlFLOK6SY7osSkRAemIT4U5f10pYZnVTiKxvpW0b+ygdWDhOlOg5Zq8cq4sGZVh0mIjzy41Yzy7VSq+Mjm2JiU7ZFPiWYX8KR7CAzlmFNlFWt3nSTc7srlXymllfjenUJQAuOmIOOhVX2SD3pOq0OeeEDn3TW8zW62EKwZQUgOUdQzXISSGXW5Mp13bIlApKMYpTDoZjum9So7EtoAX4xsC5AEEAT0ikzfZcFOgImUdPxynGw4A6QdpTbKzPlj3uZNVYEbTUo9evwhIKuFchmGkHWPvpndeacGi7Ha+EhTIiOY.V0a9C.DcVZ3H0DXBUs6bNMPs3HXEsZI21Qaqq.inb2Li+ntJBVWaCKBV+tffPLIVbMIuKPO65EYdTbhmMa2P8QFksUcPVmQ45bnZT50DxxK08.t65Brw5Bbu0EXy0EXq0E3GVWf6+3.0eo63ToHLusA.FL7jrQIP3IbrRAloVA+EnkIY0M
      
      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @pcs800
        last edited by d.healey

        @pcs800 The snippet needs to include everything required to demonstrate the problem - but nothing extra.

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

        pcs800P 1 Reply Last reply Reply Quote 0
        • pcs800P
          pcs800 @d.healey
          last edited by

          @d-healey
          I don't know what that means. I followed the instructions to create a snippet. That code is the only code in the project. The rest was done via the gui editor.

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

            @pcs800 said in Linking knobs together via a button:

            I don't know what that means.

            The snippet should include the script, the effect, the knobs, and the button, and these should be connected up as is in your main project.

            Then when I load up the snippet I should be able to see the issue you are having.

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

            pcs800P 1 Reply Last reply Reply Quote 0
            • pcs800P
              pcs800 @d.healey
              last edited by

              @d-healey Try this

              HiseSnippet 2138.3oc2Yzzaaibkz1byJYmuVrnnnGJHB1B3TjZHIKaK0.TSaYKG2XGqURq2dnsIiHGIMMTyvkbjSTBLZ.ZOza68dp25egdbQ+Er.EEnGSuUfdY+Gz9lgTTC0G1zpItcqxg34Myade+w7XMelMNHf4qoms4.Orl9JFMFP4cqzEQnZGtml9xFGuyQl6gcQCz1cfGJH.6noqu3AhCnmYIM4uuY6cQtHpMdDHMsSYDa7QjdD9Hn0rdLw0sJxA2jzS4zEsNzlQqvbY8AlYQibZdH6mi5feBRbrELzdDJnql9OznPg11kxkqz5quQNDZcGDpXd75kws2rs8F4Jmyo0F4f+sol9GruCgy7avQbbfl9R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2.2izDRNEnBTTPELcxp2pvq.URm5Vey1UAgbp3z.w66KiV2oGqOkeQ15kRms9R9zPK8+beZnuEjCNQBlLC4wFjddt38omgcY.DAO9QFQc9MDZRe4iYTlWWFkjHntNFhA6zA6qx6SUf1gyEE1hg7wV0wtXjpS6mXAsZAMcJZbbN0E4uxeIuoZu9tFgrqoH.z7au0NW7+qqcdsTH35fF8P19rmZG9UiD9oenDBH2T43YyXbrXs4T9Bc8frbO01N4UMAhElWDWedQr37h3FyKhaNuHt07hXoKGQQQnc5CO0NLzTSCdIp708556SQfWtLhP6eKA.PPM
              
              d.healeyD ChazroxC 2 Replies Last reply Reply Quote 0
              • d.healeyD
                d.healey @pcs800
                last edited by

                There are a couple of problems.

                You haven't assigned the control callback to your controls.

                Controls can either be connected to module by parameter/processor ID or by using a control callback - you can't use both together. So if you want to use a control callback you need to remove the assignment in the interface designer.

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

                pcs800P 1 Reply Last reply Reply Quote 0
                • pcs800P
                  pcs800 @d.healey
                  last edited by

                  @d-healey
                  If I remove the assignments from the LDelay and RDelay knobs, won't they get disabled when the linkbutton is not engaged?

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

                    @pcs800 said in Linking knobs together via a button:

                    won't they get disabled when the linkbutton is not engaged?

                    You need to use the control callback to handle both the linked and unlinked scenarios.

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

                    pcs800P 1 Reply Last reply Reply Quote 0
                    • pcs800P
                      pcs800 @d.healey
                      last edited by

                      @d-healey
                      I guess I am not building this plugin yet. I need to understand more of the coding language. I do not know how to use a control callback. I'll start with your video above.

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

                        @pcs800 Yeah once you get control callbacks down you'll be able to do a lot of stuff.

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

                        1 Reply Last reply Reply Quote 0
                        • ChazroxC
                          Chazrox @pcs800
                          last edited by

                          @pcs800 You have all of your knobs connected via 'Property Editor' so those arent going to react to any script like you have.

                          You can only do one or the other. If you know you're going to have scripting controlling the button/knob/slider, dont connect it via the 'Property Editor'.

                          Also, you're not declaring any reference to your knob before you have it trying to execute an action, so that will cause an error as well on its own.

                          Dave's 101 video is a great place to start. Best wishes!

                          1 Reply Last reply Reply Quote 0
                          • ChazroxC
                            Chazrox
                            last edited by

                            Best advice....

                            pcs800P 1 Reply Last reply Reply Quote 0
                            • pcs800P
                              pcs800 @Chazrox
                              last edited by

                              @Chazrox I watched a lot of the video above, and others.
                              I now have a script that works as intended.

                              Content.makeFrontInterface(566, 300);
                              
                              const var LDelay = Content.getComponent("LDelay1");
                              const var RDelay = Content.getComponent("RDelay1");
                              const var LFeedback = Content.getComponent("LFeedback");
                              const var RFeedback = Content.getComponent("RFeedback");
                              const var linkButton = Content.getComponent("LinkButton");
                              
                              inline function onLDelayControl(component, value)
                              {
                                  if (linkButton.getValue()) 
                                  {
                                      RDelay.setValueNormalized(LDelay.getValueNormalized());
                                  }
                              }
                              
                              inline function onRDelayControl(component, value)
                              {
                                  if (linkButton.getValue()) 
                                  {
                                      LDelay.setValueNormalized(RDelay.getValueNormalized());
                                  }
                              }
                              
                              inline function onLFeedbackControl(component, value)
                              {
                                  if (linkButton.getValue()) 
                                  {
                                      RFeedback.setValueNormalized(LFeedback.getValueNormalized());
                                  }
                              }
                              
                              inline function onRFeedbackControl(component, value)
                              {
                                  if (linkButton.getValue()) 
                                  {
                                      LFeedback.setValueNormalized(RFeedback.getValueNormalized());
                                  }
                              }
                              
                              LDelay.setControlCallback(onLDelayControl);
                              RDelay.setControlCallback(onRDelayControl);
                              LFeedback.setControlCallback(onLFeedbackControl);
                              RFeedback.setControlCallback(onRFeedbackControl);
                              
                              d.healeyD 1 Reply Last reply Reply Quote 1
                              • d.healeyD
                                d.healey @pcs800
                                last edited by

                                @pcs800 Nice :)

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

                                pcs800P 1 Reply Last reply Reply Quote 0
                                • pcs800P
                                  pcs800 @d.healey
                                  last edited by

                                  @d-healey
                                  So I overlooked something...
                                  Yes the delay time and feedback knobs are locked when the button is engaged, but they are not actually controlling the delay time and feedback, because I removed those assignments from the properties panel.
                                  I am struggling to figure out how to assign processorid and parameterid in the code editor.
                                  Can you help?

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

                                    @pcs800 said in Linking knobs together via a button:

                                    I am struggling to figure out how to assign processorid and parameterid in the code editor.

                                    Use .setAttribute to set the module parameters directly from the control callback.

                                    First you need to get a reference to the module (right click the header and select create generic script reference).

                                    Then in the callback you can call something like myModule.setAttribute(myModule.parameterName, value);

                                    To find out the parameterName you can again right-click the module header and select dump Parameter IDs and values.

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

                                    pcs800P 1 Reply Last reply Reply Quote 1
                                    • pcs800P
                                      pcs800 @d.healey
                                      last edited by

                                      @d-healey said in Linking knobs together via a button:

                                      myModule.setAttribute(myModule.parameterName, value);

                                      Ok, I added the following to the code

                                      const var Delay1 = Synth.getEffect("Delay1");
                                      Delay1.setAttribute(Delay1.DelayTimeLeft, 0.00);
                                      

                                      It compiles without error, but the knob doesn't control delay time.

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

                                        @pcs800

                                        This needs to go in on init
                                        const var Delay1 = Synth.getEffect("Delay1");

                                        This needs to go within the control callback. It takes two parameters, the first parameter is the property you want to set (in this case DelayTimeLeft), the second parameter is the value you want to set that property to, you've put 0.00 but you want to use the knob's value, so put value there instead.

                                        Delay1.setAttribute(Delay1.DelayTimeLeft, 0.00);

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

                                        pcs800P 1 Reply Last reply Reply Quote 1
                                        • pcs800P
                                          pcs800 @d.healey
                                          last edited by

                                          @d-healey adding on init gives this error
                                          Line 3, column 4: Found identifier when expecting ';'
                                          I tried function onInit() but it then doesn't like the next line

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

                                            @pcs800 said in Linking knobs together via a button:

                                            Line 3, column 4: Found identifier when expecting ';'

                                            That tells you that you are missing a semi-colon, probably on line 2

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

                                            pcs800P 3 Replies Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            28

                                            Online

                                            1.8k

                                            Users

                                            12.0k

                                            Topics

                                            104.1k

                                            Posts