Kyma Forum
  Kyma Support
  Array script error!

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

next newest topic | next oldest topic
Author Topic:   Array script error!
JackRosete
Member
posted 27 October 2006 09:03         Edit/Delete Message   Reply w/Quote
I'm getting the following error:

'HotVariables cannot perform the operation top24'.

It is being triggered by the following array code:

(!BPM / (!LoopSpeed into: #({0@(!BPM/2)} {0.25@(!BPM/3)} {0.5@(!BPM/4)} {0.75@(!BPM/8)} {1@(!BPM/16)})))

I'm guessing that into: arrays cannot work with hot variables then? Or is there another problem with my code?

Thanks!

[This message has been edited by JackRosete (edited 27 October 2006).]

IP: Logged

JackRosete
Member
posted 27 October 2006 09:07         Edit/Delete Message   Reply w/Quote
I also tried using ('bpm' asHotValue) in place of !BPM, but no luck

IP: Logged

Phi Curtis
Member
posted 27 October 2006 12:37         Edit/Delete Message   Reply w/Quote
Yeah, you definitely can't use {0@!HotValue} in an array - it's a smalltalk vs. capytalk thing, and the need for that to be a literal value as opposed to an EventExpression.

I don't have an alternative approach to try for that, unfortunately - maybe someone does?

IP: Logged

JackRosete
Member
posted 27 October 2006 13:21         Edit/Delete Message   Reply w/Quote
Thanks for the info... I have now found a workaround using some other scripts. But I wanted to know whether there was a syntactical error in my code, or whether it was a problem like the one you described, Capytalk vs Smalltalk.

Cheers!

IP: Logged

SSC
Administrator
posted 27 October 2006 13:52         Edit/Delete Message   Reply w/Quote
Although an into: array cannot contain hot values, a regular array can. For example, the following expression might do what you need:

1 bpm: ((5 * !LoopSpeed) of: #({!BPM* 2} {!BPM * 3} {!BPM * 4} {!BPM * 8} {!BPM *16} ))

Only difference is, this would jump to discrete multiples of the BPM rather than smoothly interpolating from one to the next. For smooth interpolation, you could use:

1 bpm: ((((5 * !LoopSpeed) of: #({!BPM* 2} {!BPM * 3} {!BPM * 4} {!BPM * 8} {!BPM *16}))) smooth: !BPM bpm s)

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