HISE Logo Forum
    • Categories
    • Register
    • Login

    Troube with inverting control

    Scheduled Pinned Locked Moved General Questions
    5 Posts 3 Posters 217 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.
    • C
      ccbl
      last edited by

      Hey folks, so in researching how to implement an inverted pot I found this post,
      I used the snippet from this post. https://forum.hise.audio/topic/1882/inverting-knob/4?_=1720771370342

      The only problem is, when I manipulate the "stealth" knob manually it alters the linked parameter, however when I alter the user facing knob, the linking works, but the parameter doesn't change.

      Video of the problem for reference

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

        @ccbl Without looking at the code, you're probably missing a MyKnob.changed() after setting its value, so you actually call its callback to say "hey! your value changed! please use it my boy!"

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

        1 Reply Last reply Reply Quote 1
        • C
          ccbl
          last edited by

          Content.makeFrontInterface(600, 250);
          
          const var thresh = Content.getComponent("thresh");
          
          inline function onsquashControl(component, value)
          {
          	thresh.setValue(-24-value);
          };
          
          Content.getComponent("squash").setControlCallback(onsquashControl);
          

          This is what I used. It links the two controls nicely (as you can see from the video) but when the "thresh" knob is changed this way (via the "squash" knob") rather than directly manipulated the threshold (linked parameter) doesn't change.

          ulrikU C 2 Replies Last reply Reply Quote 0
          • ulrikU
            ulrik @ccbl
            last edited by

            @ccbl

            I think @ustk meant this

            Content.makeFrontInterface(600, 250);
            
            const var thresh = Content.getComponent("thresh");
            
            inline function onsquashControl(component, value)
            {
            	thresh.setValue(-24-value);
                    thresh.changed();
            };
            
            Content.getComponent("squash").setControlCallback(onsquashControl);
            

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

            1 Reply Last reply Reply Quote 0
            • C
              ccbl @ccbl
              last edited by

              @ccbl Cool that worked thanks!

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

              47

              Online

              1.7k

              Users

              11.7k

              Topics

              101.8k

              Posts