Merge pull request #506 from andrewcsmith/patch-2
[supercollider.git] / HelpSource / Classes / Drand.schelp
blob1a822c23d2db72a991c2a0c898484251f99ad5c0
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::
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;