Kyma Forum
  Tips & Techniques
  Script vs MidiVoice/MidiMapper

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

next newest topic | next oldest topic
Author Topic:   Script vs MidiVoice/MidiMapper
Douglas Kraul
Member
posted 24 September 2004 18:20         Edit/Delete Message   Reply w/Quote
I know the manual is pretty clear on this point: don't use a Script when you want to generate Sound events but now that I've gotten to know the Script and MidiVoice scripting features a bit the issue is no longer clear. Even more confusing is that something like the LimeInterpeter is very similar to Script yet it is clearly doing the work of generating events. So I am looking for any light that might be shed on this.

In use I sometimes find that Script is easier to accomplish the task of generating a collection of sound events based upon one or more Sounds. For example lets say there is a Sound which has four parameters, P1-P4 that you would like to set differently for each event. The MidiVoices's note event model only provides frequency and velocity so you are forced to use controllers and hotVariables. This IMO makes the code more complex as the event ends up spread across multiple SmallTalk statements. In contrast the SmallTalk to instantiate a Sound in a Script allows you to pass the variables directly in the creation statement.

So I am wondering what I am missing here. Is it "bad" to generate a lot of Sounds/events using a Script (bad in that it is lsow and chokes the Capy) or is it more matter of preference and style.

I love the fact that Kyma lets you do things like encapsulate a Sound and a collection of events driving it as a new Sound but I keep finding that I am more naturally at home doing it using the Script facility than the MidiVoice/MidiMapper. Am I on the road to perdition?

Thanks!

Doug

IP: Logged

SSC
Administrator
posted 25 September 2004 11:42         Edit/Delete Message   Reply w/Quote
It is not bad to use the Script to generate events, but there is more overhead in the Sound compiler and (potentially) on the Capybara.

When you use the Script, you are creating a Mixer that contains one Sound per event generated. The Sound compiler must evaluate the parameters of each of the Sounds and determine when and where to schedule the Sound on the Capybara. This means that as you increase the number of events generated in the Script, the compile and load phase for playing the Script will increase and you will have to wait longer for your Script to play. In addition, the Mixer gets larger (although the Sound compiler does a pretty good job optimizing it), which could mean that the Sound will use more computation time than available on your Capybara.

On the other hand, when playing the MIDIVoice Script, the Sound compiler needs to compile and load only as many Sounds as the Polyphony specified in the MIDIVoice (independent of the number of events). The note and controller information can be very quickly compiled, so as the number of events increases, the increase in time spent compiling and loading is small. In addition, the number of Sounds playing on the Capybara is constant, so if the Sound can run on your Capybara with one event it can run with a thousand events.

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