Thanks Adrian

Yes in the past I would have used "&&” (AND), “||” (OR) in the maths 
expressions rather than the “? T : F” notation. Much cleaner to read, but it’s 
a year since I did any QC coding!

Best
Alastair

Alastair I Leith

Useful  Design
+61 432  889  831
11  Mouquet Vista
White  Gum Valley
WA 6162 Australia

> On 19 Mar 2018, at 9:17 am, Adrian Ward <adr...@clayinteractive.co.uk> wrote:
> 
> 
> LOGIC101
> 
> You can specify multiple conditions within the same Maths patch.
> 
> "a > 3" is one condition, the result of which is true when a is higher than 3.
> 
> "a < 8" is another condition, the result of which is true when a is below 8.
> 
> Use a boolean operator (&& aka "Logical AND") to specify that you want BOTH 
> of these conditions to be true to generate a final true output (eg. a is more 
> than 3 and less than 8):
> 
> (a > 3) && (a < 8)
> 
> A different boolean operator (|| aka "Logical OR") might be used to specify 
> that you either EITHER of two conditions to be true to generate a final true 
> output (eg. a is less than 2 or more than 7):
> 
> (a < 2) || (a > 7)
> 
> You can combine as many operators as you like into a single expression, just 
> be careful to use parenthesis to place brackets around groups of conditions 
> so that it is unambiguous what you intend with your logic. Get this wrong, 
> and you will experience bugs and unintended behaviour.
> 
> ((a < 2) || (a > 7)) && (a == 4)
> 
> Also, be careful you don't accidentally use & and | which mean completely 
> different things, the subject of which will be covered in a future tutorial.
> 
> Class dismissed.
> 
> 
>> On 18 Mar 2018, at 20:20, Xoán-Xil López <xoan...@gmail.com 
>> <mailto:xoan...@gmail.com>> wrote:
>> 
>> Thanks Alastair for your quick answer and for the example,
>> 
>> I guess I didn´t explain well. I think what I am looking for is different. 
>> When I start the DAW I get in QC an increasing count with the measures 
>> numbers (1, 2 , 3, 4, 5, 6, 7, 8, etc...). 
>> 
>> So, if I create, for example, a math expression "a > 3" when I get 4 and the 
>> Math expression object is conected to the "enable" circle conector the 
>> circle patch is enabled. That works great.
>> 
>> But I can not imagine how to create an Math expression for send 0 or disable 
>> the circle object when the counter reaches, for example, 8 in the count?
>> 
>> Sorry if I am not beeing very descriptive.
>> 
>> 
>> 
>> 2018-03-18 16:00 GMT+01:00 Alastair Leith <usefuldesign...@gmail.com 
>> <mailto:usefuldesign...@gmail.com>>:
>> I’m not sure what form the time signature or “measures informations” are 
>> expressed in.
>> 
>> but if you are talking about 4/4 or 3/4 or 6/8 or 11/12 type or time 
>> signatures this come shows you how.
>> 
>> I’m assuming the time signature comes in “3, 4” type of string and I split 
>> it with a String Components patch.
>> 
>> 
>> 
>> hope that helps
>> 
>> Best
>> Alastair
>> 
>> Alastair I Leith
>> 
>> Useful  Design
>> +61 432  889  831
>> 11  Mouquet Vista
>> White  Gum Valley
>> WA 6162 Australia
>> 
>>> On 18 Mar 2018, at 10:59 pm, Xoán-Xil López <xoan...@gmail.com 
>>> <mailto:xoan...@gmail.com>> wrote:
>>> 
>>> Hi,
>>> 
>>> I need some help with a mathematical expresion.
>>> 
>>> I am getting the measures from a DAW with midiclock receiver and I would 
>>> like to enable and dissable elements inside Quartz Composer using the 
>>> mesaures informations.
>>> 
>>> For instance, I want a video enable in measure 3 and disable in measure 
>>> 10... How do I write this as a Math expression.
>>> 
>>> Thanks in advance
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com 
>>> <mailto:Quartzcomposer-dev@lists.apple.com>)
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/quartzcomposer-dev/usefuldesign.au%40gmail.com
>>>  
>>> <https://lists.apple.com/mailman/options/quartzcomposer-dev/usefuldesign.au%40gmail.com>
>>> 
>>> This email sent to usefuldesign...@gmail.com 
>>> <mailto:usefuldesign...@gmail.com>
>> 
>> 
>> 
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com 
>> <mailto:Quartzcomposer-dev@lists.apple.com>)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/quartzcomposer-dev/adrian%40clayinteractive.co.uk
>>  
>> <https://lists.apple.com/mailman/options/quartzcomposer-dev/adrian%40clayinteractive.co.uk>
>> 
>> This email sent to adr...@clayinteractive.co.uk 
>> <mailto:adr...@clayinteractive.co.uk>
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com 
> <mailto:Quartzcomposer-dev@lists.apple.com>)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/quartzcomposer-dev/usefuldesign.au%40gmail.com
>  
> <https://lists.apple.com/mailman/options/quartzcomposer-dev/usefuldesign.au%40gmail.com>
> 
> This email sent to usefuldesign...@gmail.com 
> <mailto:usefuldesign...@gmail.com>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to