Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@thebeebs
Created December 20, 2016 14:16
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 thebeebs/ebbfb5e726e7c5392df994f98e3724a8 to your computer and use it in GitHub Desktop.
Save thebeebs/ebbfb5e726e7c5392df994f98e3724a8 to your computer and use it in GitHub Desktop.
Web Audio Example
var context= new (window.AudioContext || window.webkitAudioContext)();
var oscillator = context.createOscillator();
oscillator.frequency.value = 5000;
oscillator.start();
oscillator.connect(context.destination);
// Only be heard by those under 40
// oscillator.frequency.value = 15000;
// Only be heard by those under 18
//oscillator.frequency.value = 17500;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment