Sound interacts with surrounding space 3d space environment Environments perceived through sound human perception One of the key ways we perceive our surroundings Janet Cardiff The Forty Part Motet [1]
compatibility features • audio signals processing for your browser • easy to create, process, and control audio within web applications • complements webgl • chrome 10.0-24.0 • safari 6.0 • safari ios 6.0 • firefox NOOOOPE (BUT PLANNED) • AUDIO DATA API summary
summary audio DESTINATION gain (volume) audio source convolver filter(s) audio source if ('AudioContext' in window) { context = new AudioContext(); } else if ('webkitAudioContext' in window) { context = new webkitAudioContext(); } else { throw new Error('AudioContext not supported!'); }
raw audio data into the system • final node to connect to • outputs to lineout • speakers/headphones AUDIO SOURCE AUDIO DESTINATION var request = new XMLHttpRequest(); request.open("GET", options.path, true); request.responseType = "arraybuffer"; request.onload = function() { createSoundSource(request.response); }; request.send(); soundSource.connect(context.destination); function createSoundSource(audioData) { soundSource = context.createBufferSource(); soundSource.buffer = context.createBuffer(audioData, false); soundSource.loop = true; }; summary
scriptprocessornode • synthesize and process audio directly with javascript • custom DSP effects • exposing internals of dsp to web applications nodes2note. fancypants js JS http://www.w3.org/TR/webaudio/
• distance effects • sounds softer farther away • orientation • what direction are you facing • channels • adjust volume to l & R outputs • mimick human perception of space [1] summary
• VISUAL INTERFACE & TOOLS TO BUILD AUDIO ROUTING GRAPHS • INTERFACING WITH WEBGL explore full 3d orientation & positioning • INVESTIGATION OF AUDIO DATA API closer to the actual dsp implementations • WEB AUDIO API ON IOS6 SAFARI different ui, applications, and event handling resources. • rtfm http://www.w3.org/TR/webaudio/ • safari developer library http://bit.ly/RcVHxY • DAFX (ref [1]) • JOHN WILEY & SONS • MAR 8, 2011 • impulse responses http://fokkie.home.xs4all.nl/IR.htm