npm install --save extra-audio
# or
yarn add extra-audiofunction getAllChannelData(buffer: AudioBuffer): Float32Array[]Get all channels at once,
because repeatedly executing AudioBuffer#getChannelData is expensive.
function encodeWAV(audioBuffer: AudioBuffer): ArrayBufferEncode AudioBuffer to WAV with PCM 32-bit float little endian.
function getFloatFrequencyData(input: Float32Array, output?: Float32Array): Float32ArrayFor optimization purposes, an output array can be passed in.
This function has a requirement for the size of the output,
which must be half the smallest power of 2 that greater than or equal to the size of input.
function timeStretch(input: Float32Array, output: Float32Array): Float32Arrayfunction granularTimeStretch(
input: Float32Array
, output: Float32Array
, grainSize?: number
, window?: WindowFunction
, overlapRatio?: number
): Float32Arrayfunction granularPitchShift(
input: Float32Array
, output: Float32Array
, pitchScale: number
, inputGrainSize?: number
, window?: WindowFunction
, overlapRatio?: number
): Float32Array