WaveHeader
Just generates a WAVE-file header, with the specified length as argument.
var header = ;//write to a normal fs.createWriteStreammyFileStream; // 44100 khz * 8 seconds // using options (all available options listed)myOtherFileStream;
Use with tonegenerator:
Also check out the module for generating tones as raw PCM data, tonegenerator.
using the debug module
Waveheader uses the 'debug' module to clean the output a bit. If running your program from the command line, and you wanna see the size written to the header, do DEBUG=waveheader node yourprogram.js