Records what flows through some nodes of a WebAudio graph as plain stereo frames, ready for
AudioExport: the nodes are tapped (they keep playing to wherever they already went), a script
processor collects their blocks, and stop hands back the take. The processor is the one capture
node that exists everywhere, file:// pages included; it is silent, writing nothing of its own to
the speakers. The take is bounded by maxSeconds, so memory cannot grow without limit.
constrecorder = newOutputRecorder(context, [master], { maxSeconds:30 }); // ... the player plays for a while ... consttake = recorder.stop(); constwav = awaitnewAudioExport().export(take, { format:'wav' }); console.log(take.truncated, wav.byteLength);
Records what flows through some nodes of a WebAudio graph as plain stereo frames, ready for
AudioExport: the nodes are tapped (they keep playing to wherever they already went), a script processor collects their blocks, andstophands back the take. The processor is the one capture node that exists everywhere,file://pages included; it is silent, writing nothing of its own to the speakers. The take is bounded bymaxSeconds, so memory cannot grow without limit.Example