HISE Logo Forum
    • Categories
    • Register
    • Login

    Linking two 2 knobs to control same Module

    Scheduled Pinned Locked Moved Solved General Questions
    13 Posts 4 Posters 620 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.
    • S
      Sawer
      last edited by

      Hello everyone. I would like to link to knobs to control the Left/Right delay.
      I've tried by referencing the snippet from the docs that is linking two knobs controlling the gain values of two Gain fx modules. I've tried implementing the same function to control the left right delay amount but it's not working and I'm wondering what's missing. I'm attaching the snippet down here below. Any help is appreciated.

      HiseSnippet 1239.3ocuW8taZbDDeOCWS3RopQJO.q7GpNZRb.bZZjbsLFvzhh+CM3Z0pnnni61CVwwtz6VRfFku2Wg7s9Zzu42f9g7BjGg7F3N6sGbK1XLB0lUVV2Ny7a2eytyNyPqPtKIJhGhLxc5jgDjwWZ1dBSzqVOGJC0rNx3KL6D3zCUcxPmnHhGxvHyOJ0YjKKJd7o8p5D3vbIohPny3TWxgzATQpzVUdFMHngiG4T5.MqebkltbVMd.eDviLlEQCcb66zkbrizrMLARbfGUvCaKbDjHjQ1pbuIs6weCSY+YzHZm.hbRITaXgThavC7jLVJEUqGMvq0T+MBAqRqTuOix6um4QTO5L4omBecrBbJB8yCiMlmdYlidkzoWQM5s.JYnQorJJcWy1tgzghTMR9bGylLAIz2AN10ohxVzF+SFyZbvBlXqAN8IMBgIyPX+jhEe.tT4hE1IuUdqPRWLE9xxBtFhD3W6DhqSBblTBuKNNZXqtDwA99DWg8lJMaVXGcy8GCl9hWtik+3WT7kv2Jqj31WHBocFIHM8rgMTZQoq2hRx0Mu7uzEuifcHk0GvL0k.P03CFxYvD6MqNRH3LIkxOGt9LdmHEuxaEOQwsEuJOCLPsFJSKsbSKmrcSW2shjlvDg7fZNAAcfHXaotZU0WxkaUdKJKfxHX+QLWAkyvJc1tJHO.bqfQjB4sdadKLLB3tNAXpm7zOdK1hx7HiOweJB4pJMT8epO1N4vT5QmIWL6B3c2EWr.9QOBmvrHLiKv.Q5S7T.S1N4H4ZKR6Zy1e7TlsSrcuSYNIHhfuxB3yCw1TfvE2ASw+PBuCHrthdfj6e+Bo1pA6l2ZrtspCb3jI9HW4o5TLll5jUNrd2rCdN6XtfbBytf0asxYAldYU99KTWxYX.IbgpkY9BWFPa1nAcHgS8poFBoClOGi40miQOEnqJ.VyPNqIiJNYHgccIFQIQ8P9nLIrB9RDmM5qRxF0Nf5QBQTHoysLie5fhIbRV8J99e64nUFb44.+wKt3gWOX0q8Xv4LSd5OG73RRneoYcGgiLkZh2.d3PRnfJO7LpSdMTeRkfMmYcRTeAeXr6l7HGYXciN73zMrbkIoS9lJCnddAjV7Hp7xUyryiDjgso+wTt9Wu+8+8dCzql9amOvYrdkznQ99TPhoI1qJZ.2KgxtzNj.4c0Jy3x5Ll7eHiWNEuj+nyXyU3pUC7S0374+bEAYrP1ehLeFzcwUpbB0r4diBbDyWHW18RhBoqpW8TVgjAGASzCktb08rqV08k27wpR26Z1hJb6sX9twB3KDw++MeS5UJuopkfTxl0rwutzFixtZIsRoxM1jzcTb4VlwEGhYwsUeWZNlDKRl78PhuVKoeZ+YJdNsaOMM2qRCBwSVfVCQks29C6MUtNfXEGxeSKXCaDR98Yqye9gJ+D8JRQ0qbDUKv9i6cJAdT.8Z4NWjWlUtuxRKsuRzy4iDTV2ibf5lxGpGOZPanaaWBb4wXPgZPlwFxGmp4EkykjnMg4EO4BXjnrjbtQhxRSU9YYOF33FxeURyMxXgaGKA7aV7uUHm4Qx43YUDLMKtUQDjci9JWWYD5Cgn6Eio7ZfY60.yiWCLe2Zf4IqAlueMv7zkhQ9yl1ejfOPk8BDz5f3JyFFGvbfn23mmn+UqQJdJ
      
      DanHD d.healeyD 2 Replies Last reply Reply Quote 0
      • DanHD
        DanH @Sawer
        last edited by

        @Sawer your snippet makes my HISE crash!

        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
        https://dhplugins.com/ | https://dcbreaks.com/
        London, UK

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

          @Sawer Might find what you're looking for in this video

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

          S 2 Replies Last reply Reply Quote 1
          • S
            Sawer @d.healey
            last edited by

            @d-healey Will check out thanks so much

            1 Reply Last reply Reply Quote 0
            • S
              Sawer @DanH
              last edited by

              @DanH Uhm..Will check now

              1 Reply Last reply Reply Quote 0
              • S
                Sawer @d.healey
                last edited by

                @d-healey Can fx.setAttribute(); get 2 parameter inside? or is there a function that can set values with a knob of 2 or more parameters in one instance? I've watched your video but it is relating only to 1 Parameter ("Gain" ) in three different fx modules, but how can I link two knobs changing two parameters of the same fx module? Thanks

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

                  @Sawer

                  how can I link two knobs changing two parameters of the same fx module?

                  It's exactly the same, just instead of using 2 different effects use the same effect but change the attribute constant. For example a simple gain:

                  SimpleGain1.setAttribute(SimpleGain1.Gain, -18.0);
                  SimpleGain1.setAttribute(SimpleGain1.Balance, 0.5);
                  

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

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    Sawer @d.healey
                    last edited by

                    @d-healey

                    HiseSnippet 1166.3ocyW80iZaDDeMfuDHsQMQsuacOQTRo.20jJQiNmCNZQ4tKnvknHcJJcwdMrh065ZuNIz1SJO125mo9XeNeA5Gg9Insyt1b1bGvQPsUEAHO+c+MytyLq6GJbHQQhPjQ4SlFPPFej4fob431iwTNpWGjwMMOBGIIgVIr1eZ.NJh3hLLJ9MJFFkKgze9i81GyvbGRFKD54BpC4PpOUlwsu8ioLVWrK4DpeNs20tmif2VvDw.dJZVGEfclfGQNFqTqfIxXqCboRQ3.IVRh.c1W3NcvXwa3I5+bZDcHinHZfF.NJgMp8XJys+rXM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adbNgEoZBVPM8HgtthVAgADtqlP0dHUXCEsQpvFyD9exZ3icBEuxIY5h5rv00bf3lqeofxvam.zVmOTwzrds5p1czW43nNg94vo6EaSyMvlc1.a1cCr4K2.at+FXyC1.a9pUZi5ckdTrT3mz8BXz+.8vcCiC3X3zqt7D827bXGnK
                    

                    Ok tried this implementation, the code is not working. I'm just wondering what's missing?

                    d.healeyD ulrikU 2 Replies Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @Sawer
                      last edited by

                      @Sawer said in Linking two 2 knobs to control same Module:

                      Ok tried this implementation, the code is not working. I'm just wondering what's missing?

                      In your button callback you are just setting the value of the Delay attributes, this callback is only triggered when the button is clicked not when the knobs are moved.

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

                      1 Reply Last reply Reply Quote 0
                      • ulrikU
                        ulrik @Sawer
                        last edited by

                        @Sawer if I understand what you mean,
                        if button is on, you should be able to control both Left and Right Delay time with any of the knobs?

                        like this?
                        2knobslinked.gif

                        In both knobs callbacks, check if the button.getValue()

                        something like this

                        inline function onKnob2Control(component, value)
                        {
                        	Delay1.setAttribute(1, value);
                        	
                        	if (Button1.getValue())
                        	{
                        		Knob1.setValue(value);
                        		Knob1.changed();
                        	}
                        };
                        

                        and apply it to both callbacks

                        Hise Develop branch
                        MacOs 15.3.1, Xcode 16.2
                        http://musikboden.se

                        ulrikU 1 Reply Last reply Reply Quote 1
                        • ulrikU
                          ulrik @ulrik
                          last edited by ulrik

                          @ulrik Oh and by the way, it's recommended to use the attribute names instead of numbers.
                          You find them in Hise here:

                          I always have a floating window open for the "Module Browser"

                          floatingwindow.gif

                          so the changed code would be

                          inline function onKnob2Control(component, value)
                          {
                          	Delay1.setAttribute(Delay1.DelayTimeRight, value);
                          	
                          	if (Button1.getValue())
                          	{
                          		Knob1.setValue(value);
                          		Knob1.changed();
                          	}
                          };
                          

                          Hise Develop branch
                          MacOs 15.3.1, Xcode 16.2
                          http://musikboden.se

                          S 1 Reply Last reply Reply Quote 4
                          • S
                            Sawer @ulrik
                            last edited by

                            @ulrik Thanks so much man! Super clear explanation!

                            ulrikU 1 Reply Last reply Reply Quote 0
                            • ulrikU
                              ulrik @Sawer
                              last edited by

                              @Sawer 👍

                              Hise Develop branch
                              MacOs 15.3.1, Xcode 16.2
                              http://musikboden.se

                              1 Reply Last reply Reply Quote 1
                              • S Sawer has marked this topic as solved on
                              • First post
                                Last post

                              48

                              Online

                              1.7k

                              Users

                              11.7k

                              Topics

                              102.2k

                              Posts