[sdiy] Fast envelope generation

Scott Nordlund gsn10 at hotmail.com
Wed Dec 19 01:13:28 CET 2012

I initially thought it wouldn't be relevant because I assumed that the goal was to avoid multiplication (and I've mentioned it here before anyway), but a line segment from 1 to 0, taken to the 4th power, is pretty close to an exponential decay. That's only two multiplies. The nice thing is that unlike an exponential, it ends in a finite amount of time.

The tricky thing (for attack stages and multi-stage envelopes) is deciding whether you want everything to be linear in dB, or a sort of stepped function that's smoothed by a first order difference equation. The second option should generally sound better (and closer to an analog ADSR), but it's more difficult to implement without actually using an IIR filter. You'd need to additionally scale and offset each stage...

More information about the Synth-diy mailing list