2 summary:: random values that follow a Poisson Distribution (positive integer values)
3 related:: Classes/Pgauss
4 categories:: Streams-Patterns-Events>Patterns>Random
11 The mean of the distribution.
14 Number of values produced.
21 a = Ppoisson(1.0, inf);
22 c = a.asStream.nextN(500);
23 w = Window.new("Ppoisson", Rect(10, 10, 540, 800));
25 c.plot(bounds: Rect(10, 10, 520, 380), discrete: true, parent: w);
26 // a histogram of the values
27 c.histo(500).plot(bounds: Rect(10, 410, 520, 380), parent: w);
32 a = Ppoisson(10.0, inf);
33 c = a.asStream.nextN(500);
34 w = Window.new("Ppoisson", Rect(10, 10, 540, 800));
36 c.plot(bounds: Rect(10, 10, 520, 380), discrete: true, parent: w);
37 // a histogram of the values
38 c.histo(500).plot(bounds: Rect(10, 410, 520, 380), parent: w);
43 SynthDef(\help_sinegrain,
44 { arg out=0, freq=440, sustain=0.05;
46 env = EnvGen.kr(Env.perc(0.01, sustain, 0.2), doneAction:2);
47 Out.ar(out, SinOsc.ar(freq, 0, env))
53 a = Ppoisson(1.0,inf).asStream;
56 Synth(\help_sinegrain, [\freq, (a.next + 72).midicps]);
64 a = Ppoisson(7.0,inf).asStream;
67 Synth(\help_sinegrain, [\freq, (a.next + 72).midicps]);