[sdiy] Fast envelope generation
Stromeko at nexgo.de
Tue Dec 18 19:04:38 CET 2012
On Tuesday 18 December 2012, 15:14:00, Tom Wiltshire wrote:
> No, I don't think there's any confusion, but my bet is you're both on
> platforms with nice wide number formats. Scott's on FPGA, and can make
> his variables as wide as he wants - 32, 48-bits, whatever - and I bet he
IIRC from what he's said before about his designs, yes he does.
> The trouble with doing IIR on a little 8-bit uP is maintaining accuracy.
> If you use long multi-byte variables, you finish up needing to do long
> multi-byte multiplications - slow, especially on a PIC with no multiply
> instruction. If you *don't* use long variables, the accuracy goes to pot.
On an 8bit uC the memory wasted by longer arithmetic is often more
detrimental than the additional cycles.
The key observation is that all exponentials are the same when suitably
scaled from any point in time, so you "only" need to figure out how to re-
scale at convenient points in the curve so that you keep enough significant
bits in your state vector. It is not too troublesome to re-scale the state
variable each time you start to lose accuracy (after about 1 time constant).
That implements a simple form of floating point. Another or additional
option is to re-scale the time constant and also change the sampling rate to
suit (plus perhaps some interpolation to fill the samples you've thusly
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Samples for the Waldorf Blofeld:
More information about the Synth-diy