quote of the day

IMHO, its not about randomness (noise) in components at all. Its about the (very short) memory some circuits can deploy, depending on the overall load of the system. The shortcoming of the component modelling approach is still that the whole modeled system is deterministic (which is not). – bootsy

efficient tanh computation using Lambert’s continued fraction

Lambert's continued fraction for tanh(x)

The key for efficient implementations of rather complex functions such as the trigonometric ones is first to understand how much precision actually is needed (and in which range) and then choosing the proper math which approximates this goal the best. Instead of the go-to Taylor series approximations I’m showing a continued fraction series expansion for the tanh function as an example here. In addition some special cases and outlook are presented as well.

A complete and precise tanh computation as provided by some math libraries is computationally very, very expensive and in DSP land this is typically avoided whenever it’s possible. In my current example I was in need of a fast computation method but one which should also gives an absolute precise transfer curve and harmonic content match even if driven at around +12dBFS. [Read more…]

towards stateful saturation

the static waveshaper y = tanh(x)

Still today, most developers are sticking to static waveshaping algorithms when it comes down to digital saturation implementations. This wasn’t very convincing to me from the very beginning and in fact it was one of the motivations why I’ve started my own audio effect developments – to come a little bit closer to what I thought what saturation and non-linearity in general is all about.

And so the Rescue audio plug-in was born in summer 2007 and was already an approach to relate audio transient events to the signal saturation itself. Not that much later TesslaSE appeared which was a different exercise leaning towards a frequency dependent non-linearity implementation coupled in a feedback structure. I still really love this plug-in and how it sounds and prefer it over much more sophisticated designs even today in quite some cases. Following, the pre-amp stage in BootEQmkII then focused on “transformer style” low-end weirdness and did feature oversampling on the non-linear sections of the device. A really great combination with the EQ – smooth and very musical sounding. The TesslaPRO thingy sums up all this and puts it into one neat little device with an easy to use “few knob” interface. Don’t let you fool by this simplistic (but so beautiful) design: It already features everything which makes a saturator to stand out from the crowd today: transient awareness, frequency dependency, dedicated low-end treatments. Sound-wise this results in a way smoother saturation experience and a better stereo imaging en passant.

With FerricTDS not only the notion of  subtle frequency dependent compression got extended to a core saturator algorithm. Since revision 1.5 I’ve ditched the oversampling based core and included a version which premiered the notion of memory into the non-linearity which transforms it from a stateless into a stateful algorithm. One could basically see this as a system which reacts different on the very same actual input signal depending on the recent history of events (on a very microscopical level). The input stage algorithms which I’ve included in NastyVCS and NastyDLA (both are actually the same) are a cpu and feature wise stripped down version of that to have the basic sound of it already as an option when mixing the tracks and its according fx.

Quite recently, I’ve started to look into implicit stateful models where memory is not applied from the outside of the algorithm but the algorithm itself contains a sort of memory. As an example, I’ve implemented a stateful version of the well-known tanh() function so that it is aware of recently occurred events but provides the very same harmonic structure compared to the original. Given some analyzer plots it even shows the very same transfer curve but in fact it does not limit strictly anymore but allows some minor overshots of some peak signals. Interestingly, the sound appears a little bit brighter (without letting you see that through the analyzer plot) and the low-end appears not to be that hard “brickwalled” but a little bit smoother. Lets be assured that I’m going to follow this path and then lets see where this will lead to in 2011.