Kyma Forum
  Kyma Support
  logical operators

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   logical operators
Bill Meadows
Member
posted 12 December 2002 22:33         Edit/Delete Message   Reply w/Quote
How do I perform logical AND and OR operations in expressions?

I need to make a trigger when "this" AND "that" are true.

IP: Logged

SSC
Administrator
posted 13 December 2002 09:46         Edit/Delete Message   Reply w/Quote
AND == *
OR == +
TRUE == 1
FALSE == 0

A logical test like (!KeyNumber eq: 60) equals 1 if true and 0 if false. For example, to trigger when middle C is down AND the !KeyVelocity is high enough, you could use the expression:

(!KeyNumber eq: 60) * (!KeyVelocity gt: 0.5)

To trigger when EITHER condition is true you could use

(!KeyNumber eq: 60) + (!KeyVelocity gt: 0.5)

For expressions or Sounds that are not ordinarily used as logic values (i.e. they take on continuous values between -1 and 1), you can force them to be either 0 or 1 using the message

asLogicValue

For example

[aThresholdSound] L asLogicValue


IP: Logged

Bill Meadows
Member
posted 13 December 2002 11:42         Edit/Delete Message   Reply w/Quote
Perfect.

Thanks.

(btw-Any thoughts about a CapyTalk workshop?)

[This message has been edited by Bill Meadows (edited 13 December 2002).]

IP: Logged

SSC
Administrator
posted 13 December 2002 12:50         Edit/Delete Message   Reply w/Quote
It is part of the immersion weekend but we could into it in more depth in the "repeat offenders" workshop.

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c