Adaptive Spectral Resonance Suppressor — User Guide

Offline multiband resonance suppression. The script tracks frequency bands that rise above their local spectral neighborhood and reduces those bands dynamically over time.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 1.6 (2026) Category: Spectral & Frequency Domain License: MIT License Repo: Praat AudioTools
Contents:

What this does

The script divides the signal into logarithmically spaced frequency bands, measures the level of each band over time, and compares each band with nearby bands. A band that rises sufficiently above its local baseline can be attenuated. The amount of attenuation then follows the signal through separate attack and release times.

What counts as a resonance here?

In this tool, a resonance is a band whose measured level protrudes above the surrounding spectral baseline. The processor does not search for sinusoidal peaks or estimate a filter Q.

Resolution matters: with the default 24 bands from 60 Hz to 16 kHz, the bank has about 3 bands per octave. This is multiband attenuation, not a bank of narrow notches. Increasing Number_of_bands gives finer frequency resolution.

The design is conceptually inspired by dynamic resonance suppressors such as Oeksound Soothe2, but the implementation and controls here are specific to this Praat script.

Quick start

  1. Select exactly one Sound object in Praat.
  2. Run Adaptive_Spectral_Resonance_Suppressor.praat.
  3. Choose a preset. Moderate is a useful general starting point.
  4. Use Threshold_dB and Max_reduction_dB to control how readily and how strongly the processor reacts.
  5. Use Sharpness to concentrate reduction toward the strongest detected bands.
  6. Use Mix for dry/wet blending.
  7. Leave Draw_visualization on if you want a diagnostic Picture display.
Important: presets 2–6 replace several values entered in the main form. Choose Custom when you want the main musical controls to remain exactly as entered.

Main controls

ControlDefaultWhat it changes
PresetCustomSelects Custom, Gentle, Moderate, Aggressive, Vocal Clarity, or De-Harsh.
Threshold_dB3.0How far a band must rise above its local baseline before reduction begins. Lower values react more easily.
Max_reduction_dB6.0Maximum reduction before frequency-dependent protection is applied.
Sharpness0.5Concentrates reduction toward the strongest detected bands in each frame. It does not narrow the filter bands or change Q.
Attack_ms10How quickly reduction rises when a resonance appears.
Release_ms80How quickly reduction relaxes after the resonance subsides.
Protect_Hz150Sets the upper edge of the low-frequency protection region.
Protect_amount0.7Reduces suppression progressively toward the low end; 0 disables this protection and 1 gives the strongest protection curve.
Mix1.0Dry/wet mix: 0 = original, 1 = fully processed.
Output_gain_dB0.0Gain applied after the dry/wet mix.
Advanced_settingsOffOpens the analysis and filter-bank settings dialog.
Draw_visualizationOnDraws the diagnostic Picture display.
Play_resultOnPlays the final Sound after processing.

Presets

The presets change only specific controls. Mix, Output_gain_dB, the band count/range, the time-analysis settings, and most other Advanced settings remain as chosen by the user.

PresetValues replaced by the preset
GentleThreshold 4 dB; max reduction 4 dB; Sharpness 0.3; Attack 15 ms; Release 120 ms; smoothing bandwidth 500 Hz; LF protect 200 Hz / 0.8.
ModerateThreshold 3 dB; max reduction 6 dB; Sharpness 0.5; Attack 10 ms; Release 80 ms; smoothing bandwidth 400 Hz; LF protect 150 Hz / 0.7.
AggressiveThreshold 1.5 dB; max reduction 12 dB; Sharpness 0.6; Attack 5 ms; Release 60 ms; smoothing bandwidth 300 Hz; LF protect 120 Hz / 0.5.
Vocal ClarityThreshold 2.5 dB; max reduction 8 dB; Sharpness 0.7; Attack 8 ms; Release 70 ms; smoothing bandwidth 350 Hz; LF protect 250 Hz / 0.9; HF soft 12 kHz.
De-HarshThreshold 2 dB; max reduction 10 dB; Sharpness 0.5; Attack 8 ms; Release 90 ms; smoothing bandwidth 400 Hz; LF protect 200 Hz / 0.8; HF soft 8 kHz.
CustomNo preset values are substituted.
Smoothing-span detail: presets set Smoothing_bandwidth_Hz. If Advanced settings selects Octaves instead of Hz, that preset bandwidth value is not used for the baseline calculation.

