linux: shared memory interface - link with librt
[supercollider.git] / HelpSource / Classes / NRand.schelp
bloba6be99ce2d5cc87331553ab402a0b5d9a72eceac
1 class:: NRand
2 summary:: Sum of uniform distributions.
3 related:: Classes/ExpRand, Classes/IRand, Classes/LinRand, Classes/Rand, Classes/TExpRand, Classes/TIRand, Classes/TRand
4 categories:: UGens>Random
6 Description::
8 Generates a single random float value in a sum of
9 code::n::  uniform distributions from
10 code::lo::  to  code::hi:: .
13 classmethods::
15 method::new
17 argument::lo
18 Lower limit of the output range.
20 argument::hi
21 Upper limit of the output range.
23 argument::n
25 table::
27 ## n = 1: || Uniform distribution - same as link::Classes/Rand::.
29 ## n = 2: || Triangular distribution.
31 ## n = 3: || Smooth hump.
36 code::n::  increases, distribution converges
37 towards gaussian.
40 Examples::
42 code::
45 SynthDef("help-NRand", { arg out=0, n=0;
46         Out.ar(out,
47                 FSinOsc.ar(
48                         NRand(1200.0, 4000.0, n),
49                         0, Line.kr(0.2, 0, 0.01, doneAction:2))
50         )
51 }).send(s);
55 n = 0;
56 Routine({
57         inf.do({ arg i;
58                 Synth.new("help-NRand", [\n, n]); 0.05.wait;
59         })
60 }).play;
63 n = 1;
64 n = 2;
65 n = 4;