Kyma Forum
  Kyma Support
  scripts

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

next newest topic | next oldest topic
Author Topic:   scripts
garth paine
Member
posted 01 March 2005 00:20         Edit/Delete Message   Reply w/Quote
I have been working on learning more about scripting, and have this sound


counter start: 0 s.
1 to: 100 do: [:i |
Osc01 start: (i/8) s
freq: (i *100)
currentNum: i ]


freq: is in an Oscillator sound, and works fine

currentNum: is in a SoundToGlobalController sound - I am using it to show a could of the number of created oscilators - but it doesn't work. The !Count variable doesn't show in the VCS either.

Clearly I am doing something wrong that is very very simple?

IP: Logged

SSC
Administrator
posted 01 March 2005 10:05         Edit/Delete Message   Reply w/Quote
The problem you are having is that the Script can set the green variables within the Sound that the message is sent to (in this case Osc01), but cannot change any variables in the Sound counter. (In addition, you can set a green variable only once for each message.)

There are several ways you can do what you are asking:

* Make your oscillator a mix of the oscillator you have now and a SoundToGlobalController. You would need to place the SoundToGlobalController into a SetDuration (to a duration of 1/8 s or less) so that all of the SoundToGlobalControllers would not be running at the same time.

* You could keep your SoundToGlobalController separate, but place it in a SetDuration (as in the previous alternative). Then, in the loop, add "counter start: (1/8) s currentNum: i.". This will create a separate SoundToGlobalController for each count.

* Another way is to create an expression to use in the SoundToGlobalController that will increment once every 1/8 of a second. Here are two possibilities:

(1 bpm: (1/8) s bpm) countTriggers

or

(!LocalTime / (1/8)) truncated

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