Advanced settings

SettingDefaultMeaning
Window_length_s0.030Controls the Praat Intensity analysis window. The script clamps it to 10–100 ms and may shorten it automatically for very short sounds.
Time_step_s0.010Requested spacing between analysis frames. It is clamped to 2–50 ms and may be shortened for short sounds.
Smoothing_spanHzChooses how neighboring frequency bands are selected for the local baseline: an absolute Hz span or a constant span in octaves.
Smoothing_bandwidth_Hz400Requested baseline span in Hz mode. Because the filter bank is logarithmic, sparse high-frequency bands can make the actual span wider than this value.
Smoothing_width_octaves1.0Baseline width in octave mode; this keeps the relative span more consistent across registers.
HF_soft_Hz10000Above this frequency, the amount of suppression is progressively reduced toward the top of the processing range.
Number_of_bands24Number of logarithmically spaced bands. Allowed range after clamping: 8–64. More bands give finer frequency resolution but require more processing.
Min_band_Hz60Lower edge of the processed filter-bank range; clamped to at least 20 Hz.
Max_frequency_Hz16000Upper edge of the filter-bank range. It is limited to 100 Hz below Nyquist and must remain above Min_band_Hz.
Show_spectrumOnWhen visualization is enabled, shows the original/processed spectrum in the headline panel. Off replaces that panel with a parameter report.
Minimum duration: the selected Sound must be at least 40 ms. Between roughly 40 and 200 ms, the script can shorten the analysis window and time step automatically so that a usable frame grid still fits.

How the processing works

Signal flow

Sound → log-spaced bands → band-level analysis → local spectral baseline → resonance score → attack/release smoothing → time-varying band gains → recombination → dry/wet mix → output gain

1. Split the sound into frequency bands

The selected frequency range is divided into logarithmically spaced Hann-bandpass regions. At the default settings there are about three bands per octave.

2. Measure each band over time

Each band is analyzed with Praat Intensity. These values are in dB SPL. For every time frame, the script averages the neighboring band values in dB to form a local baseline.

3. Decide which bands stand out

A band is considered active when its level exceeds the local baseline by more than Threshold_dB. Sharpness then reduces the contribution of weaker candidates relative to the strongest candidate in that frame. It changes the distribution of reduction across bands, not the width of the bands themselves.

4. Protect frequency regions and smooth the motion

Low-frequency protection reduces the amount of attenuation below Protect_Hz. HF_soft_Hz gradually weakens attenuation above its selected frequency. Separate attack and release followers smooth the requested gain reduction through time.

5. Reconstruct the signal

The time-varying gains are resampled to the audio sample rate and applied to the corresponding bands. The script also keeps a residual component outside and between the analyzed bands, so when every band gain is 1 the reconstruction returns the input rather than turning the whole result into a fixed band-pass signal.

Channels & output

Stereo/multichannel note: channel count is preserved, but the gain-reduction analysis is not linked between channels. The same resonance can therefore receive different attenuation in different channels.

Visualization

The visualization is a diagnostic summary of the original and processed Sounds. Multichannel files are converted to mono for display only; the audio processing itself keeps all channels.

PanelWhat it shows
Spectrum / parameter reportWith Show_spectrum on: original and processed spectra. With it off: the current detection, suppression, protection, and mix settings.
Difference signaloriginal - processed. This is the complete output difference, not a pure “resonance-only” signal; it also reflects Mix, Output_gain_dB, and any clip-guard scaling.
First 500 msOriginal and processed waveforms overlaid on one shared amplitude scale for that zoomed region.
Full waveformOriginal and processed waveforms overlaid using a shared scale based on the larger peak of the two.
Summary stripPreset, band count, depth, threshold, attack/release, measured peak and average active reduction, active-frame percentage, Mix, output gain, duration, peak, and spectrum status.

Further Reading