First time here? Check out the FAQ!
x

How can I load different samples into each replicated instance of the sample bits class?

0 votes
308 views
...or any of the sample player classes.

I'm guessing this is a simple piece of scripting. If someone can link me to an example patch, that would be great.

Any help appreciated.
asked Jan 18, 2018 in Capytalk & Smalltalk by lewis-griffin (160 points)

1 Answer

0 votes

Within a Replicator, you have access to two green variables: ?VoiceNumber and ?NumberVoices. So if you have a Replicator on a SampleBits, you could use ?VoiceNumber as the index into an Array of sample names. For example, in the Sample field of the SampleBits, you could use:

{?VoiceNumber - 1 of: #('funky bass.aif' 'Alien threat.aif' 'Count.aif' 'frase.aif')}

Then each copy created by the Replicator would reference a different samples file.

answered Jan 18, 2018 by ssc (Savant) (128,200 points)
...