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

/ WebHome / How.StepThroughAnArray

Search


How Section


How do I...
Add a question...

Home 
Topics 
More... 

All Sections


Products
Order
Company
Community
Share
Learn

Login / Register 
Change password
Forgot password?
%SESSION_IF_AUTHENTICATED% Site Map
%SESSION_ENDIF%

Symbolic Sound


Home
Kyma Forum
Eighth Nerve

TWiki Links


%SESSION_IF_AUTHENTICATED% TWiki Shorthand
TWiki Formatting FAQ
What is TWiki?
%SESSION_ENDIF% twiki.org

Question (or Task)

I have an array in a Frequency field of a Sample that looks something like: (!KeyDown nextRandom abs * 5 of: #( 30 40 50 60 70)) nn (this is expression is actually from the book) which is helping me understand the nature of arrays and where one can use them...So this expression play's randomly because of nextRandom abs. My question would be how can I play through the array consecutively? My guess is that I would replace the !KeyDown nextRandom abs * 5 with something else. But what?

Solution(s)

Yes, you're right about replacing the nextRandom part of the expression. Here's a hint: if you were to count the triggers you receive from the !KeyDown, then it would give you the numbers in sequence: 0, 1, 2, etc. Then you could use those as the indexes into your array. So you could look in the book for an expression that would count triggers. If you want it to wrap around to the beginning again after it reaches the end, use the version of the expression that includes "mod":

(!KeyDown countTriggersMod: 5) of: #( 30 40 50 60 70)) nn

-- CarlaScaletti - 08 Dec 2006

WebForm
Question: How do I step through the values of an array consecutively, one on each !KeyDown?
Keywords: arrays consecutive sequencer

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