Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WebAudio
Search
Tiffany Conroy
October 01, 2012
Programming
1
170
WebAudio
GET EXCITED AND PLAY!!
Tiffany Conroy
October 01, 2012
Tweet
Share
More Decks by Tiffany Conroy
See All by Tiffany Conroy
Beautiful Authentication: Tear down the barbed wire
theophani
3
830
Lions and tigers and handling user capabilities
theophani
1
670
What about the CSSOM?
theophani
3
490
Cutting the fat
theophani
4
600
When to use Ajax and when to reload
theophani
6
1.8k
Version Control All The Codes
theophani
12
1.2k
Design Processes, Not Interfaces
theophani
5
1.8k
Other Decks in Programming
See All in Programming
Productivity is Messing Around and Having Fun
hollycummins
0
160
PHPUnit 高速化テクニック / PHPUnit Speedup Techniques
pinkumohikan
1
1.3k
Day0 初心者向けワークショップ実践!ソフトウェアテストの第一歩
satohiroyuki
0
500
Agentic Applications with Symfony
el_stoffel
1
160
海外のアプリで見かけたかっこいいTransitionを真似てみる
shogotakasaki
1
140
Develop Faster With FrankenPHP
dunglas
2
2.9k
MCP世界への招待: AIエンジニアが創る次世代エージェント連携の世界
gunta
4
820
The Weight of Data: Rethinking Cloud-Native Systems for the Age of AI
hollycummins
0
210
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
590
Devinのメモリ活用の学びを自社サービスにどう組み込むか?
itarutomy
0
1.9k
爆速スッキリ! Rspack 移行の成果と道のり - Muddy Web #11
dora1998
1
170
令和トラベルにおけるコンテンツ生成AIアプリケーション開発の実践
ippo012
1
270
Featured
See All Featured
A better future with KSS
kneath
239
17k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
17
1.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.4k
Six Lessons from altMBA
skipperchong
27
3.7k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7.1k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Building an army of robots
kneath
304
45k
Writing Fast Ruby
sferik
628
61k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.6k
Transcript
WEBAUDIO
WebAudio != <audio … >
// create new <audio> var audioElement = new Audio();
// create new WebAudio Context var context = new audioContext();
// create new WebAudio Context var context = new webkitAudioContext();
WICKED WEBAUDIO DEMOS http://chromium.googlecode.com/svn/trunk/samples/audio/samples.html
PLAY
audioElement.src = path // check/wait until you can play audioElement.play();
var source = context.createBufferSource(); source.buffer = buffer; source.connect(context.destination); source.noteOn(at); //
PLAY
var source = context.createBufferSource(); source.buffer = buffer; source.connect(context.destination); source.noteOn(at); //
PLAY
var source = context.createBufferSource(); source.buffer = buffer; source.connect(context.destination); source.noteOn(at); //
PLAY
$.ajax({ url: "/path/to/my/sound/file", success: decodeAudioData, requestType: "arraybuffer" });
$.ajax({ url: "/path/to/my/sound/file", success: decodeAudioData, requestType: "arraybuffer" }); NOPE
var request = new XMLHttpRequest(); request.open("GET", "/path/to/sound"); request.responseType = "arraybuffer";
request.onload = decodeAudioData; request.send();
var request = new XMLHttpRequest(); request.open("GET", "/path/to/sound"); request.responseType = "arraybuffer";
request.onload = decodeAudioData; request.send();
var decodeAudioData = function() { context.decodeAudioData( request.response, decodeSuccess); };
var decodeSuccess = function(buffer) { doSomething(buffer); };
var decodeSuccess = function(buffer) { doSomething(buffer); };
var decodeSuccess = function(buffer) { doSomething(buffer); };
I MADE SOME FUNCTIONS github.com/theophani/load-sounds
var loadSound = function(path, callback) { // load the sound
sorta like I showed before };
var loadSounds = function(paths, callback) { // load a bunch
of sounds };
var playSound = function(buffer) { // stuff with source and
context };
Tiffany Conroy github.com/theophani/load-sounds @theophani