audioJS

@audio/spatial-delay

Status calibrated

npm1.0.1licenseMIT

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

Overview

Install
Updated
Family
spatial, 12 packages under it
Tags
shape
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