class library: SynthDef - lazy implementation of removeUGen
[supercollider.git] / HelpSource / Classes / Rand.schelp
blob724fa97200a4f35ce0cc544928f2a90edf05b22b
1 class:: Rand
2 summary:: Single random number generator.
3 related:: Classes/ExpRand, Classes/IRand, Classes/LinRand, Classes/NRand, Classes/TExpRand, Classes/TIRand, Classes/TRand
4 categories:: UGens>Random
6 Description::
8 Generates a single random float value in uniform distribution from
9 code::lo::  to  code::hi:: . It generates
10 this when the SynthDef first starts playing, and remains fixed for
11 the duration of the synth's existence.
14 classmethods::
16 method::new
18 argument::lo
19 Lower limit of the output range.
21 argument::hi
22 Upper limit of the output range.
24 Examples::
26 code::
29 SynthDef("help-Rand", { arg out=0;
30         Out.ar(out,
31                 FSinOsc.ar(
32                         Rand(200.0, 400.0),
33                         0, Line.kr(0.2, 0, 1, doneAction:2))
34         )
35 }).send(s);
39 Routine({
40         8.do({
41                 Synth.new("help-Rand"); 1.0.wait;
42         })
43 }).play;