DSP for Audio
Almost every mix decision past “pick the right microphone in the right room” comes down to two processors: equalization and compression. EQ shapes the frequency balance of a signal — boost the warmth of a vocal, cut the boxiness of a snare drum, scoop the mids out of a metal guitar tone — and compression shapes the dynamics — tame a loud word in a vocal take, glue a drum bus together, bring the breath of a quiet phrase up to where it sits in the mix. Every plugin in a digital audio workstation, every channel strip on an analog console, every “AI mastering” service that promises a finished track does fundamentally the same two things in some combination, plus a small handful of supporting effects (reverb, delay, saturation, transient shaping, stereo imaging). The math underneath EQ and compression is genuinely simpler than the plugin GUIs suggest, and once you understand what is happening to the samples flowing through, the marketing claims about which plugin sounds best collapse into much more legible engineering trade-offs. This post walks the parametric EQ as a chain of biquad filters, the compressor as a level-controlled gain element with attack and release smoothing, the look-ahead trick that fundamentally distinguishes digital from analog, and the honest gap between a $50 plugin and a $5000 hardware unit running essentially the same algorithm.
EQ: A Chain of Biquad Filters
A parametric equalizer in any DAW is a stack of independent biquad filters, each one shaping the frequency response by boost or cut at a chosen center frequency with a chosen bandwidth. The name comes from “bi-quadratic” — each filter is a second-order recursive filter whose transfer function is the ratio of two quadratic polynomials. The math is the same algorithm whether you are running it in a $50 plugin, in the EQ block on a $50,000 SSL console, or in the DSP block embedded in your noise-cancelling earbuds.
The biquad’s recursive structure is what makes it efficient: each output sample is computed from the current input sample, the previous two input samples, and the previous two output samples, weighted by five coefficients:
THE BIQUAD FILTER (Direct Form I)
y[n] = b0*x[n] + b1*x[n-1] + b2*x[n-2]
- a1*y[n-1] - a2*y[n-2]
where x is the input, y is the output,
b0, b1, b2, a1, a2 are the five filter coefficients
that encode the desired frequency response.
Five coefficients per filter. A parametric EQ band consists of one biquad with its coefficients computed from the user’s parameters (center frequency, gain, Q/bandwidth, filter type — peak, shelf, high-pass, low-pass, notch). The Robert Bristow-Johnson “Audio EQ Cookbook” (1994) is the canonical source for the coefficient formulas; every plugin developer either uses these or has computed equivalent versions.
The five-coefficient structure is wonderfully efficient: at 48 kHz sample rate, a single biquad costs five multiplies and four adds per sample, or about 432,000 operations per second. A modern CPU does this in fractions of a percent of one core. Modern hardware DSPs can run dozens of biquad bands in parallel for low milliwatts. This is the reason every speaker (from cheap soundbars to expensive monitors) and every set of noise-cancelling earbuds has a hardware EQ block: the cost is essentially nothing.
The parametric EQ types you actually use:
| Filter type | What it does | When to use |
|---|---|---|
| Peak (bell) | Boost or cut a band around center freq, controllable width (Q) | Surgical fixes; tonal shaping |
| Low-shelf | Boost or cut everything below a corner frequency | Bass tilt, “warmth” boost |
| High-shelf | Boost or cut everything above a corner frequency | Air, brightness adjustments |
| High-pass | Removes everything below a corner frequency | Get rid of rumble, proximity buildup |
| Low-pass | Removes everything above a corner frequency | Take edge off harsh sources |
| Notch | Very narrow cut at a single frequency | Remove specific hum (60 Hz, feedback) |
Two subtle things matter beyond the cookbook math:
Cramping. A biquad’s frequency response distorts near Nyquist (half the sample rate). Filters near the top of the audible band do not behave as a perfect analog EQ would. This is “high-frequency cramping” and is why high-end digital EQs use techniques like upsampling, prewarping, or matched-Z transforms to clean up the response. Cheap plugins skip this; expensive ones bake it in. The effect is subtle but real.
Phase response. A standard minimum-phase EQ shifts the phase of frequencies near each boost or cut, which can cause subtle smearing of transients when multiple bands stack up. Linear-phase EQs use FFT-based processing instead of biquads to keep phase response flat, at the cost of latency (the algorithm needs to look ahead) and more CPU. Linear phase is preferred for mastering and for any application where preserving transient sharpness matters; minimum phase is preferred for tracking and for sources that should feel “musical.”
Compression: A Gain Element Controlled by Level Detection
A compressor reduces the dynamic range of a signal — quieter parts get a bit louder relative to louder parts. The math is conceptually simple: detect the current signal level, decide how much gain to apply based on that level, apply the gain to the audio sample. The interesting engineering lives entirely in the time domain — how quickly the gain reacts to changes in the input level, and how musically the transitions sound.
The core compressor pipeline:
COMPRESSOR SIGNAL FLOW
input ────┬────────────────────────► gain element ──── output
│ ▲
│ │ gain reduction (dB)
│ │
▼ │
level detector ─► comparator ────► attack/release
(RMS or peak) (against smoothing
threshold,
ratio,
knee)
The level detector measures how loud the signal currently is. Peak detection follows the instantaneous waveform amplitude (fast response, sensitive to single samples); RMS detection averages amplitude over a short window (slower, more like how human hearing perceives loudness). Most modern compressors use one or the other depending on application — peak for limiters and brick-wall protection, RMS for musical compression and bus compression.
The comparator decides “by how many dB is the signal currently above the threshold?” and computes a gain reduction value. The compressor’s ratio decides what fraction of the over-threshold amount gets passed through: a 4:1 ratio means every 4 dB the signal goes over threshold becomes 1 dB after compression (so the 3 dB difference is “compressed out”). The knee describes how the curve transitions from “below threshold, no compression” to “above threshold, full ratio compression” — hard knees switch abruptly, soft knees curve smoothly across several dB around the threshold.
Then comes the part that matters most musically: attack and release. These are not the compressor’s reaction times in any colloquial sense; they are the time constants of a smoothing filter on the gain-reduction signal. Without them, the gain would change instantly sample-by-sample, producing audible clicks and unnatural pumping. With them, the gain ramps smoothly in and out, giving the compression a specific sonic character.
- Attack time: how quickly the gain reduction reaches its target after the signal exceeds threshold. A fast attack (sub-ms) clamps transients aggressively but reduces their punch; a slow attack (20-100 ms) lets the initial crack of a snare through before clamping the body. The choice fundamentally shapes the percussive character of the source.
- Release time: how quickly the gain reduction comes back when the signal drops below threshold. A fast release (10-50 ms) makes the compressor breathe between phrases; a slow release (200-1000 ms) holds the gain reduction for sustained smoothing across long passages. Too fast a release creates audible “pumping” as the gain audibly recovers between notes; too slow loses the breathing quality that compressors are valued for.
The interaction between attack, release, and the source’s natural envelope is the whole musical art of compression. Vocals benefit from medium attack (5-20 ms) and medium release (50-100 ms) that catches loud syllables without lopping consonants. Drum bus compression often wants fast attack and fast release to “glue” the kit. Mastering compression usually wants slow attack (preserving transients) and slow release (sustained loudness control).
Modern compressors also offer auto-release that varies the release time based on signal content, program-dependent ratio that softens at extreme over-thresholds, side-chain filtering that makes the level detector less responsive to bass (so a kick drum does not pump the whole mix), and parallel mixing where the compressed signal is summed with the dry signal to combine the body-of-compression with the transient-of-dry.
The Look-Ahead Trick
The single capability that fundamentally distinguishes digital compression from analog is look-ahead — the ability to see future samples before deciding how to compress the current one. Analog circuits live in real time; they can only respond to the past. Digital systems can buffer some samples, look at what is coming, and adjust the gain in advance to catch a transient cleanly without missing the initial peak.
The mechanism is delay. The compressor’s audio path is delayed by some number of samples (typically 1-10 ms worth); the level detection runs on undelayed samples, so by the time the audio path reaches the gain element, the compressor has already calculated the gain it needs. The result is a “fast attack” that does not actually clip the transient — the algorithm clamps starting before the transient because it already knows the transient is coming.
LOOK-AHEAD COMPRESSOR
input ────► [ delay line: N samples ] ────► gain element ────► output
│ ▲
│ │ gain reduction
│ │
└──► level detector ──► gain calc ─────────┘
The audio path is delayed by N samples so the gain calculation
completes before the audio reaches the gain element. The
compressor reacts "before" loud transients.
The cost of look-ahead is latency. A 5 ms look-ahead introduces 5 ms of latency in the signal path, which is fine for mixing but real for live use (the latency is added to the signal chain). Most look-ahead compressors let you disable look-ahead for tracking and re-enable it for mixing.
The musical effect of look-ahead is dramatic: a peak-limiter with look-ahead catches every transient cleanly without the slight overshoot that analog peak-limiters always have. This is the heart of why modern brick-wall limiters (FabFilter Pro-L 2, Tokyo Dawn Records Limiter 6, iZotope Ozone Maximizer) can squeeze a master loud without audible distortion in ways analog cannot.
Look-ahead also enables transient shapers — processors that detect transients and selectively boost or cut them with a curve that starts before the transient arrives. The Schaack Transient Shaper, SPL Transient Designer, and Waves Trans-X are the canonical examples; all of them require look-ahead to work properly.
The Compressor Topologies That Have Survived
A few classic compressor designs have generated entire industries of digital emulations. They behave differently because the gain element and detector topology differ, not because of mystical analog character.
VCA compressors (SSL G-Bus, dbx 160, API 2500) use a voltage-controlled amplifier as the gain element. Fast, clean, capable of any ratio and attack/release setting. The SSL G-Bus is probably the most-emulated VCA compressor in history; it lives in nearly every modern mixing workflow as “the glue compressor.” VCAs are the bread-and-butter generalist.
FET compressors (UREI 1176) use a field-effect transistor as the gain element. The FET is fast, somewhat nonlinear, and has a characteristic warmth from the small distortion it introduces. The 1176 is famous for its “all-buttons-in” mode (all four ratio buttons pressed simultaneously), which produces an aggressive limiting character beloved on drums and rock vocals.
Optical compressors (Teletronix LA-2A, Tube-Tech CL 1B) use a photocell whose resistance changes with light from an electroluminescent panel driven by the level detector. The cell’s response is naturally smooth and slow, giving optical compressors their characteristic gentle squeeze. Vocals, bass, anything where transparency and musicality matter more than precision.
Variable-mu / vari-mu compressors (Fairchild 670, Manley Stereo Variable Mu) use vacuum tubes whose gain varies with grid bias. Slow, expensive, harmonically rich, beloved for mastering bus compression.
Modern plugins emulate all of these, with varying degrees of fidelity. Universal Audio’s hardware-backed UAD plugins, Waves’ Renaissance Compressor, Plugin Alliance’s collection, and FabFilter Pro-C 2 are all common digital answers. The math is the same family — gain element, detector, attack/release — but the specific nonlinearities and time-constant curves that each topology produces are what gives the source material its distinctive character.
Where the $50 vs $5000 Money Actually Goes
The hardest honest question in audio plugins: why does one EQ or compressor cost $50 and another $500 or $2000 when they implement the same basic algorithm? The answer is that the difference between the cheap and expensive options lives in a stack of secondary engineering decisions, each of which is small in isolation but cumulative across the chain.
Oversampling. Cheap plugins run at the project sample rate. Premium plugins internally upsample to 4x, 8x, or 16x, perform processing on the higher-rate signal, and downsample back. This prevents nonlinear processes (especially saturation and aggressive compression) from generating aliased artifacts that fold back into the audible range. The CPU cost is real; the audible benefit is subtle but measurable.
Filter quality. Cheap EQ plugins use straightforward biquad implementations that suffer from high-frequency cramping. Premium plugins use prewarped biquads, matched-Z transforms, or full FFT-based processing to keep the response clean across the audible range. Worth more on instruments where the high end matters; barely audible on others.
Smooth parameter changes. Moving a fader or knob in a plugin without smoothing produces zipper noise — audible stepping as the parameter jumps. Premium plugins interpolate parameter changes across many samples; cheap ones may not.
Modeled nonlinearities. A modeled UREI 1176 plugin matches not just the gain curve but the subtle harmonic distortion the FET adds, the slight push-pull asymmetry, the way the meter response interacts with the gain reduction. Cheaper emulations capture the gain curve but skip the subtler character.
GUI and metering. A premium plugin shows you what is happening — accurate gain reduction meters, spectral displays, sidechain input visualization. Cheap plugins are often opaque. For mixing efficiency this matters.
Stability and reliability. Premium developers test on multiple DAWs, multiple OSes, edge cases, automation envelopes, sample-rate changes. Cheap plugins sometimes crash or behave inconsistently. For professional work where a missed session costs money, reliability is real value.
Customer support, updates, longevity. Premium developers ship updates for years; cheap plugins are often released and abandoned.
The honest assessment is that the audible difference between a cheap and expensive plugin running the same algorithm is typically real but small — usually under 1 dB of difference in any specific frequency band, usually below the threshold most listeners can articulate. The difference is much larger when comparing to a bad plugin (audible aliasing, audible zipper noise, glitchy GUI), which is what makes the bottom of the market a different category from premium. The right rule of thumb: stick to reputable developers (FabFilter, Waves, iZotope, Plugin Alliance, Universal Audio, Soundtoys, Tokyo Dawn Records, Voxengo, Eventide) and the difference between their offerings is mostly preference and feature set rather than dramatic quality. Avoid no-name freeware that may produce real artifacts.
For building a serious mixing environment, spending money on a treated room before spending it on premium plugins delivers dramatically more audible improvement. The signal chain after a bad room is filtered through whatever the room decides; in a good room, the difference between a $50 and $500 plugin is finally hearable.
What an Audio DSP Stack Actually Looks Like
A typical mixing session’s signal chain on a single track:
|
|
Each box in that chain is some combination of biquad filters, level detection, smoothed gain elements, and possibly nonlinear functions (saturation). The total CPU cost for a typical 40-track mixing session is maybe 10-20% of a modern CPU core. The same processing on a hardware console required millions of dollars of analog circuitry; the silicon physics that put all this on a phone-class processor is what made it possible at consumer cost.
For a live broadcast or sound-reinforcement context, the same processing runs on dedicated DSP boards (Yamaha CL/QL/Rivage, Avid VENUE/S6L, DiGiCo SD/Quantum, Allen & Heath dLive) with latency budgets in single-digit milliseconds. The algorithms are identical to the DAW plugins, tuned for real-time guaranteed-latency operation rather than offline mixing.
The math has not changed in three decades. What has changed is the price-per-processing-power curve, which has made every EQ and compressor in modern professional audio essentially free in CPU terms and shifted the engineering value to the user-interface decisions, the secondary qualities (oversampling, filter quality, nonlinear modeling), and the workflow integration.
Verdict
Audio DSP is a small handful of mature primitives — biquad filters for EQ, gain elements controlled by level detection for compression, plus saturation and a few other nonlinear effects — implemented in essentially every plugin and hardware processor on every mixing console. The biquad EQ is a recursive filter with five coefficients per band, efficient enough that even ten bands of parametric EQ cost a fraction of a CPU percent at modern sample rates. The compressor is a gain element controlled by a level detector with attack and release smoothing on the gain-reduction signal, and the musical art of compression lives entirely in the time-domain interactions between the attack, the release, the source’s natural envelope, and the choice of detection (peak vs RMS) and topology (VCA, FET, optical, vari-mu). The look-ahead trick that distinguishes digital from analog — buffering audio so the compressor can react before transients arrive — is what enables clean modern brick-wall limiting and transient shaping that analog circuits cannot match. The honest answer to “why does this plugin cost $500” lives in a stack of secondary engineering decisions — oversampling, filter quality, parameter smoothing, modeled nonlinearities, metering, reliability — each of which produces a small audible benefit that becomes significant only across the whole chain and only in a room that does not mask the difference. The math has not changed since the 1990s; what has changed is the cost of running it, which has fallen by enough orders of magnitude that the engineering value has moved entirely to user interface, integration, and the small tweaks that make algorithms feel “musical” instead of “correct.” For a working engineer in 2026, the right mental model is to learn what each primitive actually does to the signal, treat the plugin GUIs as wrappers around well-understood algorithms, and spend the difference between a $50 and a $5000 plugin chain on the room and the source rather than the processing layer. The math is friendlier than the marketing implies, and the mix decisions become legible once the algorithms underneath them do.
Sources
- Robert Bristow-Johnson, “Audio EQ Cookbook” (canonical biquad formulas): https://webaudio.github.io/Audio-EQ-Cookbook/audio-eq-cookbook.html
- Julius O. Smith III, “Introduction to Digital Filters with Audio Applications” (Stanford CCRMA): https://ccrma.stanford.edu/~jos/filters/
- DAFx Conference proceedings (Digital Audio Effects): https://www.dafx.de/
- Pirkle, Will, “Designing Audio Effect Plugins in C++” (the canonical practitioner text): https://www.willpirkle.com/
- FabFilter Pro-Q 4 product documentation: https://www.fabfilter.com/products/pro-q-4-equalizer-plug-in
- iZotope, “An Introduction to Audio Compression”: https://www.izotope.com/en/learn/an-introduction-to-audio-compression.html
- Sound on Sound, “Q. How does a compressor’s lookahead function work?”: https://www.soundonsound.com/sound-advice/q-how-does-compressors-lookahead-function-work
- Sample Focus, “Best EQ Plugins of 2026”: https://blog.samplefocus.com/blog/best-eq-plugins-of-2026/
- Cycling ‘74, “Compressors and Limiters Explained”: https://cycling74.com/articles/compressors-and-limiters-explained
- Texas Instruments, “Parametric Equalization on the TMS320C6000 DSP”: https://www.ti.com/lit/an/spra867/spra867.pdf
Comments