SlideShare a Scribd company logo
1 of 30
Download to read offline
Web Audio API
in 15 minutes
Ran Ben Aharon
Front End lead at Everything
MIND = BLOWN
Wait.. there’s <audio> already
Gaming features
Precise timing
Timing control
3D spatialization
Filters and effects
Precise timing
Timing control
Background music
Looping
Cross fading

Sounds effects
Recurring sounds
Real-time manipulation
3D spatialization
Doppler effect
Filters and room effects
Convolution demos
Musical webapps
Musical webapps
Drum machine
Karaoke player
Full blown mixer
Wave editor
Instrument simulations
Effects studio
Audio visualizations
Audio visualizations
Html5-demos
Ring visualizer
Three audio
Y u no show code?
Basics - nodes
Types
Source (file, oscillator, stream..)
Filters and effect (reverb, gain, convolver..)
Destination (audio output, speakers..)
Basics - routing


          Source   Destination
Basics - routing


          file.mp3   Speakers
Basics - routing


    Source   Effect   Effect   Destination
Basics - routing


    file.mp3   Volume   Reverb   Speakers
Basics - routing
Best way to demonstrate – Reactable!
You promised code!
Basic code
var context = new AudioContext();


function playSound(buffer) {
    var source = context.createBufferSource();
    source.buffer = buffer;


    source.connect(context.destination);


    source.noteOn(0);
}
Basic code
var context = new AudioContext();


function playSound(buffer) {
    var source = context.createBufferSource();
    source.buffer = buffer;


    var gainNode = context.createGainNode();
    gainNode.gain = 0.5;


    source.connect(gainNode);
    gainNode.connect(context.destination);


    source.noteOn(0);
}
Let’s do something cool
Demo
Hulk speech
http://ranbena.github.com/hulk-speech/
Ran Ben Aharon
Front End lead at Everything

ran@everything.me
         /ranbena
         /ranbena
WE’RE HIRING!
Front End ninjas plz

http://corp.everything.me/jobs

More Related Content

What's hot

Lua and adaptive audio - Don Veca (Activision)
Lua and adaptive audio - Don Veca (Activision)Lua and adaptive audio - Don Veca (Activision)
Lua and adaptive audio - Don Veca (Activision)Kore VM
 
Start sequence for gta v cut sequence annotation
Start sequence for gta v cut sequence annotationStart sequence for gta v cut sequence annotation
Start sequence for gta v cut sequence annotationMartinDevney
 
Android Audio & OpenSL
Android Audio & OpenSLAndroid Audio & OpenSL
Android Audio & OpenSLYoss Cohen
 
Gracenote API - MusicHackDay
Gracenote API - MusicHackDayGracenote API - MusicHackDay
Gracenote API - MusicHackDayOscar Celma
 
Assignment 40 music planning
Assignment 40 music planningAssignment 40 music planning
Assignment 40 music planningTwbsAsMediaGroup8
 
Gracenote API Walkthrough @ Music Hack Day SF &rsquo;13
Gracenote API Walkthrough @ Music Hack Day SF &rsquo;13Gracenote API Walkthrough @ Music Hack Day SF &rsquo;13
Gracenote API Walkthrough @ Music Hack Day SF &rsquo;13Ching-Wei Chen
 
Blind Test Rules Of The Game
Blind Test   Rules Of The GameBlind Test   Rules Of The Game
Blind Test Rules Of The Gamesdugot
 
How To Produce a Podcast (And Use it to Get More Clients)
How To Produce a Podcast (And Use it to Get More Clients)How To Produce a Podcast (And Use it to Get More Clients)
How To Produce a Podcast (And Use it to Get More Clients)BrightIdeas.co
 
Audio Mastering
Audio MasteringAudio Mastering
Audio MasteringJoe Nasr
 
Audio Mastering by Satriyo
Audio Mastering by SatriyoAudio Mastering by Satriyo
Audio Mastering by SatriyoAgate Studio
 
Deep dive into Android’s audio latency problem
Deep dive into Android’s audio latency problemDeep dive into Android’s audio latency problem
Deep dive into Android’s audio latency problemSirawat Pitaksarit
 
Converting Vinyl to Digital
Converting Vinyl to DigitalConverting Vinyl to Digital
Converting Vinyl to DigitalMacapple
 
Jaquire King and Dangerous Music
Jaquire King and Dangerous MusicJaquire King and Dangerous Music
Jaquire King and Dangerous MusicDangerousMusic
 
Chrome and Audio Output Devices
Chrome and Audio Output DevicesChrome and Audio Output Devices
Chrome and Audio Output DevicesTomoo Mizukami
 
Core audio
Core audioCore audio
Core audioscussen
 

What's hot (16)

Lua and adaptive audio - Don Veca (Activision)
Lua and adaptive audio - Don Veca (Activision)Lua and adaptive audio - Don Veca (Activision)
Lua and adaptive audio - Don Veca (Activision)
 
Start sequence for gta v cut sequence annotation
Start sequence for gta v cut sequence annotationStart sequence for gta v cut sequence annotation
Start sequence for gta v cut sequence annotation
 
