First time here? Check out the FAQ!
x

If I replicate a Replicator how do I access ?VoiceNumber?

0 votes
392 views

If I have nested replicators, one inside another, how can I reference the combined ?VoiceNumber?

Nested replicators rewrite event names in a useful way, eg:

!Level_1_1, !Level_1_2, !Level_1_3, !Level_2_1...

Is there an equivalent way of accessing the ?VoiceNumber from both replicators inside my replicated sound? It seems as if ?VoiceNumber only references the inner most replicator. 

Here's an example:
http://kyma.symbolicsound.com/qa/?qa=blob&qa_blobid=13429959624289010729

asked Sep 14, 2016 in Capytalk & Smalltalk by alan-jackson (Virtuoso) (15,840 points)

1 Answer

+3 votes
 
Best answer

Hi Alan.

I do it by passing the ?VoiceNumber from the outer replication through a script to the inner replication.

For example :

A script just before the inner replication would contain the following:

 

(inputs at: 1) start: 0 s

outerVoiceNumber: ?VoiceNumber

Also specify ?outerVoiceNumber to be excluded from being renamed list (i.e. SpecialEvents) in the contsructor of the inner replication

and then refer to outerVoiceNumber inside the inner replication

answered Sep 15, 2016 by cristian-vogel (Master) (8,460 points)
selected Sep 15, 2016 by alan-jackson
Fantastic, thanks Cristian!

By "script", I'm assuming you mean a script Sound?
Yes. The first line tells the first Sound of the Scripts input (you can have a few plugged there) and all sounds connected to it to start immediately when the Sound compiles and runs. Then its a list of variables (or substitutions if you like) that you can refer to by name (with a question mark) eg. ?outerVoiceNumber....  in the Signal flow that the Script has started.

more tricky to explain than do!
...