Skip to content

Instantly share code, notes, and snippets.

@bradparker
Created September 21, 2014 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradparker/1c5a06dfe12bd2a4f726 to your computer and use it in GitHub Desktop.
Save bradparker/1c5a06dfe12bd2a4f726 to your computer and use it in GitHub Desktop.
Tuning Fork
var context = new AudioContext(),
gainNode = context.createGain(),
oscillator = context.createOscillator();
gainNode.connect(context.destination);
oscillator.frequency.value = 440;
oscillator.connect(gainNode);
oscillator.start();
// ..
// gainNode.gain.value = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment