Date
1 - 3 of 3
Help with conditional effect controls
Moff40
Hi All; I'm trying to setup an effect switch with an if...else condition check. First, if I type "if", the following pick list does not include the pre-defined "EFFECT_ON" or "EFFECT_OFF" variables, so I type them in manually, but there's a parsing error. I'm not a programmer, but I do understand opening and closing blocks. Here's what I want to do: Because of the way I have the effects wired in my GCX, I need the EFFECT_ON to enable loop 5, but then check whether another effect is already on, and if it isn't, then also enable loops 7 and 8. If it is, then only enable loop 5. Here's what I wrote:
EFFECT_ON SPX =
{
SendMidi GCX CtrlChange 5 127
if (EFFECT_OFF "TERC")
{
SendMidi GCX CtrlChange 7 127
SendMidi GCX CtrlChange 8 127
}
else
{
}
}
The error I get is "Error parsing the programming code on line 103: specify at least 1 command for SPX." Second, how to you define a Boolean variable? And can it be done in the FCB_Init block? I wrote: VAR $terc_on = false but got the red x. |
|
Moff40
Nevermind. I figured it out. I still cant find the predefined “EFFECT_ON” variable in the pull-down list, but I made my own, called SPX _ ON and TERC_ON, and called them with: if (!$TERC-ON){ //commands } and all is OK now. On Dec 19, 2022, at 8:05 PM, Moff40 <bob.moffatt@...> wrote:
|
|
ossandust
don't use double quotes around the effect name
if (EFFECT_OFF TERC) |
|