2 summary:: random values that follow a Exponential Distribution
4 categories:: Streams-Patterns-Events>Patterns>Random
10 lo and hi should both be positive or negative (their range should not cross 0).
14 lower boundary of values.
17 upper boundary of values
20 number of values produced.
27 a = Pexprand.new(0.0001, 1, inf);
28 c = a.asStream.nextN(500);
30 c.plot(bounds: Rect(10, 10, 520, 380), discrete: true, parent: w);
31 // a histogram of the values
32 c.histo(500).plot(bounds: Rect(10, 410, 520, 380), parent: w);
37 SynthDef(\help_sinegrain,
38 { arg out=0, freq=440, sustain=0.05;
40 env = EnvGen.kr(Env.perc(0.01, sustain, 0.2), doneAction:2);
41 Out.ar(out, SinOsc.ar(freq, 0, env))
48 a = Pexprand(0.0001, 1.0,inf).asStream;
51 Synth(\help_sinegrain, [\freq, a.next * 600 + 300]);