k y m a • t w e a k y — the kyma collective || view the current website || February 2015 Archive

/ WebHome / Sounds / Share.RandomlySelectedSampleFullDurationDiscuss

Search


Share Section


Sounds
Samples
Timelines
Tools
Microsounds

Home 
Topics 
More... 

All Sections


Products
Order
Company
Community
Share
Learn

Login / Register 
Change password
Forgot password?

Symbolic Sound


Home
Kyma Forum
Eighth Nerve

TWiki Links


twiki.org
The Script gives you a file dialog and asks you to select one sample out of the folder. It computes nbrFiles using:

filesInSameFolder := fileName fileNamesOfSameTypeInSameFolder.

In the Sound itself, there's a SoundToGlobalController? that generates a random index named !RandIndex that can be shared by all modules in the Sound.

((1 triggerTimeToNext: !DurOfNext s) nextRandom abs * ?nbrFiles) truncated + 1

Where does !DurOfNext come from? It is generated by the other SoundToGlobalController? using the expression:

!RandIndex of: ?durations

Where does the variable ?durations come from? It is an Array computed and passed in from the Script using the Smalltalk expression:

(filesInSameFolder collect: [:sf | sf sampleFileDuration removeUnits]).

Multisample is the only part of this Sound actually generating an audio signal. It is triggered by:

1 triggerTimeToNext: !DurOfNext s

and selects which file to play using the generated !RandIndex


“In Smalltalk, everything happens somewhere else.” – Adele Goldberg

-- CarlaScaletti - 09 Jul 2009

 
 
© 2003-2014 by the contributing authors. / You are TWikiGuest