Relocate the ~6k-file docs tree from the repo root into plugins/document-navigator/docs/ so the plugin is self-contained and portable. docs/superpowers/ (specs and plans) stays at the repo root. Moved via cp+rm rather than git mv because directory rename() fails with EPERM on this WSL /mnt DrvFs mount; git rename-detection pairs the identical-content files at commit time. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3.0 KiB
3.0 KiB
@suaveplan/audio-analysis-loudness - Universal ITU-R BS.1770-4 loudness analyser: K-weighting, gated integrated LUFS, momentary and short-term loudness, EBU R128 loudness range, 4x oversampled true-peak detection, RMS, sample peak, and per-channel DC offset. Streaming and block-level metering for broadcast compliance, mastering, and auto-normalisation pipelines.
Universal ITU-R BS.1770-4 loudness analyser. Drop-in AnalysisOp plugin for
the @suaveplan/audio-* family.
Documentation tree
- loudness-range —
loudness-rangecomputes the EBU Tech 3342 loudness range (LRA, in LU) — a statistical measure of dynamic spread. It t… - lufs —
lufscontains the kernel of BS.1770-4 loudness measurement: the per-block mean-square energy calculation, the BS.1770… - true-peak —
true-peakimplements true-peak (dBTP) detection via 4× polyphase oversampling, per ITU-R BS.1770-4 Annex 2. Sample pe… - error-codes — This module owns the stable, machine-readable error-code registry for
@suaveplan/audio-analysis-loudness. Every fault…- error-codes — This module owns the stable, machine-readable error-code registry for
@suaveplan/audio-analysis-loudness. Every fault…
- error-codes — This module owns the stable, machine-readable error-code registry for
- filters —
k-weightingimplements the ITU-R BS.1770 K-weighting filter — a two-stage IIR biquad cascade applied per channel befo…- k-weighting —
k-weightingimplements the ITU-R BS.1770 K-weighting filter — a two-stage IIR biquad cascade applied per channel befo…
- k-weighting —
- meter —
LoudnessMeteris the orchestration layer of@suaveplan/audio-analysis-loudness. It wires the K-weighting filter, th…- loudness-meter —
LoudnessMeteris the orchestration layer of@suaveplan/audio-analysis-loudness. It wires the K-weighting filter, th…
- loudness-meter —
Features
- Integrated LUFS via two-gate algorithm (absolute −70, relative −10 LU).
- Momentary (400 ms) and short-term (3 s) loudness.
- EBU Tech 3342 loudness range (LRA in LU).
- 4× oversampled true-peak detection (dBTP, per BS.1770-4 Annex 2).
- Sample peak (dB), RMS (dB), per-channel DC offset.
- Streaming
analyzeStreamwhose final yield equals batchanalyze. - Real-time
analyzeBlockfor live meters. - Finite silence floors — no
-Infinityever leaks to consumers. - OTel span
audio.analysis.loudness, counter, histograms. - Pure universal: no
window, nodocument, nonode:fs.
Install
bun add @suaveplan/audio-analysis-loudness
Quick start
import { LoudnessMeter } from "@suaveplan/audio-analysis-loudness";
const meter = new LoudnessMeter();
const result = await meter.analyze(doc);
console.log({
integrated: result.lufs,
range: result.loudnessRange,
truePeak: result.truePeak,
});
License
MIT