Soundstage's audio audit (world tool, not shipped in the package): measures the finished
clips for what a listener would hear go wrong. Loudness is BS.1770 K-weighted (LUFS), the
ear's idea of level rather than RMS. A loop's wrap is checked for a dropout (a silent gap the
codec left), a click (a burst of high-frequency energy at the join), a level step, and a
rhythm stumble (the beat losing its period across the join). A sound's takes are checked for
near-duplicates (two takes that are really one recording) and for level spread.
load(path: string) → Audio
| arg | type | description |
|---|
| path | string | |
kCoeffs(sr: number) → void
K-weighting (BS.1770): a high shelf then a high pass, as biquad coefficients for `sr`.
| arg | type | description |
|---|
| sr | number | |
bins(a: Audio) → void
One pass over the clip in 10 ms bins: K-weighted power (channels summed) and plain mono power.
lufs(p: number) → number
| arg | type | description |
|---|
| p | number | |
loudness(kb: { number }) → any
integrated loudness (gated, 400 ms blocks, 75% overlap), short-term max (3 s) and
momentary max (400 ms) from 10 ms K-weighted bins
| arg | type | description |
|---|
| kb | { number } | |
win(s: number, n: number) → number
| arg | type | description |
|---|
| s | number | |
| n | number | |
r1(x: number) → number return math
| arg | type | description |
|---|
| x | number | |
r2(x: number) → number return math
| arg | type | description |
|---|
| x | number | |
sortedCopy(t: { number }) → void
| arg | type | description |
|---|
| t | { number } | |
pct(sorted: { number }, p: number) → number
| arg | type | description |
|---|
| sorted | { number } | |
| p | number | |
seam(a: Audio, eb: { number }) → any
what a loop does where it wraps (the clip's last frame running into its first)
| arg | type | description |
|---|
| a | Audio | |
| eb | { number } | |
at(f: number, c: number) → number
| arg | type | description |
|---|
| f | number | |
| c | number | |
d2(s: number) → number
| arg | type | description |
|---|
| s | number | |
rms(s: number, n: number) → number
level step across the join (250 ms either side) and 20 ms dropouts next to it
| arg | type | description |
|---|
| s | number | |
| n | number | |
fx(i: number) → number return flux
| arg | type | description |
|---|
| i | number | |
consistency(c: number) → number
| arg | type | description |
|---|
| c | number | |
loop(path: string) → any
Measure one looping clip: loudness and its wrap.
| arg | type | description |
|---|
| path | string | |
loopAudio(a: any) → any
Measure a loop held in memory ({ buf, frames, ch, sr }), e.g. before it is encoded.
wrapClick(a: any) → number
The wrap's click reading alone, for a loop held in memory: the second-difference energy
of the 2 ms on the join against the 99th percentile of the 2 ms windows over the second either
side. Under 1 the join does nothing the signal around it does not already do.
at(f: number, c: number) → number
| arg | type | description |
|---|
| f | number | |
| c | number | |
d2(st: number) → number
| arg | type | description |
|---|
| st | number | |
lufsAudio(a: any) → number
Integrated loudness (LUFS) of a buffer held in memory ({ buf, frames, ch, sr }).
loudness(path: string) → any
Integrated loudness (LUFS) of a clip, and its short-term and momentary maxima.
| arg | type | description |
|---|
| path | string | |
decimated(a: Audio, maxSec: number) → void
mono at ~3 kHz (box-averaged), for comparing takes
| arg | type | description |
|---|
| a | Audio | |
| maxSec | number | |
similarity(x: { number }, y: { number }) → number
best normalised cross-correlation of two takes within ±20 ms: 1 = the same recording
| arg | type | description |
|---|
| x | { number } | |
| y | { number } | |
oneShotLoudness(a: any) → number
Loudness of a short one-shot as the ear judges it: the loudest 200 ms of K-weighted power
(LUFS scale), counting silence past the end, so a 60 ms blip reads quieter than a held tone
of the same peak level.
takes(paths: { string }) → any
Measure a sound's takes: each take's length and loudness (momentary max, LUFS), the
spread between the loudest and quietest take, and the most alike pair (1 = identical).
| arg | type | description |
|---|
| paths | { string } | |