Explicitly include a boost "windows" folder even on linux
[supercollider.git] / HelpSource / Classes / Dswitch1.schelp
blob649dc7f13533e47b54a8ff2ae593a86c85ce18d5
1 class:: Dswitch1
2 summary:: Demand rate generator for switching between inputs.
3 related:: Classes/Demand, Classes/Duty, Classes/TDuty, Classes/Dswitch
4 categories:: UGens>Demand
6 Description::
8 Demand rate generator for switching between inputs.
10 See link::Classes/Pswitch1:: for structurally related equivalent.
13 classmethods::
15 method::new
17 argument::list
19 Array of values or other UGens.
22 argument::index
24 Which of the inputs to return.
27 Examples::
29 code::
33         var a, freq, trig;
34         a = Dswitch1([1, 3, MouseY.kr(1, 15), 2, Dwhite(0, 3, 2)], MouseX.kr(0, 4));
35         trig = Impulse.kr(3);
36         freq = Demand.kr(trig, 0, a) * 30 + 340;
37         SinOsc.ar(freq) * 0.1
39 }.play;
44         var a, freq, trig;
45         a = Dswitch1({ |i| Dseq((0..i*3), inf) } ! 5, MouseX.kr(0, 4));
46         trig = Impulse.kr(6);
47         freq = Demand.kr(trig, 0, a) * 30 + 340;
48         SinOsc.ar(freq) * 0.1
50 }.play;