2 summary:: Demand results as trigger from demand rate UGens.
3 related:: Classes/Demand, Classes/Duty
4 categories:: UGens>Demand
9 A value is demanded each UGen in the list and output as a trigger
10 according to a stream of duration values. The unit generators in the list
11 should be 'demand' rate.
14 When there is a trigger at the reset input, the demand rate UGens in the
15 list and the duration are reset. The reset input may also be a demand
16 UGen, providing a stream of reset times.
25 Time values. Can be a demand UGen or any signal. The next trigger
26 value is acquired after duration.
31 Trigger or reset time values. Resets the list of UGens and the
32 duration UGen when triggered. The reset input may also be a
33 demand UGen, providing a stream of reset times.
38 Demand UGen providing the output values.
43 A doneAction that is evaluated when the duration stream ends. See
45 link::Reference/UGen-doneActions:: for more detail.
49 when 0 (default), the UGen does the first level poll immediately and then waits for the first durational value. When this is 1, the UGen initially polls the first durational value, waits for that duration, and then polls the first level (along with polling the next durational value). So gapFirst > 0 makes TDuty behave like link::Classes/TDuty_old::.
60 // play a little rhythm
62 { TDuty.ar(Dseq([0.1, 0.2, 0.4, 0.3], inf)) }.play; // demand ugen as durations
71 Dseq([0.1, 0.2, 0.4, 0.3], inf), // demand ugen as durations
73 Dseq([0.1, 0.4, 0.01, 0.5, 1.0], inf) // demand ugen as amplitude
75 Ringz.ar(trig, 1000, 0.1)
84 MouseX.kr(0.001, 2, 1), // control rate ugen as durations
86 Dseq([0.1, 0.4, 0.01, 0.5, 1.0], inf)
88 Ringz.ar(trig, 1000, 0.1)
96 // demand ugen as audio oscillator
100 var a, trig, n=5, m=64;
103 x = { 0.2.rand2 } ! m;
104 x = x ++ ({ Drand({ 0.2.rand2 } ! n) } ! m.rand);
105 Dseq(x.scramble, inf)
108 MouseX.kr(1, 2048, 1) * SampleDur.ir * [1, 1.02],
110 Dswitch1(a, MouseY.kr(0, n-1))
112 Ringz.ar(trig, 1000, 0.01)
121 SynthDef("delta_demand", { arg amp=0.5, out;
123 TDuty.ar(Dseq([0]), 0, amp, 2)
128 fork { 10.do { s.sendBundle(0.2, ["/s_new", "delta_demand", -1]); 1.0.rand.wait } };
133 SynthDef("delta_demand2", {
135 TDuty.ar(Dgeom(0.05, 0.9, 20), 0, 0.5, 2)
140 fork { 10.do { s.sendBundle(0.2, ["/s_new", "delta_demand2", -1]); 1.0.rand.wait } };
144 // multichannel expansion
150 Drand([Dgeom(0.1, 0.8, 20), 1, 2], inf) ! 2,
152 [Drand({ 1.0.rand } ! 8, inf), Dseq({ 1.0.rand } ! 8, inf)] * 2
154 x = Ringz.ar(t, [400, 700], 0.1) * 0.1;