Harmonic Remover — User Guide

Pitch-tracked harmonic subtraction for removing selected components of voiced sound, isolating the tracked fundamental band, or emphasizing the non-harmonic residual.

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

What this does

Harmonic Remover tracks the fundamental frequency (F0) of a mono processing signal and removes selected harmonic regions from short overlapping frames. Each target is centred at harmonic number × F0. The selected region is isolated with Praat's Hann-band filter and subtracted from the current frame result.

The processor has four removal modes:

Important distinction: this is a pitch-tracked processor, not a fixed-frequency hum or notch filter. The target frequencies follow the detected F0 from frame to frame. Quiet and unvoiced frames are passed through without harmonic removal.

Quick start

  1. Select exactly one Sound object in Praat. The sound must be at least 100 ms long.
  2. Run Harmonic_Remover.praat.
  3. Choose a preset, or choose Custom and select a removal mode.
  4. Set an appropriate pitch range for the source.
  5. Adjust the analysis window, removal bandwidth, amplitude threshold, and Wet/Dry amount if needed.
  6. Click OK. The result is created as original_harmonicRemoved_PresetName.
Starting point: use Remove Fundamental to hear the effect of suppressing the tracked F0, or Remove Harmonics 1..N to emphasize residual/noise content. Isolate Fundamental keeps only the tracked F0 region in voiced frames.

Signal flow

Input Sound ↓ Convert to mono if needed ↓ Shift working copy to 0 s ↓ Zero-pad by one full analysis window on both sides ↓ Pitch tracking: To Pitch, 10 ms analysis step ↓ Hanning frames, 75% overlap (hop = window / 4) ↓ Frame RMS gate + voiced/unvoiced decision ↓ For voiced frames above threshold: tracked F0 → harmonic targets → Hann-band isolation ↓ Sequential subtraction of selected harmonic bands OR single-band F0 isolation ↓ Overlap-add ↓ Divide by the accumulated Hanning-window weight at each sample ↓ Wet/Dry mix ↓ Crop padding ↓ Peak normalization when Wet > 0 ↓ Restore original start time ↓ Output Sound

Why the one-window padding?

The work signal is padded by one complete analysis window at both ends before framing. This keeps all retained source samples inside the stable overlap region and prevents frame-edge filter energy from being divided by very small overlap weights.

Overlap-add normalization

The script does not assume a fixed COLA divisor. A second buffer accumulates the actual Hanning-window contribution at every sample. After all frames are summed, the output is divided by this accumulated weight wherever it is non-zero. Quiet and unvoiced frames contribute their original windowed signal to the same overlap-add process.

Sequential harmonic subtraction

When several harmonics are removed, each new Hann-band isolation is calculated from the current frame result and then subtracted. This avoids repeatedly subtracting the same overlapping energy when neighbouring removal bands intersect.

Presets

PresetModeTargets / settings overridden
CustomUser-selectedUses the values entered in the form.
Remove Fundamental (de-buzz)Fundamental onlyF0 only; N=8; ±50 Hz nominal band; 60 ms window.
Remove Odd Harmonics (3,5,7...)Selected harmonics3, 5, 7, 9, 11; N=12 for display extent; ±50 Hz; 60 ms.
Remove Even Harmonics (2,4,6...)Selected harmonics2, 4, 6, 8, 10; N=10; ±50 Hz; 60 ms.
Isolate Fundamental (F0 band only)Isolate F0 bandSingle tracked F0 band; ±60 Hz; 80 ms. N does not limit the audio processing.
Remove Harmonics 1..NHarmonics 1..NN=12; ±60 Hz; 80 ms.
Remove High Harmonics (warm/mellow, keep 1-3)Selected harmonics4 through 12; ±40 Hz; 60 ms.
Presets override the removal mode and selected harmonic/window/bandwidth settings shown above. Pitch range, amplitude threshold, Wet/Dry, normalization target, visualization, and playback remain user-controlled.

Parameters

Removal controls

ParameterDefaultBehavior
Removal_modeFundamental onlyChooses fundamental removal, selected harmonics, F0 isolation, or harmonics 1..N.
Harmonic_numbers2,4,6Used in Selected harmonic numbers mode. Accepts integers 1–20 separated by commas, semicolons, or spaces. Duplicate entries are ignored.
Number_of_harmonics8N for Harmonics 1..N; clamped to 1–20. In Selected mode it does not restrict explicitly listed harmonics, but contributes to visualization extent.

Pitch tracking

ParameterDefaultBehavior
Pitch_floor75 HzLower bound for Praat's pitch tracker.
Pitch_ceiling600 HzUpper bound. It must be above the floor and below Nyquist.

Pitch is measured on the padded mono work signal with a 10 ms time step. If no voiced frames are detected, the script stops instead of producing an unprocessed output.

Frame and removal settings

ParameterDefaultRange / meaning
Analysis_window_ms60 msClamped to 20–200 ms. Hop is always one quarter of the window, giving 75% overlap.
Notch_bandwidth_Hz60 HzClamped to 5–200 Hz. It is the nominal half-width around each tracked harmonic. Praat's Hann-band transition extends beyond the nominal pass region.
Min_amplitude_dB-50 dBFrame RMS threshold measured before windowing, referenced to amplitude 1. Frames below it pass through without harmonic processing.

Output controls

ParameterDefaultBehavior
Wet_dry_percent100Clamped to 0–100. 100 = processed path only; 0 = mono dry processing signal only.
Normalize_peak_to0.95Final peak target whenever Wet > 0. At exactly 0% Wet this normalization is skipped for an exact dry-path bypass.
Draw_visualizationOnDraws the suite-standard diagnostic page. It may be disabled without affecting audio processing.
Play_resultOnPlays the final Sound after processing.

Audio and output behavior

Mono processing

The processor always works in mono. A multichannel input is converted to mono before pitch analysis and harmonic processing, and the output is therefore a one-channel Sound. A mono input remains mono.

0% Wet and multichannel input: 0% Wet is an exact bypass of the mono processing source. It is not a channel-preserving bypass of an original stereo or multichannel file, because the tool deliberately converts multichannel input to mono first.

Duration, sample rate, and time domain

The output keeps the source sample rate and source duration. Processing is performed on a zero-based padded work copy, and the source start time (xmin) is restored to the finished Sound after visualization.

Final level

If Wet_dry_percent > 0, the final result is peak-normalized to Normalize_peak_to (0.95 by default). This normalization can either attenuate or raise the result depending on its pre-normalization peak. At exactly 0% Wet, peak normalization is skipped.

Determinism

The script contains no random process or random seed. Re-running it on the same Sound with the same settings produces the same processing decisions.

Output name and cleanup

The retained object is named original_harmonicRemoved_PresetName. Analysis frames, pitch data, padding buffers, overlap-normalization buffers, and visualization-only objects are removed before the script finishes.

Visualization

When Draw_visualization is enabled, the 8-inch Praat Picture page contains:

The band diagram is a diagnostic snapshot at the median F0. The actual audio processing tracks F0 independently for every processed frame, so the real removal bands move over time when pitch changes.

Notes and limitations