Per-channel waveform envelopes of stereo frames: channel 0 is the left, 1 the right, and a view asks each channel for the same number of buckets.
import { channelEnvelopes } from '@datamoc/mwg/audio';const [left] = channelEnvelopes(new Float32Array([1, -1]), new Float32Array([0.5, -0.5]), 1);console.log(left); // [{ min: -1, max: 1 }] Copy
import { channelEnvelopes } from '@datamoc/mwg/audio';const [left] = channelEnvelopes(new Float32Array([1, -1]), new Float32Array([0.5, -0.5]), 1);console.log(left); // [{ min: -1, max: 1 }]
Per-channel waveform envelopes of stereo frames: channel 0 is the left, 1 the right, and a view asks each channel for the same number of buckets.