Android Audio & OpenSL
Android Audio & OpenSLAndroid Audio & OpenSL
Android Audio & OpenSL
 
Gracenote API - MusicHackDay
Gracenote API - MusicHackDayGracenote API - MusicHackDay
Gracenote API - MusicHackDay
 
Assignment 40 music planning
Assignment 40 music planningAssignment 40 music planning
Assignment 40 music planning
 
Gracenote API Walkthrough @ Music Hack Day SF &rsquo;13
Gracenote API Walkthrough @ Music Hack Day SF &rsquo;13Gracenote API Walkthrough @ Music Hack Day SF &rsquo;13
Gracenote API Walkthrough @ Music Hack Day SF &rsquo;13
 
Blind Test Rules Of The Game
Blind Test   Rules Of The GameBlind Test   Rules Of The Game
Blind Test Rules Of The Game
 
How To Produce a Podcast (And Use it to Get More Clients)
How To Produce a Podcast (And Use it to Get More Clients)How To Produce a Podcast (And Use it to Get More Clients)
How To Produce a Podcast (And Use it to Get More Clients)
 
Audio Mastering
Audio MasteringAudio Mastering
Audio Mastering
 
Audio Mastering by Satriyo
Audio Mastering by SatriyoAudio Mastering by Satriyo
Audio Mastering by Satriyo
 
Deep dive into Android’s audio latency problem
Deep dive into Android’s audio latency problemDeep dive into Android’s audio latency problem
Deep dive into Android’s audio latency problem
 
Converting Vinyl to Digital
Converting Vinyl to DigitalConverting Vinyl to Digital
Converting Vinyl to Digital
 
Jaquire King and Dangerous Music
Jaquire King and Dangerous MusicJaquire King and Dangerous Music
Jaquire King and Dangerous Music
 
Making of Steve the Robot H.E.Ai.D.
Making of Steve the Robot H.E.Ai.D.Making of Steve the Robot H.E.Ai.D.
Making of Steve the Robot H.E.Ai.D.
 
Chrome and Audio Output Devices
Chrome and Audio Output DevicesChrome and Audio Output Devices
Chrome and Audio Output Devices
 
Core audio
Core audioCore audio
Core audio
 

Similar to Web Audio API in 15 min

Alpan Aytekin-Game Audio Essentials
Alpan Aytekin-Game Audio EssentialsAlpan Aytekin-Game Audio Essentials
Alpan Aytekin-Game Audio Essentialsgamedevelopersturkey
 
Joe Berkovitz - Dynamic Audio Synthesis on the Flash Flex Platform
Joe Berkovitz - Dynamic Audio Synthesis on the Flash Flex PlatformJoe Berkovitz - Dynamic Audio Synthesis on the Flash Flex Platform
Joe Berkovitz - Dynamic Audio Synthesis on the Flash Flex Platform360|Conferences
 
How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...
How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...
How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...DevGAMM Conference
 
JoeWangVisitingScholarProjectSummary
JoeWangVisitingScholarProjectSummaryJoeWangVisitingScholarProjectSummary
JoeWangVisitingScholarProjectSummaryJoe Wang
 
Next Gen: More Than Extra Channels?
Next Gen: More Than Extra Channels?Next Gen: More Than Extra Channels?
Next Gen: More Than Extra Channels?Slide_N
 
Audio Presntation Draft
Audio Presntation DraftAudio Presntation Draft
Audio Presntation DraftIbrahim Arab
 
KKBOX WWDC17 Airplay 2 - Dolphin
KKBOX WWDC17 Airplay 2 - DolphinKKBOX WWDC17 Airplay 2 - Dolphin
KKBOX WWDC17 Airplay 2 - DolphinLiyao Chen
 
Game Audio Post-Production
Game Audio Post-ProductionGame Audio Post-Production
Game Audio Post-ProductionKaren Collins
 
Effective HTML5 game audio
Effective HTML5 game audioEffective HTML5 game audio
Effective HTML5 game audioChris Khoo
 
Introducing the DSPGraph, the new audio rendering/mixing engine- Unite Copenh...
Introducing the DSPGraph, the new audio rendering/mixing engine- Unite Copenh...Introducing the DSPGraph, the new audio rendering/mixing engine- Unite Copenh...
Introducing the DSPGraph, the new audio rendering/mixing engine- Unite Copenh...Unity Technologies
 
Audio Production
Audio ProductionAudio Production
Audio Productionptcentrum
 
Audio on the web
Audio on the webAudio on the web
Audio on the webJoel May
 
Create fun & immersive audio experiences with web audio
Create fun & immersive audio experiences with web audioCreate fun & immersive audio experiences with web audio
Create fun & immersive audio experiences with web audiodavrous
 
"All you need is AI and music" by Keunwoo Choi
"All you need is AI and music" by Keunwoo Choi"All you need is AI and music" by Keunwoo Choi
"All you need is AI and music" by Keunwoo ChoiKeunwoo Choi
 
Video Game Music Overview
Video Game Music OverviewVideo Game Music Overview
Video Game Music OverviewKaren Collins
 
Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку" GameDe...
Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку"  GameDe...Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку"  GameDe...
Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку" GameDe...Lviv Startup Club
 

