home/ atoms/ ar-envelope-as-one-pole-filter

The simplest AR envelope is a gate fed through a one-pole filter whose coefficient sets attack and release time

An AR (Attack-Release) envelope generator can be built by routing a gate signal (0->1 on key press, 1->0 on release) through a one-pole lowpass filter. The filter’s feedback coefficient — a single value between 0 and 1 — controls how fast the output tracks the input: values near 1 give a slow response (long attack/release), near 0 a fast one. In hardware the gate charges/discharges a capacitor through a variable resistor; the RC product sets the rate. In software the capacitor becomes a delay register and the resistor becomes the feedback coefficient. The model is elegant but limited: one coefficient sets both attack and release, so it cannot give a fast attack with a slow release — that is why the fuller ADSR needs extra switching logic.

Examples

Software: output[n] = output[n-1]coeff + gate[n](1-coeff). coeff near 1 (e.g. 0.999) ramps slowly over many samples; smaller coeff responds almost instantly. Hardware: gate -> variable resistor R -> capacitor C -> output, with R*C setting the time constant.

Assessment

How does the one-pole feedback coefficient control attack and release time? What limitation of the AR envelope forces the addition of Decay and Sustain? Write the per-sample AR update.

“if we route that into a one-pole filter—a resistor feeding a capacitor to ground—the processed gate would ramp up and down with an exponentially-shaped curve, at a rate depending on the resistor and capacity values multiplied together.”
corpus · envelope-generators-adsr-design-exponential-vs-linear-segmen · chunk 2