I ended up with the following code, based on the one-frame Buffer workaround idea.
It almost delivers the perfect stepped signal.
As visible in the screenshot there is a short period where the signal stays stuck close to the intended value before hitting it.
Is there something in my code that could cause this?
(
SynthDef(\dcBuffer, {
arg out = 0, value = 0;
var buff = LocalBuf.new(2,1);
BufWr.ar(DC.ar(1) * value, buff, DC.ar(0));
Out.ar(out, Index.ar(buff, 0));
}).add;
)
(
b = Pmono(
\dcBuffer,
\value, Pseq([0.0, 0.25, 0.5, 0.75, 1.0],inf),
\dur, 1/50,
).play;
)