Noise Gate — v2.4 User Guide
Stereo-linked noise gate and inverse-gate ducker with absolute dBFS thresholding, hysteresis, hold, attack/release smoothing, optional sidechain filtering, adaptive detector rate, and time-aligned edge padding.
What this does
Noise Gate v2.4 derives a control envelope from one selected mono or stereo Sound and multiplies the original audio by that envelope. In normal gate mode, the signal is passed at unity gain while the detector is open and attenuated toward the selected closed range when the detector closes. The Ducker preset reverses that gain assignment: detector activity reduces the signal, while inactive periods return toward unity gain.
- Absolute dBFS open threshold — the detector opens when its measured level rises strictly above
Threshold_dBFS. - Hysteretic close threshold — once open, it closes only when level falls strictly below
Threshold_dBFS - Hysteresis_dB. - Adaptive control rate — 1, 5, or 10 kHz is selected from the fastest requested timing value.
- Attack, hold, and release — generated on the control-rate envelope before it is resampled to the audio sample rate.
- Range or mute — closed-state attenuation can be finite, or exactly zero with
Mute_when_closed. - Stereo-linked detection — stereo control uses the larger absolute sample magnitude of left and right, so both output channels receive one shared gain envelope.
- Optional filtered sidechain — filtering affects detection only; the selected Sound itself is not filtered.
Quick start
- Select exactly one mono or stereo Sound in Praat.
- Run
Noise_Gate.praat. - Choose Custom or one of the six named presets.
- For Custom, set the absolute threshold, hysteresis, timing, closed range, optional mute, and sidechain filter.
- Leave Peak_normalize_final_output off when you want gating or ducking to preserve the resulting absolute level. Enable it only when you explicitly want the final peak scaled to 0.95.
- Click OK. Normal gating creates
originalname_gated; the Ducker preset createsoriginalname_ducked.
Detector and gate logic
1. Sidechain preparation
The script first copies the source into a sidechain path. If a sidechain filter is selected, that filter is applied before rectification. Mono detection uses abs(sample). Stereo detection is linked:
This produces one mono detector signal and therefore one common gate envelope for both stereo channels.
2. Time-aligned padding and Intensity analysis
The detector is padded with 100 ms of near-silence at both ends before Intensity analysis, then shifted so the padded domain is aligned to t_start - 0.1 s through t_end + 0.1 s. This supplies analysis context at the original file boundaries rather than forcing the detector window to stop abruptly at the first and last source samples.
The analysis control rate is chosen from the fastest of attack, hold, and release:
| Fastest requested timing | Control rate | Base Intensity floor |
|---|---|---|
| ≥ 1.0 ms | 1 kHz | 100 Hz |
| 0.5 to < 1.0 ms | 5 kHz | 400 Hz |
| < 0.5 ms | 10 kHz | 800 Hz |
For very short sounds the Intensity floor may be raised further with ceil(9.6 / padded_duration). The script reports both the chosen control rate and its detector-window estimate in the Info window.
3. Absolute dBFS state machine
Gate thresholds
Normal gate mode maps the binary state to 1.0 when open and range_lin when closed. Ducker mode maps the same detector state in the opposite direction: an active/open detector uses range_lin, while the inactive state uses unity gain.
4. Hold and smoothing
The active state is extended by a control-rate hold counter. The resulting target envelope is then exponentially smoothed. In normal gate mode, rising gain uses Attack and falling gain uses Release. In Ducker mode, gain reduction uses Attack and recovery uses Release.
The factor 4.6 makes the one-pole transition approach roughly 99% of its destination over the requested number of control samples.
The six presets (+ Custom)
| Preset | Threshold | Hyst. | Attack | Hold | Release | Range | Mode |
|---|---|---|---|---|---|---|---|
| Gentle (speech) | -35 dBFS | 4 dB | 2 ms | 100 ms | 150 ms | -40 dB | Gate |
| Medium (vocals) | -30 dBFS | 3 dB | 1 ms | 50 ms | 80 ms | -60 dB | Gate |
| Tight (drums) | -25 dBFS | 2 dB | 0.5 ms | 20 ms | 30 ms | -80 dB | Gate |
| Aggressive (noise removal) | -20 dBFS | 2 dB | 0.3 ms | 10 ms | 20 ms | -80 dB | Gate |
| Ducker (inverse gate) | -25 dBFS | 3 dB | 5 ms | 100 ms | 200 ms | -12 dB | Ducker |
| Fast Choppy Gate | -20 dBFS | 1 dB | 1 ms | 5 ms | 10 ms | -80 dB | Gate |
Mute_when_closed, sidechain filter, final peak normalization, visualization, or playback.Parameters and defaults
Threshold and timing
| Parameter | Default | Meaning |
|---|---|---|
| Threshold_dBFS | -30 dBFS | Absolute detector level above which a closed detector opens. |
| Hysteresis_dB | 3 dB | Non-negative offset below the open threshold used to form the close threshold. |
| Attack_ms | 1 ms | Opening transition in Gate mode; gain-reduction transition in Ducker mode. |
| Hold_ms | 50 ms | Extends the current active/open detector state before release/recovery begins. |
| Release_ms | 50 ms | Closing transition in Gate mode; recovery transition in Ducker mode. |
Closed or ducked gain
| Parameter | Default | Meaning |
|---|---|---|
| Range_dB | -80 dB | Finite attenuation used for the closed Gate state or active Ducker state. Positive values are rejected. |
| Mute_when_closed | Off | Forces range_lin = 0. In normal Gate mode this is a true closed-state mute; in Ducker mode it makes the active ducked state mute completely. |
Sidechain filter
| Option | Detector path |
|---|---|
| Off (full spectrum) | No sidechain filtering. |
| High-pass 100 Hz | Hann-band high-pass beginning at 100 Hz, 50 Hz smoothing. |
| High-pass 200 Hz | Hann-band high-pass beginning at 200 Hz, 50 Hz smoothing. |
| Band 1-5 kHz (presence) | Passes 1 kHz to min(5 kHz, Nyquist - 100 Hz) with 100 Hz smoothing. At sample rates too low to leave a usable band above 1 kHz, the filter step is skipped. |
Output
| Parameter | Default | Meaning |
|---|---|---|
| Peak_normalize_final_output | Off | If enabled, applies Scale peak: 0.95 after gating/ducking. |
| Visualize | On | Draws the v2.4 diagnostic page. |
| Play | On | Plays the final Sound. |
Sidechain, control rate, and timing
After hold and attack/release processing, the gain envelope is resampled to the audio sampling rate with Praat Resample: sr, 50, trimmed if the resampled envelope contains more samples than the audio, and clamped to the interval range_lin ... 1. The same high-rate envelope is then multiplied into every audio channel.
Output and reported statistics
The result is a copy of the selected Sound, so its audio format, channel count, sample rate, and time domain are retained. The script supports only mono and stereo input.
| Mode | Output name | Gain interpretation |
|---|---|---|
| Normal gate | <name>_gated | Unity when open; range_lin when closed. |
| Ducker preset | <name>_ducked | range_lin while detector is active; unity while inactive. |
Average Gate Openness is derived from the mean smoothed gain envelope after compensating for the selected finite range. In Ducker mode the same calculation is labeled Average Unducked Gain.
Time Signal > Thresh is based on the binary detector state before hold and attack/release smoothing. Because the state machine includes hysteresis, this statistic is best read as the percentage of control frames for which the binary detector remained active, not as a literal sample-by-sample count of values strictly above the open threshold.
Visualization
The v2.4 Picture page contains three data panels plus a summary strip:
- Input — source waveform.
- Envelope — the final resampled gain envelope; the lower closed-range region is lightly red, the unity region lightly green, and a dashed 0.5 line is a visual reference only.
- Output — processed waveform.
- Summary — preset, threshold, nominal range, attack/hold/release, activity statistics, mode, duration, channel count, and final peak.
Limits and interpretation
- Mono/stereo only: inputs with more than two channels are rejected.
- Detector, not sample peak thresholding: the state machine uses a Praat Intensity-derived level after optional sidechain filtering and time-window analysis.
Threshold_dBFSshould therefore be interpreted as the absolute level of that detector, not as an instantaneous sample threshold. - File edges use synthetic context: 100 ms of near-silence is appended before and after the detector signal for Intensity analysis.
- Ducker is preset-selected: the inverse mapping is activated by the named Ducker preset; Custom remains normal Gate mode.
- Fast timing is quantized to the chosen control rate: timing is converted to integer control samples before smoothing.
- No final limiter: with peak normalization off, the script does not otherwise limit or normalize the result.