Page 1 of 1

switching flags on and off

Posted: 11 Sep 2012 13:18
by Phil999
I need to switch flags to scripts on and off. To prevent undesired feedback.

It has been discussed here:

http://liine.net/forum/viewtopic.php?f= ... flag#p6080

and one can find it also in the Flexi14 template:

http://liine.net/en/community/user-library/view/299/

But I didn't get it how it is done exactly. In the attachment there is also an example in the VCOtuning2 knob. suppressReTx is activated with the NRPNinput script. But when I try to do the same with the Knob6.suppressFine script, the code is red. Obviously I don't understand how to work with flags.

I need to switch off setcoarse and setfine in the VCO2tuning knob when I touch Knob6 or 7. How do I do that?

Re: switching flags on and off

Posted: 14 Sep 2012 14:55
by nick_liine

Code: Select all

if (Knob7.x) NRPNs.VCO2tuning.setfine=0;
I'm not exactly sure what you're trying to accomplish with the script, but the reason it's red is because setfine is a script, not an expression. If setfine, as a script, were configured to take arguments then you could do NRPNs.VCO2tuning.setfine(0), but that is also not the case.

Hope this helps,
Nick

Re: switching flags on and off

Posted: 10 Oct 2012 01:51
by Phil999
yes I forgot to explain what I want to accomplish exactly:

When I change presets in the VSTi, the two scripts VCO2tuning.setcoarse and VCO2tuning.setfine should be active, and when I move Knob6 or Knob7, they should be deactivated.

If I do this manually in the editor, unticking the two scripts, there is no feedback problem.

Re: switching flags on and off

Posted: 11 Oct 2012 15:27
by Phil999
because I can't use the x variable of the knobs, I introduced a switch to toggle the said scripts. Feedback problem solved.

Every time the tune parameters have to be changed, the switch must be set to 1, and every time I change a preset in the VSTi, the switch has to be set to 0. Not exactly how I wanted, but at least functional. I hope the Knob object will get a z variable some day, then I won't need this workaround with this extra switch.