@audio/measure 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +30 -4
  2. package/package.json +5 -1
package/README.md CHANGED
@@ -1,11 +1,37 @@
1
1
  # @audio/measure
2
2
 
3
- > Practical recording measurement — capture what your room/gear actually does. All planned.
3
+ > Practical recording measurement — capture what your room/gear actually does.
4
4
 
5
5
  | Package | What |
6
6
  |---|---|
7
7
  | `@audio/measure-ir` | ESS sweep → impulse response (Farina 2000) — feeds `reverb-convolution` + `amp-cabinet` |
8
- | `@audio/measure-response` | frequency response of a device/chain |
9
- | `@audio/measure-latency` | loopback round-trip latency |
8
+ | `@audio/measure-latency` | loopback round-trip latency, sample-exact via FFT cross-correlation |
9
+ | `@audio/measure-align` | multi-mic delay + polarity alignment, optional correction apply |
10
+ | `@audio/measure-response` | frequency response of a device/chain from its impulse response |
11
+ | `@audio/quality` | objective SNR/LSD/spectral-similarity metrics vs. a reference signal |
10
12
 
11
- Sweep generation = `@audio/synth-chirp`; deconvolution = inverse-sweep convolution (`eq-fir`/FFT machinery exists). The practical-VST/recording surface: measure once, convolve forever.
13
+ ```js
14
+ import { ir, latency, align, response, snr, lsd } from '@audio/measure'
15
+ import chirp from '@audio/synth-chirp'
16
+
17
+ let sweep = chirp({ f0: 20, f1: 20000, duration: 1.5, fs })
18
+ let h = ir(recorded, { sweep, f0: 20, f1: 20000, fs, length: 1000 }) // impulse response
19
+ let { freqs, db } = response(h, { fs, n: 8192 }) // frequency response
20
+
21
+ let lat = latency(recorded, reference, { fs }) // { samples, seconds, confidence }
22
+ let al = align(a, b, { fs, apply: true }) // { delay, seconds, polarity, aligned? }
23
+
24
+ snr(clean, processed) // dB; lsd(a, b) — log-spectral distance, dB
25
+ ```
26
+
27
+ `ir(recorded, {sweep, f0=20, f1, fs=44100, length}) → Float32Array` — Farina exponential-sine-sweep deconvolution: inverse filter = time-reversed sweep with exp(−t/L) compensation, distortion products land at negative time and are trimmed. Self-deconvolution calibrated so an identity system yields δ = 1.0.
28
+
29
+ `latency(recorded, reference, {fs=44100}) → {samples, seconds, confidence}` — FFT cross-correlation peak.
30
+
31
+ `align(a, b, {fs=44100, apply=false}) → {delay, seconds, polarity: 1|-1, aligned?}` — signed cross-correlation peak gives delay + polarity of `b` relative to `a`; `apply: true` shifts/flips `b`.
32
+
33
+ `response(ir, {fs=44100, n=8192}) → {freqs, db}` — zero-padded FFT magnitude.
34
+
35
+ `@audio/quality` exports `snr`, `segSnr`, `lsd`, `spectralSim`, `nrr`, `speechAttenuation`, `goertzelEnergy`, `chordBalance`, `chordRetention`, `modulationDepth` — reference-vs-output metrics for evaluating denoisers, stretchers, codecs, resamplers (see `packages/quality/README.md`). The Goertzel-family functions (`goertzelEnergy` etc.) take a positional sample rate.
36
+
37
+ Sweep generation = `@audio/synth-chirp`; deconvolution = inverse-sweep convolution via `fourier-transform` FFT. The practical-VST/recording surface: measure once, convolve forever.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audio/measure",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "Acoustic & system measurement — umbrella for @audio/measure-* atoms (IR capture, response, latency)",
@@ -45,5 +45,9 @@
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
48
+ },
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "git+https://github.com/audiojs/measure.git"
48
52
  }
49
53
  }