I was looking through the documentation on effects, and noticed that the tahn effect doesn’t have any documentation beyond “Please write documentation!”. The parameters are listed, but I have no idea what it does. Is this an oversight? I would be happy to write a snippet if I knew where to look to figure it out.
I believe it applies distortion that approximates analogue/valve distortion. If you look at a plot of the tanh (hyperbolic tangent) function, you can see that large inputs get “clipped” to a maximum value, but with a soft cutoff.
The doctstring for the
:tanh FX has been updated in the commits since the last release and will be part of the new release when it’s finally available. For now, I’ll copy it here in case it is useful for you and others:
Forces all audio through a hyperbolic tangent function which has the effect of acting like distorted limiter. It works by folding loud signals back in on itself. The louder the input signal, the more folding occurs - resulting in increased strange harmonics and distortion. This folding also has the effect of limiting the outgoing signal, therefore to increase the output amplitude use the
amp:opt and to increase the folding/distortion use the
Thanks a lot Emlyn and Sam. My puzzlement was mainly the krunch argument. I’ll start experimenting with it and see what comes of it.
krunch: opt’s docstring is as follows:
“Higher values progressively destroy the sound. Achieved through a balanced manipulation of pre_amp and amp such that the tanh is pushed harder with higher krunch values yet the overall amplitude stays similar.”