Created
December 20, 2016 14:16
-
-
Save thebeebs/ebbfb5e726e7c5392df994f98e3724a8 to your computer and use it in GitHub Desktop.
Web Audio Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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