What is ADAA?
Anti-Derivative Anti-Aliasing Explained
TL;DR
ADAA (Anti-Derivative Anti-Aliasing) is a mathematical technique that eliminates aliasing in nonlinear waveshapers without the CPU cost of oversampling. Instead of processing at higher sample rates, ADAA uses calculus (antiderivatives) to compute the exact band-limited output. It's the secret weapon behind clean saturation plugins.
Here's a dirty little secret about digital distortion: Most of the "harshness" you hear? That's not the distortion algorithm. That's aliasing.
And for years, the only solution was to brute-force it with oversampling, burning CPU like it's 1999. But there's a better way, and it involves some beautiful math that makes you feel like a wizard when you implement it correctly.
The Aliasing Problem
When you apply nonlinear processing (like saturation, distortion, or waveshaping) to digital audio, you create new harmonics. This is musically desirable—it's what makes a guitar amp sound warm, or a tape saturator sound thick.
But there's a catch: if those new harmonics exceed the Nyquist frequency (half your sample rate), they fold back into the audible spectrum as ugly, inharmonic artifacts. This is called aliasing, and it sounds harsh, metallic, and distinctly digitalin the worst way.
Example: Aliasing in Action
Imagine a 10 kHz sine wave at 44.1 kHz sample rate (Nyquist = 22.05 kHz). Apply heavy distortion, creating a 3rd harmonic at 30 kHz. Since 30 kHz > 22.05 kHz, it aliases back to 44.1 - 30 = 14.1 kHz — an inharmonic tone that wasn't in the original signal.
When harmonics exceed Nyquist, they fold back as inharmonic artifacts.
Traditional Solution: Oversampling
The classic fix is oversampling: process audio at 2x, 4x, or 8x the sample rate, then downsample. Higher rates push harmonics beyond the audible range before they alias.
The problem? CPU cost scales linearly. 4x oversampling = roughly 4x the processing load. For complex plugins with multiple stages, this quickly becomes impractical. And in a world where producers load 50 instances of your plugin, "just oversample everything" isn't a solution—it's a death sentence.
Oversampling works, but it's expensive.
The ADAA Solution: Calculus to the Rescue
ADAA takes a fundamentally different approach. Instead of brute-force oversampling, it usescalculus to compute the exact band-limited output.
First-Order ADAA Formula
For waveshaper f(x):
y[n] = (F(x[n]) - F(x[n-1])) / (x[n] - x[n-1])
Where F(x) is the antiderivative of f(x).
This formula computes the average value of the nonlinear function between two samplesx[n] and x[n-1]. Since we're using the exact integral (antiderivative), we get the mathematically correct band-limited result—no aliasing, no oversampling needed.
Example: Tanh Saturation
For the popular tanh(x) waveshaper (smooth saturation):
Waveshaper:
f(x) = tanh(x)Antiderivative:
F(x) = log(cosh(x))ADAA output:
y[n] = (log(cosh(x[n])) - log(cosh(x[n-1]))) / (x[n] - x[n-1])This produces pristine harmonic saturation with zero aliasing, at native sample rate, with minimal CPU overhead. It's not magic—it's just really good math.
Same result. Way less CPU.
Handling Edge Cases (The Devil's in the Details)
There's one catch with ADAA: when (x[n] - x[n-1]) is very small (near-zero slope), we're dividing by a tiny number. Division by tiny numbers is how you get NaNs, infinities, and audio glitches that sound like someone's crushing aluminum cans inside your speakers.
The solution is elegant: detect when the difference is below a threshold (e.g., 1e-5), and fall back to the original function f(x[n]). This isn't a compromise—in these cases, the signal is changing so slowly that no new harmonics are created anyway. No new harmonics = no aliasing risk.
⚠️ Implementation Detail
For functions with large exponents like log(cosh(x)), you'll also need to handle numerical overflow for extreme input values. Use piecewise approximations or clamp inputs to a safe range (e.g., |x| < 10). Trust me, you don't want to debug why your plugin crashes when someone feeds it a +48dB input signal at 3am before a deadline.
How KnobSmith Audio Uses ADAA
Every KnobSmith Audio plugin with nonlinear processing (saturation, drive, distortion) uses ADAA as standard. Our shared knobsmith::core library includes a production-readyADAAWaveshaper module with:
- Numerically stable
log(cosh(x))implementation - Automatic threshold detection for near-zero slopes
- Overflow protection for large inputs
- Per-channel state tracking
The result? Pristine saturation that sounds clean at any sample rate (44.1k, 48k, 96k, 192k) without the CPU cost of oversampling.
ADAA is one of those techniques that feels like cheating once you understand it. Clean saturation without the CPU hit? That's not a tradeoff—that's just winning.
Further Reading
- Antialiasing Oscillators in Subtractive Synthesis (Aalto University) — The original ADAA research paper
- Why Oversampling Matters (And When It Doesn't) — When to use oversampling vs ADAA
- KnobSmith Audio Technology Stack — Deep dive into our DSP architecture
Written by KnobSmith Audio · January 3, 2026