2 summary:: pattern that indexes into an array
3 related:: Classes/Pswitch
4 categories:: Streams-Patterns-Events>Patterns>List>Indexing
8 This allows an link::Classes/ArrayedCollection:: to be accessed within patterns.
15 the array. Can be a link::Classes/Pattern::.
18 the value to retrieve. Can be a link::Classes/Pattern::.
21 specifies the number of repeats.
27 SynthDef(\help_pindex, { | out, amp=0.1, freq=440, gate=1 |
28 var son = Saw.ar(freq * [0.99, 1, 1.01]).mean;
29 son = son * EnvGen.ar(Env.adsr, gate: gate, doneAction:2);
30 Out.ar(out, son.dup * amp);
35 var data = [7, 13, 12, 2, 2, 2, 5];
36 var indices = [0, 0, 2, 0, 4, 6, 7];
38 \instrument, \help_pindex,
39 \choice, Prand(indices, inf),
40 \degree, Pindex(data, Pkey(\choice), inf),