logical statement

muqeem's picture

I 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

PreviewAttachmentSize
logic from kineme.qtz2.69 KB

hyprctv.farbraum's picture
Re: logical statement

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

PreviewAttachmentSize
Logical Statement.qtz3.06 KB

muqeem's picture
Re: logical statement

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,