Vintage Glue Compressor — User Guide

Channel-linked RMS-style compression with a standard soft knee, causal attack/release, optional nonlinear saturation, dry/wet mixing, and explicit output-level control.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 1.3.1 (2026) License: MIT License Repo: https://github.com/ShaiCohen-ops/Praat-plugin_AudioTools
Contents:

What this does

Vintage Glue Compressor is a feed-forward dynamics processor with a shared power-based sidechain. The selected Sound is measured at the audio sample rate, converted to a causal RMS-style level estimate in dBFS, smoothed with independent attack and release time constants, and passed through a hard- or soft-knee compressor curve. The resulting gain is applied uniformly to every channel. An optional nonlinear stage can then add Tube, Tape, Transistor, or FET-style coloration before dry/wet mixing and the final output-level stage.

Channel linking: the detector squares each channel first and then averages channel power. It does not downmix amplitudes before detection, so anti-phase stereo material cannot cancel in the sidechain. One gain curve is then applied to all channels, preserving inter-channel gain relationships.

Signal flow:

Input Sound
→ per-channel square → mean channel power
→ causal RMS window → amplitude → absolute dBFS
→ causal attack/release smoothing
→ soft-knee gain computer → makeup gain
→ gain applied to all channels
→ optional saturation and Harmonics mix
→ Dry/Wet mix with the original
→ optional safety ceiling / peak normalization
→ output Sound
About the “vintage” names: the presets are practical style presets, not circuit-level emulations of specific hardware. Likewise, Tube, Tape, Transistor, and FET are simplified nonlinear transfer functions chosen for different symmetric/asymmetric saturation characters.

Quick start

  1. Select exactly one Sound in Praat.
  2. Run Vintage_Glue_Compressor.praat.
  3. Choose Custom or one of the six named presets.
  4. For Custom, set the RMS threshold, ratio, knee, attack/release, saturation type, Drive, Harmonics mix, makeup, and Dry/Wet mix.
  5. Enable Advanced_settings only when you need detector-window, saturation-oversampling, output-level, statistics, or source-retention controls.
  6. Click OK. The processed Sound remains selected; playback is automatic when Play_result is on.
Useful starting point: the default Custom settings are threshold −15 dBFS RMS, 4:1, 6 dB knee, 10 ms attack, 100 ms release, saturation Off, Auto makeup On, and 100% wet. The default advanced output policy is an attenuate-only peak ceiling at 0.99.

Compression model

1. Power-linked RMS detector

For a multichannel Sound, each channel is squared before the channels are combined. The detector therefore operates on mean channel power:

p[n] = mean_c( x_c[n]^2 )

A causal one-pole smoother then estimates average power. With Rms_window_ms = W:

α = exp(−1 / (Fs · W))
p̄[n] = α p̄[n−1] + (1−α) p[n]
L[n] = 20 log10( sqrt(max(p̄[n],0)) + 10⁻¹⁰ )

L[n] is an absolute dBFS level estimate; the threshold does not move with the peak or crest factor of the loaded file.

2. Attack and release

The dB level is smoothed causally at the audio rate. A rising level uses Attack_ms; a falling level uses Release_ms. These time constants are separate from Rms_window_ms, so detector averaging and compressor ballistics are independently controllable.

3. Hard / soft knee

Below the knee the gain is unity. Above the knee, the output slope is 1/Ratio. When Knee_dB > 0, the transition uses the standard quadratic soft-knee form:

GRdB = −(1 − 1/R) · (L − T + K/2)² / (2K)    inside the knee

For Knee_dB = 0, the compressor becomes a hard-knee design.

4. Makeup

Makeup_Gain_dB is folded directly into the gain curve. With Auto_makeup enabled, the script uses a simple heuristic: half of the gain reduction that a signal 10 dB above threshold would receive. This is a convenience estimate, not loudness matching.

Saturation models

The nonlinear stage comes after compression and makeup. Drive is converted to drive_amt = 1 + 3·Drive. The selected nonlinear signal is blended with the clean compressed signal using Harmonics_mix.

ModeImplemented transferCharacter
Off (Clean Digital)No nonlinear stageCompression only.
Tubetanh(x·d) / tanh(d)Symmetric soft saturation. Because the transfer is odd-symmetric, a symmetric input primarily produces odd-order nonlinear products.
TapeAsymmetric tanh: stronger positive than negative driveAsymmetry introduces a mixture of even- and odd-order products.
TransistorBounded normalized cubic soft clipSymmetric, monotonic, C1 transition into ±1 clipping.
FETAsymmetric tanh using x + 0.1·x·|x|Punchier asymmetric saturation.
Drive = 0 is not a saturation bypass when a nonlinear model is selected. It gives the minimum model drive (d = 1). For truly clean processing choose Off (Clean Digital), or set Harmonics_mix = 0.

Harmonics mix

y = Harmonics_mix · y_sat + (1 − Harmonics_mix) · y_compressed

