Anti-derivative Anti-aliasing (ADAA) issues

Hi all DSP experts!

I am trying yo reduce the aliasing of four cascaded nonlinear saturating/wavefolding functions and I would like to do some questions.

For each nonlinear block, I am applying a first order antiderivative antialiasing method, I make my prototype in MATLAB and it works fine. However, when I go towards C++/JUCE implementation, I need to make higher my ‘tolerance’ value (the tolerance value is the value that controls the ill condition of the ADAA) to not to listen to strange artifacts. Moreover, I need to reduce also the input gain/trim range in order to not get NaN values. These issues do not come out without ADAA, even if I get more aliasing.
Do these problems arise because of float single-precision number representation?

Moreover, each nonlinear block with ADAA introduces a latency of 0.5 samples. Since I am applying oversampling before the nonlinear process, should I do average my latency with the oversampling rate?
In other words, my total latency is
totLatencySamples = oversamplerLatency + 0.5*numberOfNLProcess
totLatencySamples = oversamplerLatency + 0.5*numberOfNLProcess*baseSamplingRate/oversampSamplingRate?

Thank you very much!

Most likely, and it depends on the waveshaper -some integrals are pretty intolerant to low precision.

This one.

1 Like

Thank you very much @kamedin for you brilliant and concise reply! :slight_smile:

So could I cast the input to double precision and then apply ADAA and then come back to float?

Yup, making the waveshapers work on doubles would most likely help. Also, test it with different inputs and take a look at a spectral view, because even if the ugly loud noise is gone, you may still have a haze of high frequency noise that’s not nice either.

1 Like

Yes, it is is exactly what I got with my implementation, when I talked about ‘artifacts’

Up to now, with an high tolerance value (tol = 0.001) and a limited input gain range, it works quite good in single-precision. But it still does not seem ‘robust’

The math of the thing is complicated, it’s not easy to predict. You’ll have to test on a reasonably wide range of inputs and call it a day at some point. If it doesn’t give a visible hf haze in your tests, you can trust that at least it won’t go NaN.

1 Like