SlideShare a Scribd company logo
Web Audio Made Easy
by /James Simpson @GoldFireStudios
Hi, I'm James
Web Audio Made Easy with Howler.js
Browser Audio is a Challenge
Fragmented support
Fragmented codec support
HTML5 Audio/Web Audio
Mobile works di erently
Auto-play policy di erences
Etc..
USING HTML5 AUDIO
 
/* create audio node */ 
const audio = new Audio(); 
audio.src = 'audio/sounds.mp3'; 
audio.volume = 1; 
 
/* play audio */ 
audio.play(); 
 
/** 
 * Several issues: 
 * 1. You have limited control. (play, pause, mute, seeking) 
 * 2. If you want cross­browser support, must load multiple files
 * 3. Not performant enough for SFX. 
 * 4. Still poor support on mobile (getting better). 
*/
USING WEB AUDIO API
 
// Create gain node. 
const ctx = new AudioContext(); 
const gainNode = ctx.createGain(); 
gainNode.gain.value = 1; 
loadBuffer('audio/sounds.mp3'); 
 
/** 
 * Load the audio data with XHR. 
 * @param  {String} url Source URL. 
 */ 
function loadBuffer(url) { 
  // Load the buffer from the URL. 
  const xhr = new XMLHttpRequest(); 
  xhr.open('GET', url, true); 
xhr responseType 'arraybuffer';
USING HOWLER.JS
 
// Setup sound sprite for SFX. 
const sound = new Howl({ 
  src: ['audio/sounds.webm', 'audio/sounds.mp3'], 
  sprite: { 
    jump: [0, 600], 
    move: [2000, 210], 
    lose: [4000, 3150], 
  } 
}); 
 
// Setup background audio. 
const theme = new Howl({ 
  src: ['audio/theme.webm', 'audio/theme.mp3'], 
  html5: true, 
loop: true
Audio library for the modern web.
howler.js makes working with audio in JavaScript easy
and reliable across all platforms.
Download v2.1.2 Docs
14,989 stars
Fresh & Lightweight
melonJS is an open source HTML5 game engine that empowers developers and designers to focus on content.
The framework provides a collection of composable entities and support for a number of third­party tools. Giving you a powerful
combination that can be used wholesale or piecemeal.
 Download   Read The Docs »
Try Me!

melonJS Home Download API Getting Started Blog Gallery Forum Contact Us Melon Gaming Language en
AudioVisualizer
C D E F G A B C B A G F E D C
Scales Intervals Keyboard Modes Play Audio Volume 2
Major Natural Minor Harmonic Minor Melodic Minor Blues Chromatic Whole Tone
C D E F#/Gb G#/Ab A#/Bb
C#/Db D#/Eb F G A B
With this AudioVisualizer you can see and hear scales, intervals, modes, and/or the notes you play on an on-screen keyboard.
For scales and modes, look for the different interval patterns (whole steps, half steps, etc.) that make up each one. Notice how
these interval patterns remain consistent when you transpose the scale or mode to a different root note. For intervals, notice
how easy it is to identify them and to differentiate between them.
Search      Contact      Blog      Mastodon     Facebook      Twitter     Top of Page
See also The Music Notation Project and TwinNote Music Notation.
Clairnote SN About Play Music Software Blog ?SN->DN
MORE
NEWNEW
SNOOPYTIZER!SNOOPYTIZER!
CREATE ACREATE A
CHARACTER!CHARACTER!
STARTFRESHOREDITTHISCHARACTER!STARTFRESHOREDITTHISCHARACTER!
NEW   EDIT
CREATED
2 YEARS AGO
MENUMENU
12 fps
This website uses cookies to ensure
you get the best experience on our
website More info
Got it!
More .io Games Login
Exocraft.ioExocraft.io
Design unique ships and grow the ultimate space mining fleet as you battle forDesign unique ships and grow the ultimate space mining fleet as you battle for
resources and glory in this massively multiplayer action strategy set in an alienresources and glory in this massively multiplayer action strategy set in an alien
wasteland.wasteland.
Play Exocraft.io
LIVE CODE TIME!
HOWLER.JS FUTURE
Web Audio is a powerful audio engine
Howler.js 2.0 introduced plugins
Plugin support can be bigger and better
MORE PLUGINS
More advanced spatial audio
Filters
E ects
Audio generation
Advanced cross-fading
Visualizations
More...
THANK YOU!
@GoldFireStudios @gold re

More Related Content

PPTX
PPTX
Attachment (1)
PPTX
Playing music and sound effects in a windows 8 metro style app using html5 an...
PDF
Video & podcasting slideshow
PPTX
How to play dvd on xbox one s
PDF
Ben Armstrong, BlueStacks
PPTX
Learning Kodu: Basic Video Game Design for Kids
PPTX
Penawaran Laptop
Attachment (1)
Playing music and sound effects in a windows 8 metro style app using html5 an...
Video & podcasting slideshow
How to play dvd on xbox one s
Ben Armstrong, BlueStacks
Learning Kodu: Basic Video Game Design for Kids
Penawaran Laptop

What's hot (12)

PDF
Slide w12
PPT
Console development
PDF
hoseok valve
PPTX
Au ggj intro2017_no_theme
PPTX
Evolution of Playstation
PPTX
Bushido bots
PPTX
Bushido bots
PPTX
The enforcer console presentation cameron bailey
PPTX
Importing Files Into Adobe Audition
PDF
Create a Romantic Audio for Valentine's Day
PPTX
Sony’s play station®
PPTX
Adobe Audition Interface
Slide w12
Console development
hoseok valve
Au ggj intro2017_no_theme
Evolution of Playstation
Bushido bots
Bushido bots
The enforcer console presentation cameron bailey
Importing Files Into Adobe Audition
Create a Romantic Audio for Valentine's Day
Sony’s play station®
Adobe Audition Interface
Ad

Similar to Web Audio Made Easy with Howler.js (20)

PDF
XNA L06–Input, Audio and Video Playback
PPTX
Developing with Windows Live Spaces
PDF
제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs
PDF
StolzeEthan_MediaTreatmentPart1.pdf
PDF
iOS Media APIs (MobiDevDay Detroit, May 2013)
PPT
Jsconf 2011-us
PDF
How to Create Funny Audio Story
PPT
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller
PDF
Return of the Command Line: New Text Interfaces
PDF
How to build desktop apps that help your web app succeed
PDF
TASBot - the perfectionist
PDF
Lily and the Monome
PPT
Flash 101
PDF
Jory Prum's Lollipop Audio - Investment Pitch Deck
PDF
Lollipop Audio - Investment Pitch Deck
PPT
Digital Media Presentation
PDF
Web DU Mobile Meow
PPTX
Supersize your production pipe enjmin 2013 v1.1 hd
PDF
JS Days Mobile Meow
PPTX
Playing Video with ExoPlayer : Android Bangkok 2018
XNA L06–Input, Audio and Video Playback
Developing with Windows Live Spaces
제 5회 DGMIT R&D 컨퍼런스: Sound Module With OperSLEs
StolzeEthan_MediaTreatmentPart1.pdf
iOS Media APIs (MobiDevDay Detroit, May 2013)
Jsconf 2011-us
How to Create Funny Audio Story
"Probably, Maybe, No: The State of HTML5 Audio" - Scott Schiller
Return of the Command Line: New Text Interfaces
How to build desktop apps that help your web app succeed
TASBot - the perfectionist
Lily and the Monome
Flash 101
Jory Prum's Lollipop Audio - Investment Pitch Deck
Lollipop Audio - Investment Pitch Deck
Digital Media Presentation
Web DU Mobile Meow
Supersize your production pipe enjmin 2013 v1.1 hd
JS Days Mobile Meow
Playing Video with ExoPlayer : Android Bangkok 2018
Ad

Recently uploaded (20)

PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Cloud computing and distributed systems.
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Understanding_Digital_Forensics_Presentation.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPT
Teaching material agriculture food technology
PDF
Approach and Philosophy of On baking technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Network Security Unit 5.pdf for BCA BBA.
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Empathic Computing: Creating Shared Understanding
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
20250228 LYD VKU AI Blended-Learning.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Cloud computing and distributed systems.
Unlocking AI with Model Context Protocol (MCP)
Understanding_Digital_Forensics_Presentation.pptx
The AUB Centre for AI in Media Proposal.docx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Teaching material agriculture food technology
Approach and Philosophy of On baking technology
Dropbox Q2 2025 Financial Results & Investor Presentation
NewMind AI Monthly Chronicles - July 2025
Chapter 3 Spatial Domain Image Processing.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...

Web Audio Made Easy with Howler.js