[sdiy] tanh distortion in a filter
ASSI
Stromeko at nexgo.de
Thu Aug 11 18:56:07 CEST 2011
On Thursday 11 August 2011, Tom Wiltshire wrote:
> Can I just ask if there's anything particularly special about tanh in
> this situation?
The tanh is just a fancy way to describe the interaction of exponential
functions in a closed form (the brain is wired wrongly to really understand
exponentials or arbitrary superpositions thereof, but we might learn to
understand what tanh does). If you do the same calculation with MOSFET
you'll get something cosine-like, BTW.
> It seems to me that you could use pretty much any sigmoid function. This
> would alter the character of the distortion slightly (or not so
> slightly) but wouldn't really change the nature of what you're doing -
> in a similar way to replacing your OTA with a gilbert gain cell, or a
> tube-based VCA.
It depends on how far you want to overdrive, but some folks have started
with low-order polynomial approximations and never looked back. The tanh
has some fairly interesting properties that make it hard to approximate for
extreme overdrive, but you'll probably not want to use those in a filter
anyway.
> The reason I ask is that tanh isn't exactly a convenient function to
> calculate in the digital domain. The two approaches I've seen are to
> approximate it using a fairly simple polynomial (use a different
> function, essentially) or to use a lookup+interp (which opens the way to
> arbitrary distortion flavours).
Yes, these are both valid approaches (and can be fruitfully combined, aka
spline interpolation). Simple linear interpolation can become a bit
problematic due to the discontinuities in the derivative.
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
More information about the Synth-diy
mailing list