This question is not easy to answer, or maybe, the easiest answer would be that actually there is none, but let’s put it in this way: If you just regard the sequence of events (without lagging), clearly, Dseries is the exact equivalent of Pseries.
(
SynthDef(\test_demand, { |out = 0, amp = 0.1|
// there's no Dn equivalent to Pn, so take Dseq here
var freq = Demand.ar(Impulse.ar(5), 0, Dseq([Dseries(60, 2, 3)], inf));
Out.ar(out, Saw.ar(freq.midicps, amp)!2)
}).add
)
x = Synth(\test_demand)
x.free
(
SynthDef(\test_pat, { |out = 0, freq = 440, amp = 0.1|
Out.ar(out, Saw.ar(freq, amp)!2)
}).add
)
(
x = Pmono(\test_pat,
\dur, 0.2,
\midinote, Pn(Pseries(60, 2, 3))
).play
)
x.stop
But as soon as you are lagging the freq inside \test_demand you’re in the audio domain, which is not directly accessible to patterns. However, the underlying sequencing can still be done with them.
(
SynthDef(\test_demand_lagged, { |out = 0, amp = 0.1|
var freq = Demand.ar(Impulse.ar(5), 0, Dseq([Dseries(60, 2, 3)], inf)).lag(0.1);
Out.ar(out, Saw.ar(freq.midicps, amp)!2)
}).add
)
x = Synth(\test_demand_lagged)
x.free
// BTW, an alternative would be varlag, which allows to define the lag curvature.
(
SynthDef(\test_pat_lagged, { |out = 0, freq = 440, amp = 0.1|
Out.ar(out, Saw.ar(freq.lag(0.1), amp)!2)
}).add
)
// a bit different at start as Demand starts from 0
(
x = Pmono(\test_pat_lagged,
\dur, 0.2,
\midinote, Pn(Pseries(60, 2, 3))
).play
)
x.stop
Then there’s Pseg, which basically is a dynamic Env, but here you can only do a “quasi-glissando”
(
x = Pmono(\test_pat,
\dur, 0.2,
\midinote, Pseg(Pseq([60, 64], inf), Pseq([3, 0], inf))
).play
)
It’s important to distinguish the different concepts of glissando and “quasi glissando”. It depends on the use case what would fit best.
The resetting brings in another very subtle point as resetting can be done immediately, in relation to a grid, also server- and language-side, etc.
In general, if your focus is on differentiated sequencing, Patterns might be better suited as there are more possibilities to tweak them. Also demand rate ugens somtimes show unclear behaviour at init time:
{
Demand.ar(
Impulse.ar(100),
Impulse.ar(20),
Dseries(0, 1, 9)
).lag(0.01)
}.plot(0.2)
// maybe you wouldn't expect that
{
Demand.ar(
Impulse.ar(100),
Impulse.ar(20),
Dseries(1, 1, 9)
).lag(0.01)
}.plot(0.2)
Having said that, DemandEnvGen might also be worth considering.