Skip to content

Instantly share code, notes, and snippets.

@kubosho
Created March 13, 2017 01:58
Show Gist options
  • Save kubosho/6328af3e4b276076978df72bbf74e2c8 to your computer and use it in GitHub Desktop.
Save kubosho/6328af3e4b276076978df72bbf74e2c8 to your computer and use it in GitHub Desktop.
var context = new AudioContext();
var sound = context.createOscillator();
var gain = context.createGain();
sound.frequency.value = 528;
gain.gain.value = 0.25;
sound.connect(gain);
gain.connect(context.destination);
sound.start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment