Intelligent EQ: Adaptive Bandpass — User Guide
A mono, pitch-tracked adaptive bandpass filter. The pass-band follows detected F0 after an optional multiplier and frequency offset, so the processor can focus on existing spectral energy near F0, selected harmonics, or another F0-related region.
What this does
Intelligent EQ: Adaptive Bandpass tracks fundamental frequency (F0), smooths the detected pitch contour, and moves a single Hann-shaped pass band with that contour. In voiced frames, the filter centre is:
The processor therefore follows pitch while retaining only spectral energy inside the moving band. It is useful when you want an F0-related region to remain audible while frequencies outside that region are suppressed.
Signal flow
- Prepare source: copy the selected Sound, mix multichannel input to mono, and shift the internal working copy to t=0.
- Track F0: create a Praat Pitch object with the selected pitch floor and ceiling, then apply
Pitch: Smoothusing Pitch smoothing (Hz). - Pad: add one analysis window of zeros before and after the signal so the original audio is kept away from incomplete overlap-add boundaries.
- Frame: use sample-aligned Hann-windowed frames at 50% overlap.
- Voiced frames: calculate the target centre and full bandwidth, clamp the pass band to the available spectrum, and apply Praat's
Filter (pass Hann band). - Unvoiced frames: pass, attenuate, or mute the frame according to Unvoiced mode.
- Overlap-add: sum the filtered/tapered frames, then crop away the padding.
- Restore timing: return the output to the source Sound's original start time.
- Optional level stage: peak-normalize only when Scale peak is greater than 0.
50% Hann overlap
The script uses an even, sample-aligned window length and a hop of exactly half that window. With the surrounding padding, this overlap-add path reconstructs bypassed frames at unity rather than relying on a later compensation gain. Scale peak = 0 therefore leaves the natural OLA level unchanged.
Quick start
- Select exactly one Sound object in Praat.
- Run
Intelligent_EQ_Adaptive_Bandpass.praat. - Choose a preset or Custom.
- For Custom, set a pitch range that contains the expected F0.
- Choose the target multiplier/offset and either fixed or relative full bandwidth.
- Choose how unvoiced frames should be handled.
- Leave Scale peak = 0 when you want the natural processed level; enter a value up to 1 only when explicit peak normalization is wanted.
- Enable or disable the visualization independently of the audio processing, then run the script.
Presets
Presets override the relevant target, bandwidth, unvoiced, and smoothing parameters shown below. Parameters not listed remain at the values in the form.
| Preset | Target | Bandwidth | Unvoiced | Pitch smoothing |
|---|---|---|---|---|
| Custom | User-defined | User-defined | User-defined | User-defined |
| Fundamental Extraction | 1.0 × F0 | Relative full width = 0.40 × centre | Mute | 10 Hz |
| 2nd Harmonic Focus | 2.0 × F0 | Relative full width = 0.30 × centre | Attenuate | 12 Hz |
| 3rd Harmonic Focus | 3.0 × F0 | Relative full width = 0.25 × centre | Attenuate | 12 Hz |
| Octave-Below Band Focus | 0.5 × F0 | Relative full width = 0.50 × centre | Attenuate | 15 Hz |
| Wide F0 Region | 1.0 × F0 | Relative full width = 2.00 × centre | Bypass | 15 Hz |
| Pitch-Band Noise Reduction | 1.0 × F0 | Fixed full width = 150 Hz | Attenuate −24 dB | 10 Hz |
Parameters
Pitch tracking
| Control | Default | What it controls |
|---|---|---|
| Minimum pitch (Hz) | 75 | Lowest F0 candidate accepted by Praat's pitch analysis. |
| Maximum pitch (Hz) | 500 | Highest F0 candidate accepted. It must remain below Nyquist. |
| Pitch smoothing (Hz) | 10 | Bandwidth passed to Praat's Pitch smoothing operation after F0 analysis. Higher settings change the degree of temporal smoothing of the tracked contour. |
Target frequency
| Control | Default | Meaning |
|---|---|---|
| F0 multiplier | 1.0 | Multiplies the detected F0 before filtering. Examples: 1 = F0, 2 = 2×F0, 0.5 = octave-below region. |
| F0 offset (Hz) | 0 | Fixed Hz offset added after multiplication. |
The clamp prevents the filter centre from being placed directly on the spectrum boundaries. The pass-band edges themselves are then limited to 0 Hz and Nyquist.
Bandwidth and transition
| Control | Default | Meaning |
|---|---|---|
| Bandwidth val | 100 | The full pass-band width. Its units depend on Bandwidth mode. |
| Bandwidth mode: Fixed full bandwidth | Default mode | effectiveBW = Bandwidth val in Hz. |
| Bandwidth mode: Relative full bandwidth / centre | — | effectiveBW = target × Bandwidth val. For example, 0.4 produces a total width equal to 40% of the centre frequency, or ±20% around the centre. |
| Transition width (Hz) | 50 | Smoothing width used by Praat's Hann-band frequency-domain filter between pass and stop regions. |
Unvoiced handling
| Mode | Behavior |
|---|---|
| Bypass | The tapered frame is passed to the OLA without bandpass filtering. |
| Attenuate | The tapered frame is multiplied by 10^(dB/20). Positive attenuation values are clamped to 0 dB. |
| Mute | The frame contributes zero to the output. |
Unvoiced attenuation (dB) defaults to −18 dB and is used only in Attenuate mode.
Tracking / speed
| Quality | Requested window | Hop | Pitch-analysis time step |
|---|---|---|---|
| Draft | 60 ms | 50% of actual window | Half the hop |
| Standard | 40 ms | 50% of actual window | Half the hop |
| High tracking | 25 ms | 50% of actual window | Half the hop |
The requested window is converted to an even integer number of samples, so its actual duration can differ slightly from the displayed nominal value. High tracking means shorter frames and finer temporal following; it is not an instruction to synthesize higher-quality audio.
Output
| Control | Default | Behavior |
|---|---|---|
| Scale peak | 0 | 0 = no final peak scaling. A value >0 and ≤1 peak-normalizes the completed output to that value. |
| Show visualization | On | Draws the diagnostic page. It does not alter the audio result. |
| Play result | On | Plays the completed Sound after cleanup. |
Input & output behavior
| Property | Behavior |
|---|---|
| Selection | Exactly one Sound object is required. |
| Channels | Mono remains mono. Stereo and other multichannel Sounds are averaged to mono before analysis and processing; output is mono. |
| Sample rate | Preserved. |
| Duration | Preserved. Internal zero padding is cropped away before output. |
| Start time | The source xmin is restored after internal processing at t=0. |
| Natural level | Preserved when Scale peak = 0; no automatic final normalization is performed. |
| Output name | <original>_adaptive_EQ |
| Determinism | No random process is used; identical settings and input produce the same result. |
Visualization
When Show visualization is enabled, the script draws a Praat AudioTools diagnostic page. The drawing uses display copies and does not modify the output Sound.
- Input waveform: mono working source.
- Output waveform: processed Sound shifted to t=0 only in the display copy so it aligns visually with the input.
- Input and output spectrograms: paired views up to the lower of 8 kHz or Nyquist.
- Tracking panel: gray = detected F0; blue = target centre; dotted blue-gray curves = lower and upper pass-band edges.
- Summary panel: target equation, bandwidth, transition width, voiced percentage, unvoiced mode, input channel count → mono, and peak-normalization status.
Notes & limitations
- Pitch dependence: the adaptive band follows the F0 returned by Praat. Incorrect octave choices or unvoiced decisions therefore move or disable the filter correspondingly.
- Single-band design: each voiced frame uses one continuous pass band. The processor does not track a complete harmonic series.
- No new partials: filtering cannot create an octave, fifth, subharmonic, or missing harmonic that is absent from the source spectrum.
- Offset is in Hz: adding a fixed offset after multiplication does not preserve a constant musical interval as F0 changes.
- Very wide relative bandwidths: pass-band edges are clipped to 0 Hz and Nyquist when necessary.
- Zero-phase frame filtering: Praat's Hann-band filtering is performed in the frequency domain with zero phase shift. Because it is acausal, energy can extend on both sides of events within a processed frame; frame tapering and overlap-add manage transitions between successive filter positions.
- Mono conversion is destructive with respect to spatial information: stereo balance and multichannel spatial differences are not retained.
Further Reading
- Praat Manual — Sound: To Pitch.... Documents the three-argument pitch command used by the script and its pitch floor, ceiling, and time-step behavior.
- Praat Manual — Pitch analysis by raw autocorrelation. Describes the autocorrelation method underlying the legacy
To Pitchcommand used here and cites Boersma's original algorithm. - Praat Manual — Filtering. Describes Praat's frequency-domain Hann-band filtering and its zero-phase, acausal behavior.
- Boersma, P. (1993). “Accurate short-term analysis of the fundamental frequency and the harmonics-to-noise ratio of a sampled sound.” Proceedings of the Institute of Phonetic Sciences, 17, 97–110.