This demonstrates the least amount of code required to make a sound with Web Audio API. More info here: http://webaudioapi.tumblr.com/post/89473171903/single-line-of-javascript-for-web-audio
A Pen by David Sabine on CodePen.
<html><head><title>Simple Sound With Web Audio API</title></head><body> | |
<h1>Hello world!</h1><p>If your web browser supports Web Audio API and if your speakers are turned up, you should be hearing a beautiful sine wave at 440 hertz. You can tune the "A" string of your guitar to this tone.</p> | |
</body></html> |
var c = new AudioContext();var o = c.createOscillator();o.connect(c.destination);o.start(); |
This demonstrates the least amount of code required to make a sound with Web Audio API. More info here: http://webaudioapi.tumblr.com/post/89473171903/single-line-of-javascript-for-web-audio
A Pen by David Sabine on CodePen.