audioJS

@audio/spatial-channelsplit

Status calibrated

npm1.0.1licenseMIT

Channel split/combine — multichannel ↔ mono planes (FFmpeg channelsplit)

Overview

Install
Updated
Family
spatial, 12 packages under it
Tags
shape
import { split, combine } from '@audio/spatial-channelsplit'

Converts between a multichannel buffer and its per-channel mono planes — the FFmpeg channelsplit/amerge pair. split copies each channel into a fresh Float32Array; combine is the identity (the array of planes already is the channel layout other spatial atoms expect).

let planes = split(channels)   // Float32Array[] → Float32Array[] (copies)
let channels2 = combine(planes) // Float32Array[] → Float32Array[] (identity)
Export Signature
split (channels) => Float32Array[] copies each plane
combine (planes) => Float32Array[] identity — planes already are the channel array

Use when: normalizing a channel-layout boundary between atoms that read planes directly (spatial-panner, spatial-midside) and ones that read a Float32Array[] (spatial-delay, spatial-surround).


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

MIT © audiojs