HISE Logo Forum
    • Categories
    • Register
    • Login

    One knob that toggles two effects on and off.

    Scheduled Pinned Locked Moved General Questions
    6 Posts 3 Posters 193 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.
    • T
      tiesvdam
      last edited by

      I'm trying to use the on/off knob to toggle both the vinyl crackle and the RC20 effect on and off, so that one can't be on when the on/off knob is active. I created the following script, but it doesn't work. What am I doing wrong?

      const RC20 = Synth.getModulator("RC20");
      const VinylCrack = Synth.getEffect("VinylCrack");
      
      
      inline function onVintageControl(component, value)
      {
      	if(value)
      	{
      		RC20.setEnabled(false);
      		VinylCrack.setEnabled(false);
      	}
      	else
      	{
      		RC20.setEnabled(true);
      		VinylCrack.setEnabled(true);
      	}
      };
      
      Content.getComponent("RC20button").setControlCallback(onVintageControl);
      
      
      
      d.healeyD T 2 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey @tiesvdam
        last edited by

        @tiesvdam setEnabled isn't a function, check the API browser. You probably want to use setBypassed

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

        1 Reply Last reply Reply Quote 0
        • T
          tiesvdam @tiesvdam
          last edited by

          @tiesvdam

          Thanks for the tip! I actually tried this first, but unfortunately, it didn’t work either, which is why I started looking for another solution. Could it be because they are sliders instead of buttons?

          Scherm­afbeelding 2025-02-27 om 13.33.38.png

          rglidesR 1 Reply Last reply Reply Quote 0
          • rglidesR
            rglides @tiesvdam
            last edited by

            @tiesvdam if they're sliders have you tried .setValue(0); or (1); and then .changed(); ?

            T 1 Reply Last reply Reply Quote 0
            • T
              tiesvdam @rglides
              last edited by

              @rglides

              Ah, I already found it! It was because I had linked the on/off button to a procesorwld. When I disconnected it, it worked.

              rglidesR 1 Reply Last reply Reply Quote 0
              • rglidesR
                rglides @tiesvdam
                last edited by

                @tiesvdam 👍

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

                13

                Online

                1.7k

                Users

                11.8k

                Topics

                102.6k

                Posts