HISE Logo Forum
    • Categories
    • Register
    • Login

    Finding Values of Knob controlled by another

    Scheduled Pinned Locked Moved General Questions
    valuescontroller
    4 Posts 2 Posters 363 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.
    • trillbillyT
      trillbilly
      last edited by

      Hey Gang,

      Heres the sitch...

      I have a Master FX Knob set to NormalizedPerecntage. It is scripted to control some FX Knobs.

      One of these FX Knobs controls the WET Amount of the Reverb and is set to 60%.

      I need the Master FX Knob to to see 60% as the highest value for the WET Amount on that Reverb.

      If the Reverb WET Amount is changed via the FX Knob that controls it, the Master FX Knob will then see the new amount as the highest value and so on...

      Can anyone point me in the direction for this one?

      Thanks!

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

        Think I might have covered that in this video

        Actually it's a video on my Patreon, it's called "Linked knobs controlling reverb"

        Just a moment...

        favicon

        (www.patreon.com)

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

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

          @d-healey Awesome, Ill check this out tonight or tomorrow!

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

            @d-healey Hey David, Im doing something wrong here.

            The knobs that control the FX work correctly. The Master has no effect at all on anything EXCEPT the linked Saturator knob. All it does is turn it back to 0 instantly.

            Can you spot what Im doing wrong here?

            //MAIN EFFECTS
            
            const KnobsMax = [1, 1];
            
            //Knobs Being Controlled
            const knobs = [];
            
            for (i = 0; i < 4; i++)
            
            {
            	knobs.push(Content.getComponent("knb" + i));
            	knobs[i].setControlCallback(onknobControl);
            }
            
            //Link Buttons
            const btns = [];
            
            for (i = 0; i < 2; i++)
            
            {
            	btns.push(Content.getComponent("linkbtn" + i));
            }
            
            //Linked FX
            const var SatLink = Synth.getEffect("Saturator1");
            const var ChorLink = Synth.getEffect("Chorus1");
            const var PhaseLink = Synth.getEffect("PhaseFX1");
            const var BitLink = Synth.getEffect("BitCrusher");
            
            					  
            //Linked Knobs Callbacks
            inline function onknobControls(component, value)
            {
            	local index = knobs.indexOf(component);
            	KnobsMax[index] = value;
            	
            	setSaturator(index, value);
            	setChorus(index, value);
            	setPhaser(index, value);
            	setBitCrusher(index, value);
            }
            					  
            //Master Knob
            const MainFXknb = Content.getComponent("MainFXknb");
            MainFXknb.setControlCallback(onMainFXknbControl);
            
            inline function onMainFXknbControl(component, value)
            {
            	for(i = 0; i < knobs.length; i++)
            	{
            		if(btns[i].getValue())
            		{
            			knobs[i].setValue(knobsMax[i] * value);
            			setSaturator(i, knobsMax[i] * value);
            			setChorus(i, knobsMax[i] * value);
            			setPhaser(i, knobsMax[i] * value);
            			setBitCrusher(i, knobsMax[i] * value);
            		}
            	}
            	
            }
            
            inline function setSaturator(index, value)
            {
            	SatLink[index].setAttribute(Saturator1[index].WetAmount, value);
            }
            
            inline function setChorus(index, value)
            {
            	ChorLink[index].setAttribute(Chorus1[index].Rate, value);	
            }
            
            inline function setPhaser(index, value)
            {
            	PhaseLink[index].setAttribute(PhaseFX1[index].Mix, value);	
            }
            inline function setBitCrusher(index, value)
            {
            	BitLink[index].setAttribute(BitCrusher[index].Quant, value);
            }
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            22

            Online

            1.7k

            Users

            11.8k

            Topics

            102.4k

            Posts