Skip to content

Instantly share code, notes, and snippets.

@kylebragger
Created October 16, 2012 02:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylebragger/3896980 to your computer and use it in GitHub Desktop.
Save kylebragger/3896980 to your computer and use it in GitHub Desktop.
var context = new webkitAudioContext(),
oscillator = context.createOscillator();
oscillator.type = oscillator.SQUARE;
oscillator.frequency.value = 1000;
oscillator.connect(context.destination);
oscillator.noteOn && oscillator.noteOn(0);
setTimeout('oscillator.disconnect()', 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment