Kyma Forum
  Kyma Support
  Array expressions...

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

next newest topic | next oldest topic
Author Topic:   Array expressions...
JackRosete
Member
posted 17 June 2006 23:12         Edit/Delete Message   Reply w/Quote
I'm writing an expression for the Durations parameter of the Analog Sequencer, to create an algorithmic array of 16 values in the following format:

1 + !Groove, 1 - !Groove, 1 + !Groove, 1 - !Groove etc.

Can't seem to get it to working however! This is my progress so far:

{(1 to: 16) collect: [ :durations |
| durmath |
durmath := (durations \\ 2).

----------------------------------------------------------

And I would like to do something like this for the last part of the expression:

durmath eq: 1 1 + !Groove
durmath eq: 0 1 - !Groove
]}

When durmath is 1, I would like it to trigger 1 + !Groove, and when durmath is 0, I would like it to trigger 1 - !Groove. But I'm not sure how to send Logic messages to Capytalk EventExpressions. I tried using asLogicValue, but no luck.

I also tried this:

{(1 to: 16) collect: [ :durations |
(durations \\ 2 = 0)
ifTrue: 1 - !Groove
ifFalse: 1 + !Groove
]}

But I realised that ifTrue and ifFalse are compiled with the sound and therefore not compatible with Capytalk right? How can I use Logic with Capytalk?

Could someone help me?

Thanks in advance...

Jack

[This message has been edited by JackRosete (edited 17 June 2006).]

IP: Logged

SSC
Administrator
posted 18 June 2006 09:47         Edit/Delete Message   Reply w/Quote
The arguments to ifTrue: and ifFalse: have to be in square brackets, for example

{(1 to: 16) collect: [ :durations |
(durations \\ 2 = 0)
ifTrue: [1 - !Groove]
ifFalse: [1 + !Groove]
]}

IP: Logged

JackRosete
Member
posted 18 June 2006 11:06         Edit/Delete Message   Reply w/Quote
Thanks! Worked great...

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