Spectral Filtering Effect — User Guide

Whole-file zero-phase spectral filtering for low/high-pass shaping, band focus or rejection, low/high shelves, and combined instrument-EQ starting curves.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 1.4 (2026) License: MIT License Repo: Praat AudioTools
Contents:

What this does

Spectral Filtering Effect shapes the spectrum of a Sound with a transfer curve applied directly to the complex Fourier spectrum. It can darken or thin a sound with low/high-pass filtering, isolate or reject a frequency band, apply low/high shelves, or load one of eight broader instrument-EQ starting curves that combine several spectral components at once.

Each audio channel is transformed independently. The script multiplies every complex spectrum bin by a real, non-negative gain value, so the original phase of each bin is retained while its magnitude is changed. The result is a static, whole-file spectral transformation rather than a time-varying or source-adaptive EQ.

Instrument EQ presets: Bass, Piano, Acoustic Guitar, Electric Guitar, Drums, Percussion, Electric Piano, and Vocals are broad musical starting points. They combine high/low-pass stages, shelves, and raised-cosine bell bands in a single transfer curve. They do not analyze the source and they are not copies of proprietary DAW presets.

Processing pipeline

  1. Read source geometry: channel count, sample rate, sample count, duration, start time, and Nyquist frequency are stored.
  2. Resolve the filter: a selected preset replaces the manual filter parameters; Manual uses the values in the form.
  3. Process each channel independently: the channel is converted to a whole-file Spectrum with To Spectrum: "no".
  4. Apply the transfer curve: the Spectrum is multiplied bin-by-bin by the selected low/high-pass, band-pass/stop, shelf, or combined instrument-EQ curve.
  5. Inverse transform: the modified Spectrum is converted back to Sound and copied into the corresponding output channel.
  6. Restore time domain: the output receives the source start time and keeps the original number of samples and sample rate.
  7. Optional safety attenuation: if enabled, the complete output is attenuated only when its absolute peak exceeds Safety_peak.
One transform per channel: even the multi-band Instrument EQ presets are assembled on one Spectrum object. Their components multiply into one combined transfer curve; the script does not repeatedly transform the audio back and forth between time and frequency domains.

Quick start

  1. In Praat, select exactly one Sound.
  2. Run Spectral_Filtering_Effect.praat.
  3. Choose a Preset. Use Manual for direct access to the eight filter types.
  4. For Manual mode, set the relevant frequency, bandwidth or transition width, and shelf gain where applicable.
  5. Keep Safety limit enabled if you want boosts to be attenuated automatically when the output peak exceeds the safety target.
  6. Enable Draw visualization to inspect the designed response together with input/output diagnostics.
  7. Enable Play result for immediate playback.

Presets

All presets override the four Manual filter controls. Safety limit, Safety peak, Draw visualization, and Play result remain under user control.

General spectral presets

PresetImplemented curveExact settings
Bright & AiryHigh-shelf boost+8 dB; midpoint 4000 Hz; transition 1000 Hz
Warm & DarkLow-passcutoff midpoint 3500 Hz; transition 500 Hz
Telephone (300–3400 Hz)Band-passflat 300–3400 Hz; 250 Hz transition outside each band edge
Radio VoiceBand-passflat 500–3500 Hz; 500 Hz transition outside each band edge
MuffledLow-passcutoff midpoint 1000 Hz; transition 300 Hz
Presence & Treble BoostHigh-shelf boost+6 dB; midpoint 2500 Hz; transition 800 Hz
Bass BoostLow-shelf boost+8 dB; midpoint 200 Hz; transition 150 Hz
Treble CutHigh-shelf cut−10 dB; midpoint 5000 Hz; transition 1000 Hz
Lo-FiLow-passcutoff midpoint 4000 Hz; transition 500 Hz

Instrument EQ starting points

