Skip to content

Instantly share code, notes, and snippets.

@bradparker
Created September 21, 2014 04:59
Show Gist options
  • 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