Explicitly include a boost "windows" folder even on linux
[supercollider.git] / HelpSource / Classes / Select.schelp
blob71a980fd290c91a7c8e0e39995017ae4fca7fba0
1 class:: Select
2 summary:: Select output from an array of inputs.
3 categories:: UGens>Multichannel>Select
4 related:: Classes/SelectX, Classes/SelectXFocus, Classes/LinSelectX
6 Description::
7 The output is selected from an array of inputs.
9 note:: All the UGens are continously running. This may not be the most efficient
10 way if each input is CPU-expensive. ::
12 Note that the array is fixed at the time of writing the SynthDef, and the
13 whole array is embedded in the SynthDef file itself.  For small arrays
14 this is more efficient than reading from a buffer.
17 classmethods::
19 method::ar, kr
21 argument::which
23 Integer index
26 argument::array
28 Input array of signals
31 Examples::
33 code::
35 SynthDef("help-Select",{ arg out=0;
37         var a,cycle;
38         a = [
39                         SinOsc.ar,
40                         Saw.ar,
41                         Pulse.ar
42                 ];
43         cycle = a.size  * 0.5;
44         Out.ar(out,
45                 Select.ar(LFSaw.kr(1.0,0.0,cycle,cycle),a) * 0.2
46         )
47 }).play;
51 //Here used as a sequencer:
53 SynthDef("help-Select-2",{ arg out=0;
55         var a,s,cycle;
56         a = Array.fill(32,{ rrand(30,80) }).midicps;
57         a.postln;
58         cycle = a.size  * 0.5;
60         s = Saw.ar(
61                         Select.kr(
62                                 LFSaw.kr(1.0,0.0,cycle,cycle),
63                                 a
64                         ),
65                         0.2
66         );
67         Out.ar(out,s )
68 }).play;