pull-audio-generator
Generate audio as a pull-stream source
Creates AudioBuffer
s using a function that returns samples between -1..1
. Also takes options to configure the stream and generated audio.
Install
npm install --save pull-audio-generator
yarn add pull-audio-generator
Usage
generator(fn, options?)
A pull-stream source that produces AudioBuffer
s from fn
and options
. All options are inherited from audio-generator
's options.
The fn
takes fn(time)
and returns -1..1
for all channels or [-1..1, -1..1, ...]
for each channel.
Also see
audiojs
for all the audio componentspull-stream
for minimal streamsaudio-generator
for pure function of this module