Kyma Forum
  Kyma Support
  Script issue!

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

next newest topic | next oldest topic
Author Topic:   Script issue!
JackRosete
Member
posted 19 August 2006 15:15         Edit/Delete Message   Reply w/Quote
I am using the following script within a Script Sound:

----------------------------------------------------------------------
| theFile |

theFile := SamplesFile
fromOldFilename: (HostDriverInterface
getFileWithPrompt: 'Select a Sample'
fileTypes: HostDriverInterface sampleFileTypes
ifCancel: [^ self]).
drumsequencer start: 0 s
filename: theFile filename asString
----------------------------------------------------------------------

That Script is to the right of a StereoMix4 Sound (called drumsequencer), connected to four Multisample Sounds (with some Panners and AnalogSequencers in between). In the Samples field of my Multisamples, I am using the following code:

{'?filename' sampleFileNamesInSameFolder}

What I would like is that each time I re-initialise my sound via ctrl-space, I can choose a sample (within a samples folder) for the Multisample sounds to work with. What seems to be happening is that the first time I initialise my Sound I can choose a sample/folder (and that works fine), and although I can also choose a sample/folder on subsequent re-initialisations, it remembers the initial sample/folder and sticks with the samples from that one!

What could be wrong?

Thanks!

Jack

[This message has been edited by JackRosete (edited 19 August 2006).]

IP: Logged

SSC
Administrator
posted 19 August 2006 15:34         Edit/Delete Message   Reply w/Quote
Instead of: {'?filename' sampleFileNamesInSameFolder}
it should be:

{?filename sampleFileNamesInSameFolder}

The single quotes around the question mark variable were turning it into a string.

IP: Logged

JackRosete
Member
posted 19 August 2006 15:41         Edit/Delete Message   Reply w/Quote
Great! i should have noticed that the script already specifies asString!

Merci...

IP: Logged

JackRosete
Member
posted 19 August 2006 16:03         Edit/Delete Message   Reply w/Quote
I spoke too fast. Now that I changed that script I'm getting the following error message:

Error: The message #asString, sent to OrderedCollection (a bunch of filenames), an instance of class OrderedCollection, was not understood.

What could be wrong?

IP: Logged

SSC
Administrator
posted 19 August 2006 16:25         Edit/Delete Message   Reply w/Quote
Since the MultiSample expects an Array, you could set the array value from the Script. For example:

| theFile |
theFile := HostDriverInterface
getFileWithPrompt: 'Select a Sample'
fileTypes: HostDriverInterface sampleFileTypes
ifCancel: [^ self].
multi start: 0 s
files: theFile asString sampleFileNamesInSameFolder

and in the MultiSample, in the Samples field, you could use the variable: ?files

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