First time here? Check out the FAQ!
x

How do I have Replicator ignore elements in a Script (i.e., File Dialog Prompt)

0 votes
65 views

I've programmed a script to open a CSV file, and then create an ordered collection that can be used for array of parameters in other Sounds accessed using Replicator's individual voices as the index (?VoiceNumber - 1). 

I have a working example, but the number of voices in the Replicator prompts the file open dialog box the same number of times in the Script. Any way to have Replicator ignore this?  I tried "Shared Sound" in Replicator but this caused errors. If "Special Events" parameter is to be used, what would be added here if inside a Script?

Kyma file

http://kyma.symbolicsound.com/qa/?qa=blob&qa_blobid=9767709025712404211

Example data file (2-row CSV)

http://kyma.symbolicsound.com/qa/?qa=blob&qa_blobid=1110865342622611990

And if there's a different way to accomplish the same task, I'm all ears. Thanks all for the consideration.

asked Oct 3 in Capytalk & Smalltalk by jonbellona (Adept) (1,360 points)

1 Answer

+1 vote
 
Best answer

I would put the Script to the right of the Replicator. If I understand you correctly, you want to read two arrays out of a single file, and assign each element of the array to its own Voice (in the Replicator).

Here's an example

answered Oct 4 by ssc (Savant) (128,000 points)
selected Oct 5 by jonbellona
Thanks ssc. Yes. I'm looking to use elements in this way. In placing the Script to the right, I'll get the Replicator creating copies of my ?greenVariable, unless I put the ?greenVariable in Replicator's SpecialEvents parameter field. Yet when I do, the error, "For expressions containing hot parameters or variables, use min:, vmax:, varlfTrue:ifFalse:,varIfTrue:, varlfFalse:, or varlfFalse:if True:"  keeps coming back.  No stack trace. I'm not exactly following Capytalk Reference for vmax: or vmin:.  Any other resources?

Just in case, as reference, this is the Kyma Sound and same 2-row data test file
https://www.dropbox.com/t/nMZR1gmQFkMXIZGt
The variable ?panPositions represents an Array. In the Pan field you can use:

(?VoiceNumber-1) of: ?panPositions

instead of using #(?panPositions) as you had originally — that defines an Array containing the variable ?panPositions (but ?panPositions is already an Array).

In the Replicator, check the RenameSpecialEvents box, and remove ?panPositions from the SpecialEvents.
Rad! Thank you ssc!  I assumed incorrectly that checking the RenameSpecialEvents box was the same behavior as not checking the box and adding the name in SpecialEvents to exclude. Looks like checking the box explicitly excludes. I had tried multiple ways of writing out ?panPositions in my tests in the chance that was the issue, and I left it written out wrong. Good to know!  Thank you.

I'm closing the thread on this --> I put together the working version and test CSV data file up on Community Sound Library in case anyone reviews this question and wants the working Sound.
https://kyma.symbolicsound.com/library/script-array-accessed-by-replicator-voices/

Thanks again!
...