audio-branding-and-storytelling
Using Wavelet Denoising for Removing Clicks Without Losing Audio Detail
Table of Contents
Introduction: The Persistent Problem of Audio Clicks
Audio recordings—from digitized vinyl and magnetic tape to live digital captures—almost inevitably contain transient imperfections. Clicks, pops, crackles, and impulse noise can originate from dust and scratches on physical media, electromagnetic interference, clock jitter in analog-to-digital converters, or transmission errors. Removing these artifacts without degrading the underlying signal has challenged audio engineers for decades. Traditional denoising methods, such as median filtering, spectral subtraction, or adaptive filters, often work well for stationary noise but tend to blur sharp transients, dull high-frequency detail, or introduce unnatural “musical noise.” Wavelet denoising offers a fundamentally different approach: it targets the impulsive character of clicks in both time and frequency simultaneously, preserving the fine structure of the audio while suppressing the unwanted artifacts. This expanded guide explains how wavelet denoising achieves this, explores its practical implementation, and provides actionable insights for audio professionals and restoration enthusiasts.
The Wavelet Transform: A Primer
To appreciate wavelet denoising, one must understand the wavelet transform, a mathematical tool that decomposes a signal into components at multiple scales (or resolutions). Unlike the Fourier transform, which only reveals the frequency content of a signal and discards all time localization, the wavelet transform retains both time and frequency information. This dual nature is essential for analyzing non-stationary signals like audio, where a click occurs as a sudden, brief, broadband event.
Mother Wavelets and Scaling
The wavelet transform relies on a “mother wavelet”—a small, oscillatory waveform that is scaled and shifted across the signal. By convolving the audio with differently scaled versions of this wavelet, the transform produces coefficients that indicate how much energy the signal contains at specific times and in specific frequency bands. Common mother wavelets used in audio processing include the Daubechies (db), Symlet (sym), and Coiflet (coif) families. Each family offers a different trade-off between time localization (how precisely it captures the onset of a click) and frequency smoothing (how cleanly it separates adjacent frequency components). The Discrete Wavelet Transform (DWT) is the practical choice for restoration because it yields a non-redundant, computationally efficient representation that is easy to manipulate.
How the DWT Works: Subband Coding
The DWT is implemented through a filter bank. The audio signal passes through a low-pass filter (producing approximation coefficients) and a high-pass filter (producing detail coefficients), followed by downsampling. This process is repeated on the approximation coefficients, creating a hierarchy of subbands. At each level, the detail coefficients capture increasingly fine temporal features, while the approximation coefficients contain the remaining low-frequency content. For a signal sampled at 44.1 kHz, decomposing to six or seven levels yields coefficients that correspond to frequency bands roughly spanning 0–345 Hz, 345–690 Hz, and so on, up to the Nyquist frequency. This multiresolution structure is precisely what allows wavelet denoising to separate clicks (which appear as large coefficients in the high-frequency detail subbands) from the underlying audio (which distributes its energy more evenly across levels).
The Denoising Pipeline: From Coefficients to Clean Audio
Wavelet denoising follows a three-step procedure: decomposition, thresholding, and reconstruction. Each step requires careful choices to achieve optimal results.
Step 1: Decomposition
The audio signal is decomposed using the DWT to a specified level (typically 5–7 for standard sample rates). The choice of wavelet family and filter length matters here. Short wavelets like db2 or Haar (db1) have excellent time localization—they can capture clicks that last only a few samples—but they produce blocky reconstructions that may sound rough. Longer wavelets like db20 produce smoother reconstructions but may blur very short transient events. For click removal, a good starting point is db4 or db6, which balances time resolution and smoothness. The number of decomposition levels determines the lowest frequency band that is subject to thresholding; deeper decomposition allows the method to target clicks buried in lower-frequency content, such as rumble, but also increases computational load.
Step 2: Thresholding
Once the coefficients are obtained, a threshold is applied to the detail coefficients. The principle is that click noise produces coefficients with magnitudes significantly larger than those of the clean signal in the same subband. Two primary thresholding strategies exist:
- Hard thresholding: Coefficients below a threshold are set to zero; those above remain unchanged. This is simple but can cause discontinuities in the reconstructed signal that manifest as “musical noise” or metallic chirps.
- Soft thresholding: Coefficients are shrunk toward zero by the threshold amount (i.e., their magnitude is reduced by the threshold value). This reduces discontinuities and often produces more natural-sounding results, though it can slightly dampen sharp attacks if the threshold is too aggressive.
Choosing the threshold value is the most critical parameter. Several methods are common:
- Universal threshold (Donoho and Johnstone, 1994): T = σ √(2 log N), where σ is the estimated noise standard deviation and N is the signal length. This threshold is optimal in a minimax sense for signals with additive white Gaussian noise, but it can be too aggressive for audio clicks, which are not Gaussian-distributed.
- SURE (Stein’s Unbiased Risk Estimate): An adaptive approach that minimizes an estimate of the mean squared error. It works well when the noise level is unknown and varies across subbands.
- Scale-dependent thresholds: Because click energy is typically concentrated in the higher subbands, one can estimate the noise level per subband separately and apply a local threshold. This is the most common strategy in professional audio restoration tools.
Step 3: Reconstruction
After thresholding, the modified detail coefficients (and the untouched approximation coefficients) are passed through the inverse DWT (IDWT) to reconstruct the cleaned time-domain signal. The result is a waveform in which click artifacts are significantly reduced or removed, while the original transients, such as drum hits or sibilants, remain largely intact.
Why Wavelet Denoising Outperforms Traditional Methods
The advantages of wavelet denoising become clear when compared to conventional techniques.
Selective Temporal-Frequency Targeting
Spectral subtraction, for example, attenuates entire frequency bands across the entire signal. If a click occurs at 3 kHz, spectral subtraction will reduce all energy at 3 kHz for the duration of the analysis window, which can mute a delicate cymbal crash or soften a vocal sibilant. Wavelet denoising, by contrast, only modifies coefficients at the specific time and scale where the click energy appears. Similarly, median filtering replaces each sample with the median of its neighbors, which blurs sharp transients and fails when clicks are close together. Wavelet denoising does not smear the signal; it operates on the coefficients directly, preserving the original sample values outside the click region.
Preservation of High-Frequency Detail
Impulsive noise removal often sacrifices high-frequency content because the noise occupies the same high-frequency bands as desirable detail (e.g., the “air” of a recording, the shimmer of hi‑hats, or the crispness of consonants). Wavelet denoising can distinguish between a short, isolated click (large coefficient, very localized in time) and a high-frequency musical note (spread over many coefficients across multiple scales). By thresholding only the most prominent impulses, it retains the natural spectral balance.
No Need for a Noise Reference
Adaptive filtering techniques like NLMS (Normalized Least Mean Squares) require a separate noise reference signal, which is rarely available in restoration scenarios. Wavelet denoising works directly on the noisy signal, estimating the noise statistics from the coefficients themselves (often from the finest-scale detail subband, assuming it contains mostly noise). This makes it a “blind” denoising method, ideal for historical recordings where only the damaged version exists.
Practical Applications in Audio Restoration
Wavelet denoising has been widely adopted in professional audio restoration, and many modern tools incorporate it. Examples include:
- Archival transfers: Libraries and archives restoring wax cylinders, 78 rpm shellac discs, and early magnetic tapes rely on wavelet-based declicking. The method recovers the original timbre while suppressing years of accumulated surface noise. The Library of Congress has documented wavelet techniques in its digital audio restoration guidelines.
- Live concert recordings: Audience microphones often pick up transient noises—bumps, coughs, or cable scratches. Wavelet denoising can remove these without flattening the dynamic range of the performance.
- Forensic audio: Law enforcement agencies use wavelet denoising to clean up recordings for courtroom evidence. A 2018 study in the Journal of Forensic Sciences demonstrated that wavelet thresholding outperformed spectral subtraction for preserving speech intelligibility after impulse noise removal.
- Music production: Producers working with vintage samplers, field recordings, or less-than-pristine source material use wavelet tools as a first pass before further mixing.
Case Study: Restoring a 1950s Jazz Recording
Consider a digitized 78 rpm record of a 1950s jazz quartet. The recording contains frequent clicks from shellac wear, plus a persistent low-frequency rumble from the turntable motor. A naive denoising approach might apply a high-pass filter to remove rumble (which thinens the double bass and piano) and median filtering for clicks (which soften brushed snare drum attacks). Using wavelet denoising, an engineer can first apply a deep DWT with db6 wavelets down to level 7, then set a low threshold for levels 1–3 (high frequencies) to remove sharp clicks, and a higher threshold for levels 4–6 to capture pops that extend into the midrange. The low-frequency approximation coefficients (level 7) are left untouched except for a gentle DC removal. The result retains the full warmth of the bass and the crispness of the hi‑hat while the clicks are gone. This case illustrates the adaptability of the wavelet framework.
Limitations and Pitfalls
Despite its strengths, wavelet denoising is not without challenges.
Parameter Sensitivity
The same recording may require different wavelet families, decomposition depths, or thresholding rules depending on the noise characteristics. An overly long wavelet can stretch a click across time, making it harder to isolate; an overly short wavelet can introduce oscillations that sound like “fizz” after reconstruction. Engineers must experiment, often using a preview loop to fine-tune settings. Some commercial tools, like iZotope RX’s Declicker, automate this exploration by offering presets for different noise profiles, but manual tuning remains the norm for demanding work.
Computational Cost
For long or high-resolution audio (96 kHz or 192 kHz sample rates), the DWT can be computationally demanding, especially if many decomposition levels are used. However, modern multi-core processors handle real-time wavelet denoising with ease. Libraries such as PyWavelets (Python) and MATLAB’s Wavelet Toolbox provide optimized implementations. Real-time plug-ins like Waves X‑Noise use wavelet-derived algorithms to process audio on the fly.
Artifact Generation
Aggressive thresholding can create “musical noise”—short, tonal chirps resulting from isolated coefficients being set to zero while nearby coefficients remain. Soft thresholding reduces this, but at the cost of slight compression of transients. A hybrid approach—using hard thresholding only on coefficients that clearly belong to clicks, and soft thresholding elsewhere—helps. Some implementations add a dithering step or a perceptual masking model to hide residual artifacts.
Overlapping Click Trains
Wavelet denoising assumes clicks are sparse and well-separated. When a recording contains dense crackle (e.g., a heavily worn vinyl groove with continuous pops), the threshold selection becomes problematic: setting a low threshold removes too much signal, while a high threshold leaves much noise. In such cases, wavelet denoising is best used as a first pass to remove the most prominent clicks, followed by a second denoising step (e.g., gentle spectral subtraction) for the residual noise.
Advanced Extensions and Future Directions
Researchers continue to push wavelet denoising further, combining it with other techniques for superior performance.
Wavelet Packet Decomposition
Standard DWT only iterates on the approximation coefficients, ignoring higher-frequency details after the first level. Wavelet packet decomposition (WPD) applies the same filter bank to both approximation and detail coefficients at each level, producing a more uniform time-frequency grid. This allows finer frequency resolution for separating noise from signal, especially in the midrange where many clicks reside. WPD is computationally more expensive but can be worth the cost for complex restoration tasks.
Empirical Wavelet Transform (EWT)
EWT adaptively designs filter banks based on the Fourier spectrum of the signal. Instead of using a fixed wavelet family, it segments the spectrum at local maxima and constructs wavelets tuned to the signal’s own structure. For audio with non-stationary click patterns, EWT can offer superior adaptability. However, it requires careful spectrum estimation and is less mature than classical wavelet methods.
Hybrid Deep Learning Models
Recent research combines wavelet transforms with neural networks. A deep network can learn to map noisy wavelet coefficients to clean ones, effectively learning the optimal threshold function from data. For example, a 2021 paper in IEEE/ACM Transactions on Audio, Speech, and Language Processing proposed a wavelet U‑Net that outperformed both traditional wavelet thresholding and spectral subtraction on impulse noise removal. These hybrids retain the multiresolution advantages of wavelets while leveraging the nonlinear modeling power of deep learning. That study is a good starting point for those interested in the cutting edge.
Practical Workflow for Engineers
To implement wavelet denoising effectively, follow these steps:
- Prepare the audio: Remove DC offset and normalize peak levels to avoid bias in coefficient magnitudes.
- Select wavelet and decomposition depth: Start with db6 or sym6 and 6–7 levels for 44.1 kHz. For very short clicks (1–2 samples), try db2 or Haar; for musical content, try coif2.
- Estimate noise per subband: Compute the median absolute deviation (MAD) of the finest-scale detail coefficients, then scale it to estimate the standard deviation. Use this as a baseline for thresholding.
- Choose thresholding rule: Apply soft thresholding initially (to avoid musical noise) and adjust. If the result is too dull, switch to hard thresholding with a lower threshold.
- Validate with A/B comparison: Listen critically in headphones. Check for leftover clicks, added noise, or dulling of transients. If needed, adjust the threshold multiplier or try a different wavelet.
- Consider a two-pass approach: First pass with wavelet denoising to remove isolated clicks; second pass with gentle spectral subtraction or adaptive filtering for remaining crackle.
Conclusion
Wavelet denoising remains one of the most powerful and transparent methods for removing clicks from audio. Its ability to operate in both time and frequency domains allows it to surgically excise impulses while preserving the intricate detail that defines high-quality sound. Although the technique requires careful parameter tuning, the payoff—clean, natural-sounding audio—is substantial. With modern libraries and plug‑ins making wavelet denoising accessible to any engineer, there is no reason to settle for the blurring and artifacts of older methods. For a deeper dive into the theoretical foundations, Donoho and Johnstone’s seminal 1994 paper remains essential reading: “Ideal spatial adaptation by wavelet shrinkage.” As wavelet-based tools continue to evolve, they will undoubtedly remain a cornerstone of audio restoration for years to come.