Agenda
What is the Web Audio API?
Some examples
Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).
What is the Web Audio API?
A high-level JavaScript API for processing and synthesizing audio in web applications.
Includes capabilities found in modern game audio engines
Includes some of the mixing, processing, and filtering tasks that are found in modern desktop audio production applications.
API is being developed under the auspices of the World Wide Web Consortium
HTML Rocks has a good overview article
Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).
Where can the API be used?
Web Audio API support is included in most modern browsers (Chrome, Firefox, etc.)
Javascript is used to call API functions
Embedded script within a web page
Javascript included via HTML script tag
Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).
How does the API work?
An AudioContext is the 'platform' or 'canvas' for creating Web Audio elements
Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).
How does the API work?
Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).
Frameworks
var osc;
var oscType = 'sine';
var volume;
var frequency = 600;
volume = tsw.gain(0.5);
function turn_on() {
osc = tsw.oscillator (frequency, oscType);
tsw.connect(osc, volume, tsw.speakers);
osc.start();
};
function turn_off() {
osc.stop();
};
Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).
Examples
Press Play to hear how the pitch sounds Play
Change the pitch
Press Stop to turn it off. Stop
Play a chord Play
Stop the chord Stop
Play a scale Play
Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).
More Example Applications
Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).
The End
Thanks for listening!