2 summary:: Mix one output from many sources
3 categories:: UGens>Multichannel>Select
4 related:: Classes/SelectX
7 The output is mixed from an array of inputs, linearly interpolating from a number of adjacent channels.
9 A focus argument allows to control how many adjacent sources are mixed. (by adc)
24 Saw.ar(LFSaw.kr(3 * [1, 1.01], 0, 100, 230)),
26 Pulse.ar(LFPulse.kr(3 * [1, 1.02], 0, 0.4, 100, 230)),
27 SinOsc.ar(SinOsc.kr(4 * [1, 1.03], 0, 200, 300))
30 SelectXFocus.ar(MouseX.kr(0, 1) * a.size, a, MouseY.kr(0, a.size)) * 0.2
36 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.
44 var a, n, mx, my, mwrap;
46 mx = MouseX.kr(0, 1, 0, 0.1);
48 mwrap = { |pmin, pmax, min, max| sin(mx * ExpRand(pmin, pmax)) + 1 * 0.5 * ExpRand(min, max) };
50 var freq, fmul, phase;
51 freq = mwrap.(10, 40, 200, 5000) + ExpRand(200, 3000);
52 fmul = LFNoise0.kr(ExpRand(0.1, 8)).round(1/6).exprange(1, Rand(1, 1.2));
53 phase = LFNoise2.ar(mwrap.(1, 20, 10, 1000), Rand(2, 5));
54 SinOsc.ar(freq * fmul, phase)
57 SinOsc.ar(LFDNoise0.kr(11, SetResetFF.kr(*Dust.kr([1, 2] * 0.3))).range(0, 700) + 220)
59 SelectXFocus.ar(mx * n, a, my * n) * 0.2 + OnePole.ar(PinkNoise.ar(0.5 ! 2), 0.4)
65 // jimmy played harmonica in the pub where I was born
66 // (hh) (jrh) (cc 2006)
69 var blas, zieh, mx, my, trig, which, amp, u, schnauf;
70 var del = 9, det = 0.1;
73 my = MouseY.kr(0.1, 2, 1);
75 blas = [0, 12, 24] +.x [60, 64, 67] ++ [60+36];
76 zieh = [62, 67, 71, 74, 77, 81, 83, 86, 89, 93];
79 which = ToggleFF.kr(TDelay.kr(trig, schnauf));
80 amp = EnvGen.kr(Env([1, 0, 1], [schnauf, schnauf]), trig);
81 blas = Select.kr(which, [blas, zieh]);
85 Pulse.ar((Rand(-0.04, 0.09) + f).midicps * 0.5, 0.48 + LFNoise1.kr(0.06, 0.1), 0.2)
88 ) * Slope.kr(mx + my).abs.lag2(2) * amp;
89 u = Pan2.ar(OnePole.ar(u, -0.3), mx * 2 - 1);
90 DelayL.ar(BPF.ar(u * 2, 1500, 0.3), del + det, LFNoise2.kr(0.2, det, del)) + u