LUFS Tool v4.3 — User Guide

Gated programme-loudness analysis, loudness-range analysis, 4×+ oversampled true-peak estimation, and optional target-gain processing for mono, stereo, and validated 5.1 audio.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 4.3 (2026) Measurement basis: ITU-R BS.1770-5 / EBU R 128 / EBU Tech 3342 License: MIT License
Contents:

What this does

LUFS Tool v4.3 analyzes one selected Praat Sound and reports integrated programme loudness, true peak, and — for material at least 3 seconds long — Loudness Range (LRA) and maximum short-term loudness. It can also apply a target gain directly, restrict that gain to the available true-peak headroom, or iteratively combine loudness gain with a dynamic true-peak limiter.

Important implementation scope: v4.3 no longer uses the old RMS-minus-3-dB loudness approximation. Its loudness path implements K-weighting, 400 ms gated programme-loudness blocks with 100 ms hops, BS.1770-style channel weighting, and the EBU Tech 3342 LRA procedure. The implementation is nevertheless a Praat script, not a formally certified conformance meter; use a validated compliance meter where regulatory or delivery certification is required.

The script supports mono/stereo or an explicitly selected 5.1 layout. For 5.1 it assumes channel order L, R, C, LFE, Ls, Rs, ignores the LFE channel in loudness integration, and applies a 1.41 weight to each surround channel.

Quick start

  1. Select exactly one Sound object in Praat.
  2. Run LUFS_Tool.praat.
  3. Choose a Preset or use Custom and enter your own target LUFS.
  4. Select the correct Channel Layout: Mono / Stereo or 5.1 Surround.
  5. Choose one of the four Mode options.
  6. Set the True Peak Ceiling if Custom or a suggested-target preset should use a ceiling other than the current form value.
  7. Run the script. The Info window reports the input measurement, gain analysis, and — when processing occurs — a full post-processing re-measurement.
Recommended first pass: use Analyze Only. This preserves the original Sound and lets you inspect Integrated LUFS, dBTP, LRA, short-term loudness, required target gain, and available true-peak headroom before choosing a processing mode.

Measurement pipeline

1. K-weighting

The script copies the source and applies two recursive biquad stages before loudness measurement: a high-frequency shelving stage followed by a low-frequency high-pass stage. The coefficients are calculated from the source sampling rate. These filtered samples are used for programme loudness and LRA; the original Sound itself is not modified during analysis.

2. Channel-weighted mean-square energy

LayoutAccepted channelsLoudness weights
Mono / StereoExactly 1 or 21.0 for every channel
5.1 SurroundExactly 6 in L, R, C, LFE, Ls, Rs orderL/R/C = 1.0; LFE = 0; Ls/Rs = 1.41

3. Gated Integrated LUFS

Block duration = 0.400 s Hop = 0.100 s (75% overlap) For each block: MS = sum(channel_weight × channel_RMS²) L_block = -0.691 + 10 log10(MS) Absolute gate: keep blocks with L_block > -70 LUFS Relative gate: compute loudness of the absolute-gated blocks relative threshold = that loudness - 10 LU keep blocks above BOTH -70 LUFS and the relative threshold Integrated LUFS: -0.691 + 10 log10(mean of retained block MS values)

If no block survives the gates, the script reports -70.0 LUFS as its floor value.

4. Short-Term Loudness and LRA

For inputs of at least 3 seconds, short-term loudness uses 3.0 s windows with a 0.1 s hop. For file-based LRA alignment the K-weighted signal receives 1.5 s trailing silence. v4.3 explicitly restores the original Sound start time after concatenation, so this analysis remains aligned when the source time domain does not begin at 0.

LRA selection: short-term absolute gate: > -70 LUFS short-term relative gate: > (absolute-gated mean loudness - 20 LU) LRA = 95th-percentile loudness - 10th-percentile loudness Files shorter than 3.0 s: LRA = unavailable Max Short-Term = unavailable

5. True-peak estimation

True peak is estimated by resampling to max(4 × source sample rate, 176400 Hz), then measuring positive and negative extrema with Praat's Sinc70 interpolation. The reported value is 20 log10(max absolute extremum). Very small measured amplitudes are reported as -100 dBTP.

Memory guard: before either true-peak measurement or the internal dynamic limiter oversamples audio, v4.3 estimates the required temporary allocation. If it would exceed 200,000,000 sample values (frames × channels), the script stops rather than silently lowering the 4×+ analysis rate.

Presets

Preset names are convenient target choices built into this script. They should not be read as guarantees about a service's current delivery policy. Platform practices can change, and the suggested music/cinema targets are creative targets rather than standards.

