2 checkInputs { ^this.checkSameRateAsFirstInput }
7 *ar { arg in = 0.0, freq = 440.0, bwr = 1.0, mul = 1.0, add = 0.0;
8 ^this.multiNew('audio', in, freq, bwr).madd(mul, add)
10 *kr { arg in = 0.0, freq = 440.0, bwr = 1.0, mul = 1.0, add = 0.0;
11 ^this.multiNew('control', in, freq, bwr).madd(mul, add)
17 *ar { arg in = 0.0, coef = 0.5, mul = 1.0, add = 0.0;
18 ^this.multiNew('audio', in, coef).madd(mul, add)
20 *kr { arg in = 0.0, coef = 0.5, mul = 1.0, add = 0.0;
21 ^this.multiNew('control', in, coef).madd(mul, add)
29 *ar { arg in = 0.0, freq = 440.0, radius = 0.8, mul = 1.0, add = 0.0;
30 ^this.multiNew('audio', in, freq, radius).madd(mul, add)
32 *kr { arg in = 0.0, freq = 440.0, radius = 0.8, mul = 1.0, add = 0.0;
33 ^this.multiNew('control', in, freq, radius).madd(mul, add)
42 *ar { arg in = 0.0, coef = 1.0, mul = 1.0, add = 0.0;
43 ^this.multiNew('audio', in, coef).madd(mul, add)
45 *kr { arg in = 0.0, coef = 1.0, mul = 1.0, add = 0.0;
46 ^this.multiNew('control', in, coef).madd(mul, add)
52 *ar { arg in = 0.0, decayTime = 1.0, mul = 1.0, add = 0.0;
53 ^this.multiNew('audio', in, decayTime).madd(mul, add)
55 *kr { arg in = 0.0, decayTime = 1.0, mul = 1.0, add = 0.0;
56 ^this.multiNew('control', in, decayTime).madd(mul, add)
62 *ar { arg in = 0.0, attackTime = 0.01, decayTime = 1.0, mul = 1.0, add = 0.0;
63 ^this.multiNew('audio', in, attackTime, decayTime).madd(mul, add)
65 *kr { arg in = 0.0, attackTime = 0.01, decayTime = 1.0, mul = 1.0, add = 0.0;
66 ^this.multiNew('control', in, attackTime, decayTime).madd(mul, add)
72 *ar { arg in = 0.0, lagTime = 0.1, mul = 1.0, add = 0.0;
73 ^this.multiNew('audio', in, lagTime).madd(mul, add)
75 *kr { arg in = 0.0, lagTime = 0.1, mul = 1.0, add = 0.0;
76 ^this.multiNew('control', in, lagTime).madd(mul, add)
84 /// added by nescivi - 15 may 2007
87 *ar { arg in = 0.0, lagTimeU = 0.1, lagTimeD = 0.1, mul = 1.0, add = 0.0;
88 ^this.multiNew('audio', in, lagTimeU, lagTimeD).madd(mul, add)
90 *kr { arg in = 0.0, lagTimeU = 0.1, lagTimeD = 0.1, mul = 1.0, add = 0.0;
91 ^this.multiNew('control', in, lagTimeU, lagTimeD).madd(mul, add)
99 *ar { arg in = 0.0, time = 0.1, curvature = 0, warp = 5, start, mul = 1.0, add = 0.0;
100 ^this.multiNew('audio', in, time, curvature, warp, start).madd(mul, add);
102 *kr { arg in = 0.0, time = 0.1, curvature = 0, warp = 5, start, mul = 1.0, add = 0.0;
103 ^this.multiNew('control', in, time, curvature, warp, start).madd(mul, add);
105 // FIXME: Implement 'curve' input on VLag ugen instead of using EnvGen.
106 // Then \exp warp should probably behave as Lag ugen.
107 *new1 { arg rate, in, time, curvature, warp, start;
108 var e, curve, trig, sel = if(rate==\audio,\ar,\kr);
110 curve = Env.shapeNames[warp] ? warp;
112 e = Env([start, in], [time], warp).asArray;
115 trig = Changed.perform(sel, in) + Impulse.perform(sel, 0);
116 if(time.rate != \scalar) { trig = trig + Changed.kr(time) };
117 EnvGen.perform(sel, e, trig);
119 ^super.new.rate_(rate).addToSynth.init(in, time, start);
126 *ar { arg in = 0.0, coef = 0.995, mul = 1.0, add = 0.0;
127 ^this.multiNew('audio', in, coef).madd(mul, add)
129 *kr { arg in = 0.0, coef = 0.9, mul = 1.0, add = 0.0;
130 ^this.multiNew('control', in, coef).madd(mul, add)
137 *ar { arg in = 0.0, freq = 440.0, rq = 1.0, mul = 1.0, add = 0.0;
138 ^this.multiNew('audio', in, freq, rq).madd(mul, add)
140 *kr { arg in = 0.0, freq = 440.0, rq = 1.0, mul = 1.0, add = 0.0;
141 ^this.multiNew('control', in, freq, rq).madd(mul, add)
150 *ar { arg in = 0.0, freq = 440.0, mul = 1.0, add = 0.0;
151 ^this.multiNew('audio', in, freq).madd(mul, add)
153 *kr { arg in = 0.0, freq = 440.0, mul = 1.0, add = 0.0;
154 ^this.multiNew('control', in, freq).madd(mul, add)
162 *ar { arg in = 0.0, freq = 440.0, rq = 1.0, mul = 1.0, add = 0.0;
163 ^this.multiNew('audio', in, freq, rq).madd(mul, add)
165 *kr { arg in = 0.0, freq = 440.0, rq = 1.0, mul = 1.0, add = 0.0;
166 ^this.multiNew('control', in, freq, rq).madd(mul, add)
174 *ar { arg in = 0.0, freq = 440.0, rq = 1.0, db = 0.0, mul = 1.0, add = 0.0;
175 ^this.multiNew('audio', in, freq, rq, db).madd(mul, add)
177 *kr { arg in = 0.0, freq = 440.0, rq = 1.0, db = 0.0, mul = 1.0, add = 0.0;
178 ^this.multiNew('control', in, freq, rq, db).madd(mul, add)
184 *ar { arg in = 0.0, mul = 1.0, add = 0.0;
185 ^this.multiNew('audio', in).madd(mul, add)
187 *kr { arg in = 0.0, mul = 1.0, add = 0.0;
188 ^this.multiNew('control', in).madd(mul, add)
196 *ar { arg in = 0.0, mul = 1.0, add = 0.0;
197 ^this.multiNew('audio', in).madd(mul, add)
199 *kr { arg in = 0.0, mul = 1.0, add = 0.0;
200 ^this.multiNew('control', in).madd(mul, add)
205 *kr { arg input, threshold = 0;
206 ^HPZ1.kr(input).abs > threshold
208 *ar { arg input, threshold = 0;
209 ^HPZ1.ar(input).abs > threshold
215 *ar { arg in = 0.0, mul = 1.0, add = 0.0;
216 ^this.multiNew('audio', in).madd(mul, add)
218 *kr { arg in = 0.0, mul = 1.0, add = 0.0;
219 ^this.multiNew('control', in).madd(mul, add)
230 *ar { arg length=3, in = 0.0, mul = 1.0, add = 0.0;
231 ^this.multiNew('audio', length, in).madd(mul, add)
233 *kr { arg length=3, in = 0.0, mul = 1.0, add = 0.0;
234 ^this.multiNew('control', length, in).madd(mul, add)
237 if (rate == 'audio', {
238 if (inputs.at(1).rate != 'audio', {
239 ^"input was not audio rate";
242 ^this.checkValidInputs
247 //exception in GrafDef_Load: UGen 'AvgAbsAmp' not installed.
248 //AvgAbsAmp : Filter {
250 // *ar { arg in = 0.0, coef = 0.999, mul = 1.0, add = 0.0;
251 // ^this.multiNew('audio', in, coef).madd(mul, add)
253 // *kr { arg in = 0.0, coef = 0.999, mul = 1.0, add = 0.0;
254 // ^this.multiNew('control', in, coef).madd(mul, add)
259 *ar { arg in = 0.0, up = 1.0, dn = 1.0, mul = 1.0, add = 0.0;
260 ^this.multiNew('audio', in, up, dn).madd(mul, add)
262 *kr { arg in = 0.0, up = 1.0, dn = 1.0, mul = 1.0, add = 0.0;
263 ^this.multiNew('control', in, up, dn).madd(mul, add)
270 // *ar { arg in = 0.0, freq = 0.5, res = 0.5, mul = 1.0, add = 0.0;
271 // ^this.multiNew('audio', in, freq, res).madd(mul, add)
276 *ar { arg in = 0.0, a0 = 0.0, a1 = 0.0, b1 = 0.0, mul = 1.0, add = 0.0;
277 ^this.multiNew('audio', in, a0, a1, b1).madd(mul, add)
279 *kr { arg in = 0.0, a0 = 0.0, a1 = 0.0, b1 = 0.0, mul = 1.0, add = 0.0;
280 ^this.multiNew('control', in, a0, a1, b1).madd(mul, add)
285 *ar { arg in = 0.0, a0 = 0.0, a1 = 0.0, a2 = 0.0, b1 = 0.0, b2 = 0.0, mul = 1.0, add = 0.0;
286 ^this.multiNew('audio', in, a0, a1, a2, b1, b2).madd(mul, add)
288 *kr { arg in = 0.0, a0 = 0.0, a1 = 0.0, a2 = 0.0, b1 = 0.0, b2 = 0.0, mul = 1.0, add = 0.0;
289 ^this.multiNew('control', in, a0, a1, a2, b1, b2).madd(mul, add)
296 *ar { arg in = 0.0, freq = 440.0, decaytime = 1.0, mul = 1.0, add = 0.0;
297 ^this.multiNew('audio', in, freq, decaytime).madd(mul, add)
299 *kr { arg in = 0.0, freq = 440.0, decaytime = 1.0, mul = 1.0, add = 0.0;
300 ^this.multiNew('control', in, freq, decaytime).madd(mul, add)
306 *ar { arg in = 0.0, freq = 440.0, attacktime = 1.0, decaytime = 1.0, mul = 1.0, add = 0.0;
307 ^this.multiNew('audio', in, freq, attacktime, decaytime).madd(mul, add)
309 *kr { arg in = 0.0, freq = 440.0, attacktime = 1.0, decaytime = 1.0, mul = 1.0, add = 0.0;
310 ^this.multiNew('control', in, freq, attacktime, decaytime).madd(mul, add)
314 // the doneAction arg lets you cause the EnvGen to stop or end the
315 // synth without having to use a PauseSelfWhenDone or FreeSelfWhenDone ugen.
316 // It is more efficient to use a doneAction.
317 // doneAction = 0 do nothing when the envelope has ended.
318 // doneAction = 1 pause the synth running, it is still resident.
319 // doneAction = 2 remove the synth and deallocate it.
320 // doneAction = 3 remove and deallocate both this synth and the preceeding node.
321 // doneAction = 4 remove and deallocate both this synth and the following node.
322 // doneAction = 5 remove and deallocate this synth and free all children in the preceeding group (if it is a group).
323 // doneAction = 6 remove and deallocate this synth and free all children in the following group (if it is a group).
325 DetectSilence : Filter {
327 *ar { arg in = 0.0, amp = 0.0001, time = 0.1, doneAction = 0;
328 ^this.multiNew('audio', in, amp, time, doneAction)
329 // ^0.0 // DetectSilence has no output
331 *kr { arg in = 0.0, amp = 0.0001, time = 0.1, doneAction = 0;
332 ^this.multiNew('control', in, amp, time, doneAction)
333 // ^0.0 // DetectSilence has no output
337 //exception in GrafDef_Load: UGen 'FlagNaN' not installed.
340 // *ar { arg in = 0.0;
341 // ^this.multiNew('audio', in)
343 // *kr { arg in = 0.0;
344 // ^this.multiNew('control', in)