PresetCombined spectral curve
BassHP 30 Hz / 20 Hz transition; low shelf +2.5 dB @ 80 Hz / 80 Hz transition; bell −3 dB @ 280 Hz / 300 Hz width; bell +2 dB @ 900 Hz / 1200 Hz width
PianoHP 35 Hz / 30 Hz transition; bell −2 dB @ 300 Hz / 400 Hz width; bell +1.5 dB @ 3.2 kHz / 3 kHz width; high shelf +1.5 dB @ 9 kHz / 4 kHz transition
Acoustic GuitarHP 80 Hz / 60 Hz transition; bell −2.5 dB @ 220 Hz / 240 Hz width; bell +2 dB @ 3.2 kHz / 2.6 kHz width; high shelf +1.5 dB @ 9 kHz / 3 kHz transition
Electric GuitarHP 70 Hz / 60 Hz transition; LP 10 kHz / 4 kHz transition; bell −2 dB @ 300 Hz / 320 Hz width; bell +2 dB @ 2.2 kHz / 2 kHz width
DrumsHP 30 Hz / 20 Hz transition; low shelf +2 dB @ 80 Hz / 80 Hz transition; bell −2.5 dB @ 300 Hz / 360 Hz width; bell +2.5 dB @ 4.5 kHz / 3.6 kHz width; high shelf +1.5 dB @ 10 kHz / 4 kHz transition
PercussionHP 100 Hz / 100 Hz transition; bell +1.5 dB @ 350 Hz / 500 Hz width; bell +3 dB @ 5.5 kHz / 5 kHz width; high shelf +2 dB @ 10 kHz / 4 kHz transition
Electric PianoHP 50 Hz / 40 Hz transition; bell −2.5 dB @ 280 Hz / 320 Hz width; bell +2 dB @ 2.2 kHz / 1.8 kHz width; high shelf +1 dB @ 8.5 kHz / 3 kHz transition
VocalsHP 90 Hz / 60 Hz transition; bell −2.5 dB @ 280 Hz / 260 Hz width; bell +2.5 dB @ 3.5 kHz / 2.6 kHz width; high shelf +2 dB @ 11 kHz / 4 kHz transition
If a preset component lies partly or entirely above the source Nyquist frequency, only the realizable part of the curve is applied. Bell components whose center is at or above Nyquist are skipped.

Manual filter modes

ModeFrequency semanticsTransition / gain behavior
Low-pass (darken)Center_or_cutoff_frequency is the midpoint of the transition.Unity below the transition, zero above it. At the cutoff the linear amplitude is 0.5 (−6.02 dB). Bandwidth_hz and Gain_db are ignored.
High-pass (thin)Cutoff is the midpoint of the transition.Zero below the transition, unity above it. At the cutoff the linear amplitude is 0.5 (−6.02 dB). Bandwidth_hz and Gain_db are ignored.
Band-pass (focus)Bandwidth_hz is the width of the flat unity-gain region centered on the selected frequency.Raised-cosine transitions of Transition_width_hz are placed outside both flat band edges. Outside the transitions the response is zero. Gain_db is ignored.
Band-stop (notch)Bandwidth_hz is the width of the flat zero-gain stop region.Raised-cosine transitions connect the zero-gain stop band to unity outside. Gain_db is ignored.
Shelf boost high / Shelf cut highSelected frequency is the midpoint of the high-shelf transition.The transition is interpolated in dB. At the midpoint the gain is half the requested shelf gain in dB. Boost mode uses +abs(Gain_db); cut mode uses −abs(Gain_db).
Shelf boost low / Shelf cut lowSelected frequency is the midpoint of the low-shelf transition.Full shelf gain is reached toward DC; unity is reached above the transition. Boost/cut sign is determined by the selected mode.

If Transition_width_hz = 0, low/high-pass and shelf modes become hard steps; band-pass and band-stop use hard edges around the flat band.

Parameters

ParameterDefaultMeaning
PresetManualManual plus 17 fixed presets: 9 general spectral presets and 8 Instrument EQ starting points.
Filter typeLow-pass (darken)Manual-only selection among eight filter modes.
Center or cutoff frequency3000 HzManual-only frequency control. Internally constrained to approximately 1 Hz … Nyquist−1 Hz.
Bandwidth hz2000 HzUsed only by Band-pass and Band-stop. It specifies the flat pass/stop width, not the transition width.
Transition width hz500 HzRaised-cosine transition width. Negative values are treated as 0; values above Nyquist are limited to Nyquist.
Gain db+6 dBUsed by Manual shelf modes. The selected shelf mode determines whether the magnitude is applied as boost or cut.
Safety limitOnEnables final attenuation if the output peak exceeds Safety_peak.
Safety peak0.99Target peak for attenuation. Values ≤0 fall back to 0.99. The script never boosts a quieter result to this target.
Draw visualizationOnCreates the AudioTools diagnostic picture.
Play resultOnPlays the resulting Sound after processing.

Input & output behavior

PropertyBehavior
Input selectionExactly one Sound is required.
ChannelsArbitrary channel count is preserved. Every channel receives the same designed transfer curve, but its own samples are processed independently.
Duration / samplesOriginal sample count and duration are preserved.
Sampling frequencyPreserved.
Start timePreserved. The output is built from time 0 internally and shifted back to the source xmin.
Output levelNo normalization is applied. With Safety limit enabled, only downward scaling occurs when necessary.
Output name<source>_<presetName>, for example voice_Telephone or bass_InstrumentEQ_Bass. Manual processing uses the suffix _Manual.
SelectionThe processed Sound remains selected at completion.
RandomnessNone. The processor is deterministic for the same source and settings.

Visualization

When Draw visualization is enabled, v1.4 creates a suite-standard 8-inch diagnostic page containing:

Multichannel visualization: multichannel input and output are converted to temporary mono copies only for drawing. The actual audio processing remains channel-preserving.

Notes & limitations