@audio/spatial-midside
v1.1.3
Published
Mid/side encode-decode — L/R ↔ M/S matrix with width control
Readme
@audio/spatial-midside

Mid/side encode-decode — L/R ↔ M/S matrix with width control
npm install @audio/spatial-midsideimport { encode, decode } from '@audio/spatial-midside'The L/R ↔ M/S matrix: mid = (L+R)/2, side = (L-R)/2, and back. The substrate under spatial-widener, @audio/vocals isolate/remove, and any M/S-domain processing. Both directions modify their input pair in place.
encode([L, R]) // → [M, S], in place
decode([M, S], { width: 1.5 }) // → [L, R], in place; width scales side before recombining| Export | Signature | |
|---|---|---|
| encode | ([left, right]) => [mid, side] | in-place, mid=(L+R)/2, side=(L-R)/2 |
| decode | ([mid, side], { width=1 }) => [left, right] | in-place, left=mid+side·width, right=mid-side·width |
Use when: any effect that operates on mid/side rather than left/right — width control, vocal isolation, M/S EQ.
Part of @audio/spatial — the spatial family umbrella.
MIT © audiojs