Similar to Web Audio API in 15 min (20)

Alpan Aytekin-Game Audio Essentials
Alpan Aytekin-Game Audio EssentialsAlpan Aytekin-Game Audio Essentials
Alpan Aytekin-Game Audio Essentials
 
Joe Berkovitz - Dynamic Audio Synthesis on the Flash Flex Platform
Joe Berkovitz - Dynamic Audio Synthesis on the Flash Flex PlatformJoe Berkovitz - Dynamic Audio Synthesis on the Flash Flex Platform
Joe Berkovitz - Dynamic Audio Synthesis on the Flash Flex Platform
 
How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...
How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...
How Audio Objects Improve Spatial Accuracy / Mads Maretty Sønderup (Audiokine...
 
JoeWangVisitingScholarProjectSummary
JoeWangVisitingScholarProjectSummaryJoeWangVisitingScholarProjectSummary
JoeWangVisitingScholarProjectSummary
 
Next Gen: More Than Extra Channels?
Next Gen: More Than Extra Channels?Next Gen: More Than Extra Channels?
Next Gen: More Than Extra Channels?
 
Audio Presntation Draft
Audio Presntation DraftAudio Presntation Draft
Audio Presntation Draft
 
DJ Workshop v.0.2b
DJ Workshop v.0.2bDJ Workshop v.0.2b
DJ Workshop v.0.2b
 
KKBOX WWDC17 Airplay 2 - Dolphin
KKBOX WWDC17 Airplay 2 - DolphinKKBOX WWDC17 Airplay 2 - Dolphin
KKBOX WWDC17 Airplay 2 - Dolphin
 
Audacity
AudacityAudacity
Audacity
 
Game Audio Post-Production
Game Audio Post-ProductionGame Audio Post-Production
Game Audio Post-Production
 
Effective HTML5 game audio
Effective HTML5 game audioEffective HTML5 game audio
Effective HTML5 game audio
 
Introducing the DSPGraph, the new audio rendering/mixing engine- Unite Copenh...
Introducing the DSPGraph, the new audio rendering/mixing engine- Unite Copenh...Introducing the DSPGraph, the new audio rendering/mixing engine- Unite Copenh...
Introducing the DSPGraph, the new audio rendering/mixing engine- Unite Copenh...
 
Audio Production
Audio ProductionAudio Production
Audio Production
 
Audio on the web
Audio on the webAudio on the web
Audio on the web
 
Create fun & immersive audio experiences with web audio
Create fun & immersive audio experiences with web audioCreate fun & immersive audio experiences with web audio
Create fun & immersive audio experiences with web audio
 
"All you need is AI and music" by Keunwoo Choi
"All you need is AI and music" by Keunwoo Choi"All you need is AI and music" by Keunwoo Choi
"All you need is AI and music" by Keunwoo Choi
 
Video Game Music Overview
Video Game Music OverviewVideo Game Music Overview
Video Game Music Overview
 
Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку" GameDe...
Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку"  GameDe...Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку"  GameDe...
Тарас Терлецький "Як організувати роботу з вашим дизайнером по звуку" GameDe...
 
Digital Sound
Digital Sound Digital Sound
Digital Sound
 
Time Based Effects
Time Based EffectsTime Based Effects
Time Based Effects
 

More from Ran Byron

CSS Selector Specificity
CSS Selector SpecificityCSS Selector Specificity
CSS Selector SpecificityRan Byron
 
Mobile Automators - Headlines Aug '15
Mobile Automators - Headlines Aug '15Mobile Automators - Headlines Aug '15
Mobile Automators - Headlines Aug '15Ran Byron
 
Magneto - Android Test Automation
Magneto - Android Test AutomationMagneto - Android Test Automation
Magneto - Android Test AutomationRan Byron
 
My 10 Mobile Automation Questions
My 10 Mobile Automation QuestionsMy 10 Mobile Automation Questions
My 10 Mobile Automation QuestionsRan Byron
 
Firefox OS Intro
Firefox OS IntroFirefox OS Intro
Firefox OS IntroRan Byron
 
DoAT - mobile web-app development
DoAT - mobile web-app developmentDoAT - mobile web-app development
DoAT - mobile web-app developmentRan Byron
 

More from Ran Byron (6)

CSS Selector Specificity
CSS Selector SpecificityCSS Selector Specificity
CSS Selector Specificity
 
Mobile Automators - Headlines Aug '15
Mobile Automators - Headlines Aug '15Mobile Automators - Headlines Aug '15
Mobile Automators - Headlines Aug '15
 
Magneto - Android Test Automation
Magneto - Android Test AutomationMagneto - Android Test Automation
Magneto - Android Test Automation
 
My 10 Mobile Automation Questions
My 10 Mobile Automation QuestionsMy 10 Mobile Automation Questions
My 10 Mobile Automation Questions
 
Firefox OS Intro
Firefox OS IntroFirefox OS Intro
Firefox OS Intro
 
DoAT - mobile web-app development
DoAT - mobile web-app developmentDoAT - mobile web-app development
DoAT - mobile web-app development
 

Web Audio API in 15 min