[sdiy] Digital 4 pole filter in an FPGA
Antti Huovilainen
ajhuovil at cc.hut.fi
Tue Dec 9 13:13:24 CET 2008
On Tue, 9 Dec 2008, Rainer Buchty wrote:
> For me, it was amazing to see that whenever the attribute "warmth" comes
> up, it is related to a tanh()-shaped compression function, no matter
> whether it's tube-based distortion, analog tape saturation, or
> distortion within the filter.
Tanh has nothing to do with tubes. Quite asymmetric curves there (just to
nitpick). For differential transistor circuits it can be derived directly
from the transfer function (with only minor approximations). In tape
saturation it's probably not strictly correct but the shape is smooth and
distortion increases gradually so it largely does the job.
> For any FPGA implementation the question therefore is how to get tanh()
> as cheap as possible. Maybe just shaping the upper 8 bits of the
Use a small lookup table with linear interpolation. You only need one side
since it's symmetric and I assume bit operations are dirt cheap in FPGA
(abs and neg). If you want slightly better sound, add a small DC offset
before the tanh (different offset for each stage).
Antti
"No boom today. Boom tomorrow. There's always a boom tomorrow"
-- Lt. Cmdr. Ivanova
More information about the Synth-diy
mailing list