sclang: ServerShmInterface - try to avoid multiple destructor calls
[supercollider.git] / HelpSource / Classes / IRand.schelp
blobe709ffbeacfdcd0058bd5b4b2273e83a506d415e
1 class:: IRand
2 summary:: Single integer random number generator.
3 related:: Classes/ExpRand, Classes/LinRand, Classes/NRand, Classes/Rand, Classes/TExpRand, Classes/TIRand, Classes/TRand
4 categories:: UGens>Random
6 Description::
8 Generates a single random integer 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::
28 SynthDef("help-IRand", {
29         Out.ar(
30                 IRand(0, 1), //play on random channel between 0 and 1
31                 FSinOsc.ar(500,
32                         0, Line.kr(0.2, 0, 0.1, doneAction:2))
33         )
34 }).send(s);
38 Routine({
39         16.do({
40                 Synth.new("help-IRand"); 0.5.wait;
41         })
42 }).play;