|
logical statementI am having little challenge to learn local statements. I wanted to trigger on/off when I have a middle value. Lets say greater than 100 but less than 106. So the sound should be "on" when the values are 100, 101, 102, 103, 104, 105 but should not be there on any other value. Please see the attached file, and if there are examples or patches to learn more on logical statements, please forward those, really appreciate that. thanks a lot |
Well... AudioTool in your composition crashs my QC. So here is a small example how to use logical expressions in the Mathematical Expression Patch. In this case I'm using the boolean expression
"100 <= value && value <= 105 "
Boolean Operators (<, >, ==,...) bind stronger than logical operators (&&, ||, ...) , so the statement can be read as
"(100 <= value) && (value <= 105) "
so the whole expression returns TRUE, if and only if the value is bigger or equal than 100 AND smaller or equal 105.
Hope this will help you.
Best wishes Janni
This is so much fun, i think I will have to play further with logical statements in QC. I leant something simple but so valuable, thanks a lot and my apologies for crashing the QC, I think QC was looking for the sound file that I had on my machine.
I appreciate for your help,