A port of the sfxr sound effect synthesizer to pure Javascript, designed to be used in HTML5 games.
These examples should play a randomly generated sound.
var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioCtx = new AudioContext();
var sound = new sfxr.Sound();
sound.randomExplosion();
sound.play(sfxr.FREQ_44100, audioCtx);
More documentation will be available at the Project Wiki