HISE Logo Forum
    • Categories
    • Register
    • Login

    Two knobs controlling eachother

    Scheduled Pinned Locked Moved Scripting
    8 Posts 4 Posters 277 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.
    • DanHD
      DanH
      last edited by

      Is there a better way to achieve this than the code below?

      const var knobs2 = [];
      knobs2[0] = Content.getComponent("PITCHER_ATTACK");
      knobs2[1] = Content.getComponent("PITCHATTACK");
      knobs2[0].setControlCallback(knobCB2);
      knobs2[1].setControlCallback(knobCB2);
      
      inline function knobCB2(control, value)
      {
              for (i = 0; i < 2; i++)
              {
                  if (control == knobs2[i]) continue; //Skip the knob that triggered the callback
                  knobs2[i].setValue(value);
              }    
              for (te = 0; te < TE.length; te++)
              {
                  TE[te].setAttribute(2, value);
              }
      }
      

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

      Christoph HartC 1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart @DanH
        last edited by

        @danh use the linkedTo property?

        DanHD 2 Replies Last reply Reply Quote 0
        • d.healeyD
          d.healey
          last edited by

          I have a video all about linking knobs you may want to check out

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

          1 Reply Last reply Reply Quote 0
          • DanHD
            DanH @Christoph Hart
            last edited by

            @christoph-hart Sounds good, can't see anything in the docs, how do you use it?

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

            1 Reply Last reply Reply Quote 0
            • trillbillyT
              trillbilly
              last edited by

              @d-healey is this video on YouTube or Patreon?

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

                @trillbilly It's on YouTube, same one I linked to in your thread.

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

                trillbillyT 1 Reply Last reply Reply Quote 0
                • trillbillyT
                  trillbilly @d.healey
                  last edited by

                  @d-healey that explains it, I've only made it a fraction of the way through right now lol

                  1 Reply Last reply Reply Quote 0
                  • DanHD
                    DanH @Christoph Hart
                    last edited by

                    @christoph-hart oh this one :face_with_tears_of_joy:

                    Works great! :)

                    Screenshot 2022-01-27 at 15.51.54.png

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

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

                    47

                    Online

                    1.7k

                    Users

                    11.7k

                    Topics

                    101.9k

                    Posts