Gen~ [expr] syntax
Hey All,
I'd really appreciate a helping hand, I'm at a standstill. I am working in a larger gen~ patch, involving triggering a loop if the playback pointer if outside of a certain window. I typed up a nice little expr object that works when I test it in a regular patch, but when I try the gen~ version inside of my patch, I am constantly getting two error messages saying "expr missing ')'", and I can't figure out where I'm missing a parenthesis. More importantly, I'm not really clear on the order of operations in expr, and when parenthesis are necessary (they certainly make things look clearer).
logic:
Output 1 if...
($i2$i3) is true;
~OR~ if BOTH of the following are true ($i1$i3).
typed up as so:
[expr (in2in3) || (in1in3)]
As the above does not work in Gen~ expr, and even after trying a half dozen variations I'm still constantly getting error messages, I come to you for help!
[added additional info to original post]
It's a typo (a missing &), which is confusing the GenExpr parser. Try:
[expr (in2in3) || (in1in3)]
Ah, so simple! Thank you sincerely Graham. I am still learning the operators. You have helped me write my first proper logical expr expression, I'm thankful!
BTW if you prefer English, you can also write:
[expr (in2 < in3) and ((in1 < in2 or in1 > in3) or (in1 < in2 and in1 > in3))]