4 *ar { arg in = 0.0, dur = 0.1;
5 ^this.multiNew('audio', in, dur)
7 *kr { arg in = 0.0, dur = 0.1;
8 ^this.multiNew('control', in, dur)
10 signalRange { ^\unipolar }
18 *ar { arg in = 0.0, id = 0, value = 0.0;
19 this.multiNew('audio', in, id, value);
20 ^0.0 // SendTrig has no output
22 *kr { arg in = 0.0, id = 0, value = 0.0;
23 this.multiNew('control', in, id, value);
24 ^0.0 // SendTrig has no output
26 checkInputs { ^this.checkSameRateAsFirstInput }
31 SendReply : SendTrig {
32 *kr { arg trig = 0.0, cmdName = '/reply', values, replyID = -1;
33 if(values.containsSeqColl.not) { values = values.bubble };
34 [trig, cmdName, values, replyID].flop.do { |args|
35 this.new1('control', *args);
37 ^0.0 // SendReply has no output
40 *ar { arg trig = 0.0, cmdName = '/reply', values, replyID = -1;
41 if(values.containsSeqColl.not) { values = values.bubble };
42 [trig, cmdName, values, replyID].flop.do { |args|
43 this.new1('audio', *args);
45 ^0.0 // SendReply has no output
48 *new1 { arg rate, trig = 0.0, cmdName = '/reply', values, replyID = -1;
49 var ascii = cmdName.ascii;
50 ^super.new1(*[rate, trig, replyID, ascii.size].addAll(ascii).addAll(values));
55 checkInputs { ^this.checkSameRateAsFirstInput }
60 *ar { arg in = 0.0, trig = 0.0;
61 ^this.multiNew('audio', in, trig)
63 *kr { arg in = 0.0, trig = 0.0;
64 ^this.multiNew('control', in, trig)
74 *ar { arg trig = 0.0, reset = 0.0;
75 ^this.multiNew('audio', trig, reset)
77 *kr { arg trig = 0.0, reset = 0.0;
78 ^this.multiNew('control', trig, reset)
80 checkInputs { ^this.checkSameRateAsFirstInput }
84 *ar { arg in = 0.0, trig = 0.0;
85 ^this.multiNew('audio', in, trig)
87 *kr { arg in = 0.0, trig = 0.0;
88 ^this.multiNew('control', in, trig)
91 if (rate == 'control' && inputs.at(0).rate == 'audio', {
92 ^this.checkValidInputs
94 ^this.checkSameRateAsFirstInput
109 *ar { arg trig=0, reset=0, min=0, max=7, step=1, resetval;
110 ^this.multiNew('audio', trig, reset, min, max, step, resetval ? min)
112 *kr { arg trig=0, reset=0, min=0, max=7, step=1, resetval;
113 ^this.multiNew('control', trig, reset, min, max, step, resetval ? min)
115 checkInputs { ^this.checkSameRateAsFirstInput }
119 PulseDivider : UGen {
121 *ar { arg trig = 0.0, div = 2.0, start = 0.0;
122 ^this.multiNew('audio', trig, div, start)
124 *kr { arg trig = 0.0, div = 2.0, start = 0.0;
125 ^this.multiNew('control', trig, div, start)
130 SetResetFF : PulseCount {
135 *ar { arg trig = 0.0;
136 ^this.multiNew('audio', trig)
138 *kr { arg trig = 0.0;
139 ^this.multiNew('control', trig)
144 ZeroCrossing : UGen {
146 ^this.multiNew('audio', in)
149 ^this.multiNew('control', in)
151 checkInputs { ^this.checkSameRateAsFirstInput }
155 // output is the time between two triggers
156 *ar { arg trig = 0.0;
157 ^this.multiNew('audio', trig)
159 *kr { arg trig = 0.0;
160 ^this.multiNew('control', trig)
162 checkInputs { ^this.checkSameRateAsFirstInput }
166 // output sweeps up in value at rate per second
167 // the trigger resets to zero
168 *ar { arg trig = 0.0, rate = 1.0;
169 ^this.multiNew('audio', trig, rate)
171 *kr { arg trig = 0.0, rate = 1.0;
172 ^this.multiNew('control', trig, rate)
177 *ar { arg trig = 0.0, rate = 1.0, start = 0.0, end = 1.0, resetPos = 0.0;
178 ^this.multiNew('audio', trig, rate, start, end, resetPos)
180 *kr { arg trig = 0.0, rate = 1.0, start = 0.0, end = 1.0, resetPos = 0.0;
181 ^this.multiNew('control', trig, rate, start, end, resetPos)
185 PeakFollower : UGen {
187 *ar { arg in = 0.0, decay = 0.999;
188 ^this.multiNew('audio', in, decay)
190 *kr { arg in = 0.0, decay = 0.999;
191 ^this.multiNew('control', in, decay)
195 Pitch : MultiOutUGen {
197 *kr { arg in = 0.0, initFreq = 440.0, minFreq = 60.0, maxFreq = 4000.0,
198 execFreq = 100.0, maxBinsPerOctave = 16, median = 1,
199 ampThreshold = 0.01, peakThreshold = 0.5, downSample = 1, clar=0;
200 ^this.multiNew('control', in, initFreq, minFreq, maxFreq, execFreq,
201 maxBinsPerOctave, median, ampThreshold, peakThreshold, downSample, clar)
203 init { arg ... theInputs;
205 ^this.initOutputs(2, rate);
211 *ar { arg in = 0.0, lo = 0.0, hi = 1.0;
212 ^this.multiNew('audio', in, lo, hi)
214 *kr { arg in = 0.0, lo = 0.0, hi = 1.0;
215 ^this.multiNew('control', in, lo, hi)
221 *ar { arg x = 0.0, y = 0.0, rect;
222 ^this.multiNew('audio', x, y, rect.left, rect.top,
223 rect.right, rect.bottom)
225 *kr { arg x = 0.0, y = 0.0, rect;
226 ^this.multiNew('control', x, y, rect.left, rect.top,
227 rect.right, rect.bottom)
234 // *ar { arg in = 0.0, a = 0.2, b = 0.4, c = 0.6, d = 0.8;
235 // ^this.multiNew('audio', in, a, b, c, d)
237 // *kr { arg in = 0.0, a = 0.2, b = 0.4, c = 0.6, d = 0.8;
238 // ^this.multiNew('control', in, a, b, c, d)
249 *ar { arg a = 0.0, b = 0.0;
250 ^this.multiNew('audio', a, b)
252 *kr { arg a = 0.0, b = 0.0;
253 ^this.multiNew('control', a, b)
257 LeastChange : MostChange {}
261 *ar { arg in=0.0, diff=0.01;
262 ^this.multiNew('audio', in, diff)
264 *kr { arg in=0.0, diff=0.01;
265 ^this.multiNew('control', in, diff)