audio

@audio/spatial-delay1.0.1

Per-channel delay in ms/samples

Per-channel delay in ms/samples (FFmpeg adelay)

Status
calibrated
Updated
Family
spatial, 12 packages under it
Category
effects
Licence
MIT
Dependencies
none
Downloads
1,705 last month
Tests
66 in audiojs/spatial's CI, passed at 656b55c,
import delay from '@audio/spatial-delay'

Per-channel integer-sample delay, zero-filled at the head (or tail, for negative shifts) — the FFmpeg adelay filter. Modifies each channel in place via copyWithin.

delay(channels, { delays: [0, 15] })   // right channel delayed 15ms, both modified in place
Param Default
delays [] Per-channel delay, milliseconds
samples — Per-channel delay, samples — overrides delays when given
fs 44100 Sample rate

Use when: aligning channels for Haas/decorrelation effects, or as the delay primitive under spatial-surround's Ls/Rs decorrelation.


Part of @audio/spatial — the spatial family umbrella.

MIT © audiojs