oneShot: free the responder before running user func (avoid error)
[supercollider.git] / HelpSource / Classes / Drand.schelp
blob638da7321d534f3ebd1438f1ff63850d44723c06
1 class:: Drand
2 summary:: Demand rate random sequence generator.
3 related:: Classes/Demand, Classes/Dseq, Classes/Dser, Classes/Duty, Classes/Dxrand, Classes/TDuty
4 categories:: UGens>Demand
6 Description::
7 link::Classes/Dxrand::  never plays the same value twice, whereas Drand
8 chooses any value in the list.
11 See link::Classes/Prand:: for structurally related equivalent.
14 classmethods::
16 method::new
18 argument::list
20 An array of values or other UGens.
23 argument::repeats
25 Number of values to return.
28 Examples::
30 code::
33
34         var a, freq, trig;
35         a = Drand([1, 3, 2, 7, 8], inf);
36         trig = Impulse.kr(MouseX.kr(1, 400, 1));
37         freq = Demand.kr(trig, 0, a) * 30 + 340; 
38         SinOsc.ar(freq) * 0.1
40 }.play;