I'm confused why you're manipulating both the effect enabled switch and the mix knob. If you want to toggle the effect, just use the enabled switch.
Also, this code looks strange:
engine.setValue("[EffectRack1_EffectUnit1_Effect1]","enabled",+fxSlot1_enabled+);
I'm not sure what's going on with those +'s around fxslot1_enabled, but they're probably doing some implicit type conversion that isn't quite what you think it is. JavaScript's type conversions can be really weird and unintuitive, especially with the + operator. Generally, you shouldn't rely on implict type conversions in JavaScript. For some humorously absurd examples, see https://www.destroyallsoftware.com/talks/wat
I'm confused why you're manipulating both the effect enabled switch and the mix knob. If you want to toggle the effect, just use the enabled switch.
Also, this code looks strange: setValue( "[EffectRack1_ EffectUnit1_ Effect1] ","enabled" ,+fxSlot1_ enabled+ );
engine.
I'm not sure what's going on with those +'s around fxslot1_enabled, but they're probably doing some implicit type conversion that isn't quite what you think it is. JavaScript's type conversions can be really weird and unintuitive, especially with the + operator. Generally, you shouldn't rely on implict type conversions in JavaScript. For some humorously absurd examples, see https:/ /www.destroyall software. com/talks/ wat