tl;dr - it depends on the trigger signal and Decay’s decay time argument
Decay.ar is just a leaky integrator, but with the T60 decay time conversion already done for you:
(
{
var trig, decay, integrate;
var decayTime, pole, sampleRate = 44100;
trig = Impulse.ar(0);
decayTime = 0.01;
pole = exp(log(0.001) / (decayTime * sampleRate)); // convert decay time in seconds to a leak coefficient for Integrator.ar
integrate = Integrator.ar(trig, pole);
decay = Decay.ar(trig, decayTime);
[integrate, decay, integrate - decay] // signals are exactly equal
}.plot;
)
Integrators simply sum the current sample of a signal with its previous output sample. Leaky integrators add a coefficient to attenuate the previous sample, mostly exactly because non-leaky integrators easily overshoot. This is described by the following difference equation:
y[n] = x[n] + coef * y[n - 1]
where
y[n] system output at discrete time n
y[n-1] system output at discrete time n-1 (the previous sample)
x[n] system input at discrete time n
coef "leak" coefficient, usually a constant slightly less than 1.0 (e.g. 0.99).
So you can think of integrators as simple feedback lowpass filters. Demonstrating integrator overshoot with a large decay time (coefficient close to 1.0) and a fast trigger signal:
(
{
var trig, dec;
trig = Impulse.ar(0.01.reciprocal * 2);
dec = Decay.ar(trig, 0.5);
[trig, dec]
}.plot(0.3);
)
You can only depend on the output staying within [0, 1] if your signal decays to zero quickly enough (before the next trigger arrives).