-
... avoid unnecessary calculations and to make state immutable. // so for example, random values will result in a single instance: a = Thunk ({ \done .postln; rrand(2.0, 8.0) }); a.value; // posts "done" a.value; // it is an AbstractFunction, ...
-
Pgauss random values that follow a Gaussian Distribution superclass: Pattern Pgauss(mean, standardDeviation, length) mean The mean of the distribution (defaults to 0.0) standardDeviation The spread of values around the mean. length number o ...
-
... t less flexible. Compare these two examples: // first with a Function. Note the random frequency each time 'play' is called. f = { SinOsc .ar(440 + 200.rand, 0, 0.2) }; x = f.play; y = f.play; z = f.play; x.free; y.free; z.free; // Now with ...
-
... PV_Copy copy an FFT buffer PV_CopyPhase copy magnitudes and phases PV_Diffuser random phase shifting PV_HainsworthFoote PV_JensenAndersen PV_LocalMax pass bins which are a local maximum PV_MagAbove pass bins above a threshold PV_MagBelow p ...
-
... rets the array as a list of probabilities which should sum to 1.0 and returns a random index value based on those probabilities. ( Array .fill(10, { [0.1, 0.6, 0.3].windex; }).postln; ) normalizeSum Returns the Array resulting from : ( this ...
-
... Array(100,100, a.flat); // Accessing a[15][22] b[15, 22] // Speed comparison 1: random access bench { 100.do(a[100.rand][100.rand]) } bench { 100.do(b[100.rand, 100.rand]) } // Speed comparison 2: iteration bench { 100.do(a.do { |row| row.d ...
-
... n.dump; nil }) ]).play; }.value; ) //Pseed(seed, pattern) - set the seed of the random number generator // to force repetion of pseudo-random patterns Pn ( Pseed (44, Pbindf (q, \ctranspose , Pbrown (-3.0, 3.0, 10) ) ) ).play; //Proutine(fu ...
-
... ns control to the parent upon nil from either branch. Pseed(randSeed, pattern): Random number generators depend on seed values; setting a specific seed produces a repeatable stream of pseudorandom numbers. Pseed sets the random seed before ...
-
... ndow .new(400, 200, 0); // basic sine { SinOsc .ar(2000, 0, 0.25) }.play(s); // random saw { RLPF .ar( Saw .ar(110, 0.2), LFNoise2 .kr(1,1e4,1e4), LFNoise2 .kr(1, 0.2, 0.22)) }.play(s); // modulate phase { SinOsc .ar(800, SinOsc .ar( XLine ...
-
... ); ) ( g.set(0, 1.0); 100.do({ arg i; g.set(a.rand, (i+1).reciprocal)}); ) ( // random impulse response { var input, inputAmp, threshhold, gate; input = SoundIn .ar(0); inputAmp = Amplitude .kr(input); threshhold = 0.02; // noise gating thr ...