Shipping an unreleased album master, podcast episode, or studio voice-over bank without auditing Integrated LUFS and 4x oversampled True Peak (dBTP) leads to silent loudness penalties or inter-sample distortion after AAC/Opus transcoding. Traditional web loudness meters either require server uploads (with daily file limits or 50 MB caps) or paywall dBTP True Peak and LRA Loudness Range behind paid tiers, while single-track web analyzers skip multi-file game audio and broadcast normalization.

We built a 100% browser-local loudness meter, 6-platform compliance matrix, and linear target-LUFS WAV normalizer in pure ESM JavaScript operating directly on PCM Float32Array buffers with zero server uploads:

1. 2026 Platform Loudness & True Peak Matrix

Every distribution channel treats loudness offsets differently depending on whether playback scaling is bidirectional, downward-only, or governed by broadcast/console compliance specs:

Platform / Standard Target LUFS / LKFS Max True Peak Tolerance / Policy Normalization Behavior
Spotify -14.0 LUFS -1.0 dBTP (-2.0 dBTP above -14) +/- 1.0 LU Normalizes up and down within available headroom
YouTube / YT Music -14.0 LUFS -1.0 dBTP +/- 1.0 LU Downward-only (turns down hot uploads, never boosts quiet ones)
Apple Music -16.0 LUFS -1.0 dBTP +/- 1.0 LU Sound Check normalizes playback around -16.0 LUFS
Podcast (Apple / AES) -16.0 LUFS (-18.0 AES) -1.0 dBTP +/- 1.0 LU Keeps spoken episodes consistent across earbuds and mobile speakers
EBU R128 Broadcast -23.0 LUFS -1.0 dBTP +/- 0.5 LU Broadcast compliance target (EBU Tech 3341 & 3342 LRA)
Game Audio (Sony ASWG-R001) -24.0 LKFS -1.0 dBTP +/- 2.0 LU Home console dialogue/gameplay anchor (-18 LKFS handheld)

For indie and AA game studios converting FMOD .fsb, Wwise .wem/.bnk, Nintendo .bfstm, or CRIWARE .hca banks via Apps66 Game Audio Converter, verifying decoded dialogue WAVs against -24.0 LKFS +/- 2.0 LU prevents localization lines from dropping out under combat mixes.

2. ITU-R BS.1770-4 K-Weighting, Gating & 4x True Peak in Pure ESM JS

Accurate loudness measurement runs a deterministic DSP pipeline rather than unweighted RMS averages:

  1. Two-Stage K-Weighting via Bilinear Transform: Stage 1 models acoustic head diffraction as a +4.00 dB high-shelf filter (f0 = 1681.97 Hz, Q = 0.70718), and Stage 2 applies a 38.14 Hz RLB high-pass (Q = 0.50033). Computing biquad coefficients analytically supports 44.1, 48, and 96 kHz while matching ITU-R BS.1770-4 Annex 1 coefficients at 48 kHz within ~1e-14.
  2. Channel Power Weighting & Dual Gating: 5.1 surround layouts assign 1.0 to L/R/C, +1.5 dB (1.4125) to Ls/Rs, and 0.0 to LFE. 400ms blocks (100ms hop, 75% overlap) pass a -70.0 LKFS absolute gate and a -10.0 LU relative gate before computing -0.691 + 10 * log10(power). Short game SFX under 400ms use an explicit full-buffer fallback (shortAudioFallback: true).
  3. EBU Tech 3342 LRA: 3.0-second Short-Term blocks gated at -70.0 LUFS absolute and -20.0 LU relative compute the P95 - P10 dynamic spread in LU.
  4. 4x Kaiser-Windowed Sinc True Peak (dBTP): A standard sample-peak meter misses inter-sample peaks. A phase-shifted Fs/4 test tone ([+1, +1, -1, -1]) reads 0.0 dBFS sample peak while peaking at +3.0103 dBTP (sqrt(2)) between samples, causing clipping inside DAC filters and AAC/Opus encoders. A 4-phase Kaiser-windowed sinc polyphase FIR (12 taps/phase, beta = 6.0) interpolates +0.25, +0.50, and +0.75 fractional offsets inline without allocating a 4x output buffer.
import fs from 'node:fs'; import { decodeWav, measureLoudness, normalizeAndEncodeWav, auditToMarkdown, auditToCsv, } from 'audio-loudness-lufs-core'; const { channels, sampleRate } = decodeWav(fs.readFileSync('voice_line.wav')); // 1. Measure ITU-R BS.1770-4 LUFS, EBU Tech 3342 LRA & 4x True Peak (dBTP) const audit = measureLoudness(channels, { sampleRate, filename: 'voice_line.wav', }); console.log({ integratedLufs: audit.integratedLufs, lra: audit.lra, samplePeakDbfs: audit.samplePeakDbfs, truePeakDbtp: audit.truePeakDbtp, spotifyDeltaDb: audit.platforms.find((p) => p.platformId === 'spotify')?.estimatedNormalizationGainDb, }); // 2. Linear target normalization with True-Peak headroom guard (-24 LUFS / -1.0 dBTP) const normalized = normalizeAndEncodeWav(channels, sampleRate, { targetLufs: -24.0, ceilingDbtp: -1.0, format: 'pcm16', }); fs.writeFileSync('voice_line.aswg.wav', normalized.wavBytes); // 3. Export Markdown-escaped or formula-safe RFC 4180 CSV reports console.log(auditToMarkdown([audit])); fs.writeFileSync('mastering-audit.csv', auditToCsv([audit])); 

You can also measure or normalize WAV batches straight from the terminal with the zero-dependency CLI:

npx audio-loudness-lufs measure master.wav dialogue.wav --json npx audio-loudness-lufs measure *.wav --csv > loudness-audit.csv npx audio-loudness-lufs normalize dialogue.wav dialogue.aswg.wav --target -24 --tp -1.0 --float32 

3. Headroom-Safe Linear Normalization & Formula-Safe Audits

Boosting a dynamic -22 LUFS recording toward -14 LUFS (+8 dB) can push transient peaks past -1.0 dBTP. normalizeChannelsToTarget() enforces maxSafeGainDb = ceilingDbtp - currentTruePeakDbtp, setting headroomLimited: true and clamping gain rather than hard-clipping samples.

On the reporting side, untrusted track filenames containing =, +, -, @, \t, or \r are neutralized with a leading single quote inside auditToCsv() to prevent spreadsheet formula injection, while auditToMarkdown() escapes |, \, [, ], !, backticks, and line breaks cleanly.

Try the Workbench or Clone the MIT Core