2 *ar { arg trig, in, label, trigid = -1;
3 this.multiNewList(['audio', trig, in, label, trigid]);
6 *kr { arg trig, in, label, trigid = -1;
7 this.multiNewList(['control', trig, in, label, trigid]);
10 *new { arg trig, in, label, trigid = -1;
11 var rate = in.asArray.collect(_.rate).unbubble;
12 this.multiNewList([rate, trig, in, label, trigid]);
15 *new1 { arg rate, trig, in, label, trigid;
16 label = label ?? { "UGen(%)".format(in.class) };
17 label = label.asString.collectAs(_.ascii, Array);
18 if(rate === \scalar) { rate = \control };
19 if(trig.isNumber) { trig = Impulse.multiNew(rate, trig, 0) };
20 ^super.new.rate_(rate).addToSynth.init([trig, in, trigid, label.size] ++ label);
23 checkInputs { ^this.checkSameRateAsFirstInput }
26 // store the inputs as an array
34 {Poll.ar(Impulse.ar(5), Line.ar(0, 1, 1), \test2)}.play(s);
35 {SinOsc.ar(220, 0, 1).poll(Impulse.ar(15), "test")}.play(s);
37 o = OSCresponderNode(s.addr, '/tr', {arg time, resp, msg;
41 {Poll.ar(Impulse.ar(5), Line.ar(0, 1, 1), \test2, 1234)}.play(s);