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.
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.
Processing pipeline
- Read source geometry: channel count, sample rate, sample count, duration, start time, and Nyquist frequency are stored.
- Resolve the filter: a selected preset replaces the manual filter parameters; Manual uses the values in the form.
- Process each channel independently: the channel is converted to a whole-file Spectrum with
To Spectrum: "no". - 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.
- Inverse transform: the modified Spectrum is converted back to Sound and copied into the corresponding output channel.
- Restore time domain: the output receives the source start time and keeps the original number of samples and sample rate.
- Optional safety attenuation: if enabled, the complete output is attenuated only when its absolute peak exceeds
Safety_peak.
Quick start
- In Praat, select exactly one Sound.
- Run
Spectral_Filtering_Effect.praat. - Choose a Preset. Use Manual for direct access to the eight filter types.
- For Manual mode, set the relevant frequency, bandwidth or transition width, and shelf gain where applicable.
- Keep Safety limit enabled if you want boosts to be attenuated automatically when the output peak exceeds the safety target.
- Enable Draw visualization to inspect the designed response together with input/output diagnostics.
- 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
| Preset | Implemented curve | Exact settings |
|---|---|---|
| Bright & Airy | High-shelf boost | +8 dB; midpoint 4000 Hz; transition 1000 Hz |
| Warm & Dark | Low-pass | cutoff midpoint 3500 Hz; transition 500 Hz |
| Telephone (300–3400 Hz) | Band-pass | flat 300–3400 Hz; 250 Hz transition outside each band edge |
| Radio Voice | Band-pass | flat 500–3500 Hz; 500 Hz transition outside each band edge |
| Muffled | Low-pass | cutoff midpoint 1000 Hz; transition 300 Hz |
| Presence & Treble Boost | High-shelf boost | +6 dB; midpoint 2500 Hz; transition 800 Hz |
| Bass Boost | Low-shelf boost | +8 dB; midpoint 200 Hz; transition 150 Hz |
| Treble Cut | High-shelf cut | −10 dB; midpoint 5000 Hz; transition 1000 Hz |
| Lo-Fi | Low-pass | cutoff midpoint 4000 Hz; transition 500 Hz |
Instrument EQ starting points
| Preset | Combined spectral curve |
|---|---|
| Bass | HP 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 |
| Piano | HP 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 Guitar | HP 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 Guitar | HP 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 |
| Drums | HP 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 |
| Percussion | HP 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 Piano | HP 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 |
| Vocals | HP 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 |
Manual filter modes
| Mode | Frequency semantics | Transition / 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 high | Selected 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 low | Selected 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
| Parameter | Default | Meaning |
|---|---|---|
| Preset | Manual | Manual plus 17 fixed presets: 9 general spectral presets and 8 Instrument EQ starting points. |
| Filter type | Low-pass (darken) | Manual-only selection among eight filter modes. |
| Center or cutoff frequency | 3000 Hz | Manual-only frequency control. Internally constrained to approximately 1 Hz … Nyquist−1 Hz. |
| Bandwidth hz | 2000 Hz | Used only by Band-pass and Band-stop. It specifies the flat pass/stop width, not the transition width. |
| Transition width hz | 500 Hz | Raised-cosine transition width. Negative values are treated as 0; values above Nyquist are limited to Nyquist. |
| Gain db | +6 dB | Used by Manual shelf modes. The selected shelf mode determines whether the magnitude is applied as boost or cut. |
| Safety limit | On | Enables final attenuation if the output peak exceeds Safety_peak. |
| Safety peak | 0.99 | Target peak for attenuation. Values ≤0 fall back to 0.99. The script never boosts a quieter result to this target. |
| Draw visualization | On | Creates the AudioTools diagnostic picture. |
| Play result | On | Plays the resulting Sound after processing. |
Input & output behavior
| Property | Behavior |
|---|---|
| Input selection | Exactly one Sound is required. |
| Channels | Arbitrary channel count is preserved. Every channel receives the same designed transfer curve, but its own samples are processed independently. |
| Duration / samples | Original sample count and duration are preserved. |
| Sampling frequency | Preserved. |
| Start time | Preserved. The output is built from time 0 internally and shifted back to the source xmin. |
| Output level | No 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. |
| Selection | The processed Sound remains selected at completion. |
| Randomness | None. 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:
- Input waveform and output waveform for up to the first 10 seconds.
- Input and filtered spectrograms, displayed up to 8 kHz or Nyquist, whichever is lower.
- Designed transfer function in dB. For Instrument EQ presets this is the complete combined HP/LP/shelf/bell response used by the DSP.
- Summary strip with preset/filter information, channel count, sample rate, input/output peaks, and whether safety attenuation was applied.
Notes & limitations
- Whole-file, static response: the transfer curve does not change over time and does not follow pitch, loudness, or spectral content.
- Zero-phase / noncausal behavior: multiplying a whole-file spectrum by a real magnitude curve preserves the stored spectral phase while producing a symmetric, noncausal filter response. Sharp spectral transitions can therefore produce ringing before and after transients, including boundary effects.
- No FFT padding in the processing path: the script uses
To Spectrum: "no". Praat therefore does not append power-of-two zero padding for this transform;Spectrum: To Soundreturns the corresponding original-length time-domain signal. - Band width versus transition width: for Band-pass and Band-stop,
Bandwidth_hzis the flat band width.Transition_width_hzis additional transition space outside that flat band. - Instrument presets are fixed curves: they are broad starting points and are not automatic corrective EQs.
- Safety is attenuation-only: a quiet filtered result remains quiet; the processor does not compensate for removed spectral energy.