Harmonics_mix = 0 is the clean compressed signal; 1 is the fully nonlinear signal.

Oversampling

The Advanced dialog offers Off (source rate), 2x, or 4x saturation oversampling. When enabled, only the nonlinear stage is processed at the higher rate and then resampled back. With oversampling Off, high-order components above Nyquist can alias into the audible band, especially at high drive.

Saturation intensity index: when statistics are enabled, the script reports a setting-derived index based only on saturation type, Drive, and Harmonics mix. It is an arbitrary comparison scale and not a THD measurement.

Presets

The named presets replace the compressor and saturation character settings shown below. They do not change Dry/Wet mix, saturation oversampling, output-level policy, ceiling, statistics, or Keep original.

PresetThresholdRatio / KneeRMS windowAttack / ReleaseSaturationDrive / MixMakeup
Vocal Opto−24 dBFS3:1 / 12 dB20 ms10 / 500 msTube0.25 / 0.40+4 dB
Drum VCA−18 dBFS8:1 / 3 dB3 ms1 / 50 msTransistor0.40 / 0.50+4 dB
Mix Bus Glue−12 dBFS2:1 / 10 dB15 ms30 / 200 msTube0.15 / 0.30+2 dB
Tape Squeeze−15 dBFS4:1 / 8 dB10 ms5 / 100 msTape0.60 / 0.70+3 dB
Tube Warmth−20 dBFS2.5:1 / 15 dB20 ms20 / 300 msTube0.35 / 0.50+3 dB
FET Punch−20 dBFS12:1 / 0 dB2 ms0.5 / 50 msFET0.50 / 0.60+6 dB

All named presets switch Auto_makeup off and use the fixed makeup value in the table.

Parameters

Main dialog

ParameterDefaultMeaning
PresetCustomCustom or one of six named style presets.
Rms_threshold_dBFS−15.0Absolute RMS-sidechain threshold in dBFS.
Ratio4.0Compression ratio; must be at least 1.
Knee_dB6.0Soft-knee width; 0 = hard knee.
Attack_ms10Causal attack time constant applied to the dB detector.
Release_ms100Causal release time constant applied to the dB detector.
Saturation_typeOffClean, Tube, Tape, Transistor, or FET transfer.
Drive0.3Nonlinearity drive control. Must be ≥ 0; it is not restricted to 0–1.
Harmonics_mix0.5Blend between clean compressed and saturated signal, 0–1.
Makeup_Gain_dB0.0Constant gain added to the compressor gain curve.
Auto_makeupOnReplaces manual makeup with the script's heuristic in Custom mode.
Dry_wet_mix1.00 = original dry Sound, 1 = fully processed path.
Advanced_settingsOffOpens the second dialog.
Draw_resultOnDraws transfer curves, gain reduction, output waveform, and summary.
Play_resultOnPlays the result after processing.

Advanced dialog

ParameterDefaultMeaning
Rms_window_ms10 msCausal one-pole power averaging time constant, independent of attack/release. Named presets replace this value with their own detector window.
Saturation_oversamplingOffSource rate, 2x, or 4x for the nonlinear stage.
Output_level_modeSafety ceilingNone; attenuate-only ceiling; or always peak-normalize to Ceiling_peak.
Ceiling_peak0.99Linear sample-peak target, >0 and ≤1.
Show_statsOnReports input/output peak and RMS, gain reduction, crest factor, and level-stage details.
Keep_originalOnIf Off, removes the source Sound after successful processing.
Very short detector windows: if Rms_window_ms · Fs / 1000 < 4, the script warns that the detector is following individual cycles rather than a stable level estimate. This can turn the gain path into waveform-rate modulation rather than conventional compression.

Output, level policy, and visualization

Dry/Wet

Dry/Wet mixing occurs after compression and saturation:

y_mix = Dry_wet_mix · y_processed + (1 − Dry_wet_mix) · x_original

The output-level stage is applied after this mix. Therefore 0% wet is not necessarily a bit-identical bypass if the selected output-level mode subsequently attenuates or normalizes the file.

Output level modes

ModeBehavior
NoneLeaves the processed sample level unchanged. Peaks above 1 can clip when exported to integer PCM.
Safety ceiling (default)If the absolute sample peak exceeds Ceiling_peak, attenuates to that peak; otherwise does nothing. Quiet material is never boosted.
Peak normalizeFor any non-silent result, applies one constant gain so the absolute sample peak equals Ceiling_peak. This can either attenuate or amplify and therefore changes the absolute level implied by makeup and Dry/Wet.

This is sample-peak management using Praat's absolute extremum, not true-peak limiting.

Output name

The named presets append _Opto, _VCA, _Glue, _Tape, _Tube, or _FET. Custom uses the original object name with no added suffix; if Keep_original remains on, both objects can therefore share the same visible name in the Objects list.

Visualization

With Draw_result on, the Picture window shows: