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.
57 // play a little rhythm
59 { TDuty.ar(Dseq([0.1, 0.2, 0.4, 0.3], inf)) }.play; // demand ugen as durations
68 Dseq([0.1, 0.2, 0.4, 0.3], inf), // demand ugen as durations
70 Dseq([0.1, 0.4, 0.01, 0.5, 1.0], inf) // demand ugen as amplitude
72 Ringz.ar(trig, 1000, 0.1)
81 MouseX.kr(0.001, 2, 1), // control rate ugen as durations
83 Dseq([0.1, 0.4, 0.01, 0.5, 1.0], inf)
85 Ringz.ar(trig, 1000, 0.1)
93 // demand ugen as audio oscillator
97 var a, trig, n=5, m=64;
100 x = { 0.2.rand2 } ! m;
101 x = x ++ ({ Drand({ 0.2.rand2 } ! n) } ! m.rand);
102 Dseq(x.scramble, inf)
105 MouseX.kr(1, 2048, 1) * SampleDur.ir * [1, 1.02],
107 Dswitch1(a, MouseY.kr(0, n-1))
109 Ringz.ar(trig, 1000, 0.01)
118 SynthDef("delta_demand", { arg amp=0.5, out;
120 TDuty.ar(Dseq([0]), 0, amp, 2)
125 fork { 10.do { s.sendBundle(0.2, ["/s_new", "delta_demand", -1]); 1.0.rand.wait } };
130 SynthDef("delta_demand2", {
132 TDuty.ar(Dgeom(0.05, 0.9, 20), 0, 0.5, 2)
137 fork { 10.do { s.sendBundle(0.2, ["/s_new", "delta_demand2", -1]); 1.0.rand.wait } };
141 // multichannel expansion
147 Drand([Dgeom(0.1, 0.8, 20), 1, 2], inf) ! 2,
149 [Drand({ 1.0.rand } ! 8, inf), Dseq({ 1.0.rand } ! 8, inf)] * 2
151 x = Ringz.ar(t, [400, 700], 0.1) * 0.1;