The Web Audio API

Make 

Sound

const context = new AudioContext(); 
const volume = context.createGain();

//lower the output volume cause loud
volume.gain.value = 0.5; 

//connect volume to the audio destination, which will eventually be your computer speakers
volume.connect(context.destination);


Up & Running

Why Should I Care? 

Sounds enhance our user experience with silent technologies

 

Excellent Demos and Documentation 

 

Loop Drop 

Very cool digital audio workstation run from an Electron shell and written entirely in Javascript. 

https://github.com/mmckegg/loop-drop-app

Ambient Drone

For very chilling 

http://matt-diamond.com/drone.html

Plink

game meets composition (addictive)

http://dinahmoelabs.com/plink

Motion Detection Xylophone

Play a xylophone in your browser window using your webcam

http://www.soundstep.com/blog/experiments/jsdetection/

Web Audio API Docs at MDN

excellent documentation on the whole shebang

https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API

Web Audio API

By Jared Fowler

Web Audio API

Slides for Tech Talk on Web Audio API, Feb 9, 2016

  • 159