oneShot: free the responder before running user func (avoid error)
[supercollider.git] / HelpSource / Classes / TRand.schelp
blob23cd4e05d063133343dada1e63cd34104b531ce1
1 class:: TRand
2 summary:: Triggered random number generator.
3 related:: Classes/ExpRand, Classes/IRand, Classes/LinRand, Classes/NRand, Classes/Rand, Classes/TExpRand, Classes/TIRand
4 categories:: UGens>Random, UGens>Triggers
7 Description::
9 Generates a random float value in uniform distribution from
10 code::lo::  to  code::hi::  each time the
11 trigger signal changes from nonpositive to positive values.
14 classmethods::
16 method::ar, kr
18 argument::lo
19 Lower limit of the output range.
21 argument::hi
22 Upper limit of the output range.
24 argument::trig
26 The trigger. Trigger can be any signal. A trigger happens when
27 the signal changes from non-positive to positive.
30 Examples::
32 code::
35
36         var trig = Dust.kr(10);
37         SinOsc.ar(
38                         TRand.kr(300, 3000, trig)
39                 ) * 0.1
40 }.play;
44
45         var trig = Dust.ar(MouseX.kr(1, 8000, 1));
46         SinOsc.ar(
47                         TRand.ar(300, 3000, trig)
48                 ) * 0.1
49 }.play;