Getting parse errors when using ?: in a SysEx expression.
If I begin with:
… which is in text:
cc(127,16)==0 ? clamp( ((log(value,10)*20>=-6) ? ((log(value,10)*20 + 26.8235294118) * 31.1666666641) : (826-Sqrt(-34869-220660*log(value,10)))) / 8.05511811024, 0, 127) : ""
everything is AOK, and the expression evaluates to x6E. I am trying to send that x6E as the value of CC 7 on channel 1, so I add x"B007" before the clamp() expression …and I get Error in sys-ex data: syntax error, expected Colon found Identifier:
I have tried a lot of variations with parenthesis and such, and keep getting this error …
Why Am I doing this?
I’m trying to install a “guard” using cc(127,16) to avoid sending extraneous CC’s to my VL70 hardware when I am just setting my Controller Bar cc’s to match the VL70 hardware after a patch change.
There seems to be no way to execute a binding conditionally based on a different CC value. I looked into:
-
disabling the binding during the period when I want to avoid sending CC’s, but I cannot change the enabled state of a binding from another binding.
-
I also cannot use the conditional features of the new Expression engine, because the expression engine does not have the math functions to convert from a Gain value to a MIDI value (I’m using a Custom Curve).
So … I am trying to send “nothing” (the “” at the end of the expression) when cc(127,16) is flagging the “no send” period.
Not sure if this calls for @brad attention.