One knob that toggles two effects on and off.
-
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);
-
@tiesvdam
setEnabled
isn't a function, check the API browser. You probably want to usesetBypassed
-
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?
-
@tiesvdam if they're sliders have you tried .setValue(0); or (1); and then .changed(); ?
-
Ah, I already found it! It was because I had linked the on/off button to a procesorwld. When I disconnected it, it worked.
-