Saturation Reverser

Proof it can be reversed

AP Mastering Reverser Plugin

Saturation Reverser

Features

  • Demonstrates that saturation distortion, typically considered to be irreversible, can be reversed.
  • The left side of the plugin is a tanh saturation with variable gain boost.
  • The right side is an atanh reverse saturation with variable attenuation.

Background

This plugin was released for demonstration purposes only, specifically to show that saturation type distortion still preserves detail whereas clipping results in information loss. You can try it out yourself. The saturation feature is also perfectly useful on its own, especially if your daw has plugin chain oversampling, like REAPER does.

The reverser feature is useful only as a kind of fun trick / demonstration and has limited utility in music production outside of perhaps producing experimental weird crackling distortion.

Please do not misunderstand the point of this plugin and think it magically is supposed to reverse all distortion. It doesn’t. There were some user reports that they were able to use it to help restore previously distorted material, and if you use it to good effect, then sure go for it! But the plugin was never intended for actual restoration work, it was just meant to be a demonstration of mapping to tanh, and back using atanh.

THE TRUTH ABOUT DATA LOSS

At 3:14 in the original video I say: given that you have adequate precision, at least 24 bit [...] there’s zero data loss.

What I said in the video was technically incorrect. I wanted to avoid splitting hairs and opening up a can of worms of technical details unnecessary to drive home my main point about straight digital clipping being bad. So far nobody discussed this in the comments but I value correctness so I will now take the opportunity to explain the nuances of this theme a bit more for those of you who are interested enough to have downloaded the plugin.

Imagine you have only 5 discrete values to represent your waveform, two above our center axis and two below. Our waveform data is 0, 1, 2, 1, 0, -1, -2, -1, 0 etc. If you now “compress” those values with a tanh function then now we might have something like 0, 2, 2, 2, 0, -2, -2, -2, 0 etc. We have incurred quantisation error. If we then want to map back to the original using atanh, we are not going to be very successful. There is no nuance left as we have functionally turned our sine wave into a square wave. If we scale this up to 24 bit audio, and for this specific use case 32 bit floating point can be considered identical in resolution to 24 bit, we do not overcome the quantisation error, we merely reduce it to a level so small that nobody can realistically hear it anymore. So when I say “zero information loss” and “identical to original signal” etc, this is technically wrong. I wanted to make a really simple dichotomy that casual viewers would understand:

Clipping = information loss = bad VS Saturation = preserves detail = better

The truth is, quantisation error always introduces some amount of information loss. Given [some very large bit depth] we would still incur information loss through quantisation error if the bit depth remains constant. This is because “compressing” the values always requires a greater precision than the original representation to avoid quantisation error, given a continuous waveform. This means, regardless of how huge your bit depth is, if it is held constant, you will always experience information loss for any continuous waveform. The only way you can hold the bit depth constant and not experience quantisation loss is if you have infinite precision, which is practically impossible. Perhaps in the analogue domain where quantisation error isn't a thing, there would be zero information loss, only the addition of johnson noise and whatever unrelated harmonic distortion, if we were to attempt to do a similar thing. However, in the analogue domain, the calibration of the encoding and decoding components to have an exactly matched level and curvature would likely be more of a hurdle than the quantisation loss experienced in digital audio.

So now you can see why it’s probably best to just say “there’s no information loss”.