Forum

    • Register
    • Login
    • Search
    • Categories

    Bouton control bouton

    General Questions
    2
    6
    51
    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.
    • Y
      yall last edited by

      Hello, I would like to create a button which manages several parameters. I am encountering a problem, if I put a button on frequency I can control eq, filter but I can not control a parameter which is in percentage. I tried to create a button by parameters and a main button to link them together with knob1.setvalue (value); . the buttons move but do not activate the parameters. some help? 🙂

      Lindon 1 Reply Last reply Reply Quote 0
      • Lindon
        Lindon @yall last edited by Lindon

        @yall

        local perc = (value - component.get("min"))/((component.get("max") - component.get("min"))/100);
        
        

        HISE Development for hire.
        www.channelrobot.com

        Y 1 Reply Last reply Reply Quote 0
        • Y
          yall @Lindon last edited by

          @Lindon
          I don't understand where I should put this line and what it corresponds to. my konb 1 goes from 0 to 100 and my knob2 from 20 to 20,000.

          Lindon 1 Reply Last reply Reply Quote 0
          • Lindon
            Lindon @yall last edited by Lindon

            @yall so you want to use one knob to control two parameters:

            your knob goes from 20 to 20000 (so its all set up for frequency
            but you also want to control a percentage somewhere

            inline function myKnobControl(component, value)
            {
                 local perc = (value - component.get("min"))/((component.get("max") - component.get("min"))/100);
                 myFX.setAttribute(myFX.frequency, value);
                 myFX.setAttribute(myFX.percentage,perc);
            
            }
            

            So what we are doing here is working out what 1% is as a value and dividing this into the range returned..

            So we are scaling our returned value to the range 0-100, you can scale to other ranges too as required.

            HISE Development for hire.
            www.channelrobot.com

            Y 1 Reply Last reply Reply Quote 1
            • Y
              yall @Lindon last edited by

              @Lindon said in Bouton control bouton:

              myFX.setAttribute(myFX.frequency, value);
              myFX.setAttribute(myFX.percentage,perc);

              it is beyond my skills ^^

              Lindon 1 Reply Last reply Reply Quote 0
              • Lindon
                Lindon @yall last edited by

                @yall - its going to be hard to give you more of the answer without doing it for you.

                HISE Development for hire.
                www.channelrobot.com

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

                10
                Online

                810
                Users

                5.5k
                Topics

                51.9k
                Posts