PresetTarget LUFSTrue-peak ceiling behavior
CustomCustom_target_LUFS (default -14)Uses the entered True_peak_ceiling_dB
Spotify-14 LUFSForces -1 dBTP
Apple Podcasts-16 LUFSForces -1 dBTP
YouTube-14 LUFSForces -1 dBTP
Broadcast EU (EBU R128)-23 LUFSForces -1 dBTP
Broadcast US (ATSC A/85)-24 LUFSForces -2 dBTP
Film / Cinema (Suggested Target)-27 LUFSDoes not override the entered ceiling
Classical Music (Suggested Target)-18 LUFSDoes not override the entered ceiling
CD Master (Suggested Target)-9 LUFSForces -0.5 dBTP

Processing modes

Analyze Only

Measures the source and performs no audio processing. No new Sound is created; the original input remains the selected result used by the final report and visualization. Play is not triggered in this mode.

Apply Exact Gain (may clip)

Creates <source>_ExactGain and applies exactly:

gainNeeded_dB = target_LUFS - measured_integrated_LUFS gainLinear = 10^(gainNeeded_dB / 20) output = input × gainLinear

This mode is deliberately unconstrained. It does not enforce the selected true-peak ceiling and therefore may produce samples or intersample peaks above the intended limit.

Apply Safe Gain (no clipping)

Creates <source>_SafeGain. The initial gain is limited by the measured true-peak headroom:

gainNeeded = target_LUFS - input_LUFS headroom = true_peak_ceiling_dB - input_true_peak_dBTP appliedGain = min(gainNeeded, headroom)

After processing, the script re-measures true peak and loudness. If the result still exceeds the ceiling by more than 0.001 dB, it applies a final global attenuation equal to that excess and measures again.

Normalize to Target (with dynamic limiting)

Creates <source>_Normalized and iterates up to 5 times toward the loudness target with a 0.1 LU tolerance. Each iteration applies the remaining gain, measures true peak, invokes the internal limiter only when the measured peak exceeds the selected ceiling, then measures Integrated LUFS again.

The internal limiter uses a linked absolute-peak sidechain across all channels, 4×+ oversampling, a fixed 3 ms future-window lookahead, a fixed 30 ms exponential release, and a gain envelope clamped to 0.0001…1.0. It only attenuates; it does not add make-up gain.

If the remaining LUFS error stops changing meaningfully, the loop terminates and reports that the target is not attainable under the chosen ceiling. A final true-peak safety verification is then applied exactly as in Safe Gain.

ModeNew Sound?Target LUFS guaranteed?Ceiling enforcement
Analyze OnlyNoNo processingMeasurement only
Exact Gain_ExactGainLinear gain is exact relative to the measured input LUFSNone
Safe Gain_SafeGainOnly if the required gain fits the true-peak headroomHeadroom-limited gain + final verification
Normalize to Target_NormalizedAttempted iteratively; may be unattainableDynamic limiter + final verification

Parameters

FieldDefaultBehavior
PresetCustomSelects target and, for some presets, overrides the true-peak ceiling.
Custom_target_LUFS-14.0Used only when Preset = Custom.
Channel_LayoutMono / StereoValidates either 1–2 channels or exactly 6 channels in the documented 5.1 order.
ModeAnalyze OnlySelects measurement-only, exact gain, safe gain, or iterative target normalization.
True_peak_ceiling_dB-1.0 dBTPMust be ≤ 0. Some presets override it after the form is read.
VisualizeOnDraws the AudioTools analytics page.
PlayOffPlays only when a processed Sound was created.
Minimum duration: the script rejects material shorter than 0.4 s, because its programme-loudness measurement uses 400 ms blocks. LRA and maximum short-term loudness additionally require at least 3.0 s.

Visualization

When Visualize is enabled, v4.3 creates an 8-inch AudioTools-style page with five functional areas:

In Analyze Only mode the “Output” waveform is simply the original input, because no new Sound is created.

Outputs & reporting

ModeSelected object at end
Analyze OnlyOriginal input Sound
Apply Exact Gain<source>_ExactGain
Apply Safe Gain<source>_SafeGain
Normalize to Target<source>_Normalized

The Info window reports the source duration, sampling rate, channel count, absolute time domain, preset, target, ceiling, input true peak, Integrated LUFS, LRA, Max Short-Term, required gain, and available headroom. Processed modes add a post-processing re-measurement of LUFS, dBTP and LRA.

No export file is written automatically. The result remains a Praat Sound object at the source sample rate and with the source channel count preserved.

Limits & interpretation

Further Reading

The references below are the primary standards and technical documents directly relevant to the algorithms implemented by this tool.