Stepped Notch Filter — User Guide
Static whole-file FFT spectral sculpting with one or two hard rectangular gain regions, optional wet-only mono-to-stereo offset, and measured transfer-function QC.
What this does
Stepped Notch Filter is a whole-file FFT-domain stepped spectral attenuator. It defines one or two rectangular frequency regions, multiplies bins inside those regions by fixed gains, and applies a separate gain outside the regions. Because the same positive multiplier is applied to the complete complex bin, phase is preserved while magnitude is stepped.
Despite the name, this is more general than a single narrow “notch”: custom settings can create broad dips, pass-band emphasis through a reduced outside gain, telephone-style band restriction, or two independent rectangular regions.
Quick start
- Select exactly one mono or stereo Sound.
- Run
Stepped_Notch_Filter.praat. - Start with Vocal Presence Dip, Static De-Esser, Hollow Middle or Telephone Band.
- For Custom, define up to two frequency regions and their linear gains.
- Set outside_gain for all frequencies not inside an active band.
- If custom bands overlap, the overlap automatically uses the lower gain (stronger attenuation).
Presets
Presets replace the band definitions and outside gain. Wet/Dry, stereo output, scale peak and output switches remain user-controlled.
| Preset | Band 1 | Band 2 | Outside |
|---|---|---|---|
| Custom | 2000–2200 Hz ×0.1 | 5500–5800 Hz ×0.2 | ×1.0 |
| Vocal Presence Dip | 2000–4000 Hz ×0.3 | Inactive | ×1.0 |
| Static De-Esser | 5000–8000 Hz ×0.4 | Inactive | ×1.0 |
| Hollow Middle | 400–2000 Hz ×0.2 | Inactive | ×1.0 |
| Telephone Band | 0–300 Hz ×0.1 | 3400 Hz–Nyquist ×0.1 | ×1.0 |
Controls
| Control | Default | Meaning |
|---|---|---|
| band1_low / band1_high | 2000 / 2200 Hz | First rectangular frequency region. Reversed limits are automatically swapped and both edges are clamped to Nyquist. |
| band1_gain | 0.1 | Linear multiplier inside Band 1. Zero is allowed; values above 1 amplify. |
| band2_low / band2_high | 5500 / 5800 Hz | Second rectangular frequency region; a zero-width region is inactive. |
| band2_gain | 0.2 | Linear multiplier inside Band 2. |
| outside_gain | 1.0 | Linear multiplier outside active bands. |
| wet_dry_percent | 100% | Blend between requested dry-format path and processed spectrum. |
| stereo_output | On | Preserves stereo sources; creates stereo from mono; when off, stereo source is intentionally folded to mono before processing. |
| scale_peak | 0.90 | When Wet > 0, final mix is target-normalized to this peak. |
| draw_visualization | On | Draws the actual stepped transfer law, spectra, waveforms and measured-gain QC. |
| play_after_processing | On | Plays the final output. |
Processing pipeline
- Validate mono/stereo input and normalize custom band order.
- Clamp band edges to 0…Nyquist. A band is active only when its high edge is greater than its low edge.
- Build the exact stepped gain law. In an overlap, use
min(band1_gain, band2_gain). - Prepare the requested output format: preserve stereo, create stereo from mono, or fold stereo to mono.
- Compute a whole-file Spectrum for each processing channel and multiply complete complex bins by the gain law.
- Inverse-transform and trim to the original duration.
- For mono input with stereo output, delay only the wet right channel by 12 ms.
- Mix dry and wet. If Wet > 0, target-normalize to
scale_peak.
Channels, bypass, duration and level
- Input: mono or stereo only.
- Stereo input + stereo output: left and right are filtered independently with the same transfer law; original stereo structure is preserved.
- Stereo input + stereo_output off: the source is converted to mono before filtering and the output is mono.
- Mono input + stereo_output on: dry is duplicated to stereo; wet right is delayed by 12 ms.
- Wet = 0: no FFT wet contribution and no peak scaling. The audio follows the dry path exactly within the selected output format, but stereo_output can still convert mono↔stereo format.
- Duration / sample rate: preserved.
- Randomness: none.
- Output name:
<source>_<preset>.
Visualization
The visualization is built around the actual stepped transfer law and measured processing path. Source and wet spectra share one scale, source/final waveforms share one amplitude scale, and the display includes target-versus-measured gain QC for the active regions. For preserved stereo, the stronger-RMS source channel is used as the representative channel.
Technological context
The preset Telephone Band reflects the conventional narrowband telephone range. ITU-T Recommendation P.310 explicitly describes “telephone-band (300–3400 Hz) digital telephones.” The preset leaves that middle band at ×1 and attenuates frequencies below 300 Hz and above 3400 Hz to ×0.1.
This should be understood as a spectral coloration, not a telephone-system simulation. Real telephony also involves codec bandwidth, handset/acoustic response, noise, nonlinear distortion, sidetone and other transmission characteristics that are outside this script.
Further reading
ITU-T P.310, Transmission characteristics for telephone-band (300–3400 Hz) digital telephones.