oneShot: free the responder before running user func (avoid error)
[supercollider.git] / HelpSource / Classes / SelectX.schelp
blobbfd298b5b8d41a10dfd18cdd75797552807a86f8
1 class:: SelectX
2 summary:: Mix one output from many sources
3 categories:: UGens>Multichannel>Select
4 related:: Classes/SelectXFocus, Classes/Select
6 description::
7 The output is mixed from an array of inputs, linearly interpolating from two adjacent channels.
9 classmethods::
10 method:: ar, kr
12 argument:: which
13 argument:: array
15 examples::
16 code::
19         var a;
20         a = [
21                         SinOsc.ar,
22                         Saw.ar(300),
23                         Pulse.ar(230)
24                 ];
25         
26         SelectX.ar(MouseX.kr(0, 1) * a.size, a) * 0.2
27 }.play;
32         var a;
33         a = [
34                         SinOsc.kr(0.25),
35                         LFSaw.kr(10),
36                         LFPulse.kr(0.3)
37                 ];
38         
39         SinOsc.ar(SelectX.kr(MouseX.kr(0, 1) * a.size, a) * 300 + 400) * 0.2
40 }.play;
44 note::
45 all the ugens are continously running. This may not be the most efficient way if each input is  cpu-expensive. The array is fixed at the time of writing the SynthDef, and the whole array is embedded in the SynthDef file itself.  For small arrays this is more efficient than reading from a buffer.
48 wrap does not work yet.
50 (by adc)