JavaScript Web Audio API Simplified

Post all your tuts or request for tuts here.
Post Reply
User avatar
Verahta
Posts: 441
Joined: Wed Aug 24, 2011 1:50 am

JavaScript Web Audio API Simplified

Post by Verahta »

Live demo: http://envato.retromodular.com/game-audio-simplified/

http://gamedevelopment.tutsplus.com/tut ... -cms-19731
The Web Audio API is a powerful ally for anyone creating JavaScript games, but with that power comes complexity. Web Audio is a modular system; audio nodes can be connected together to form complex graphs to handle everything from the playback of a single sound through to a fully featured music sequencing application. This is impressive, to say the least.

However, when it comes to programming games most developers want a basic API that simply loads and plays sounds, and provides options for changing the volume, pitch, and pan (stereo position) of those sounds. This tutorial provides an elegant solution by wrapping the Web Audio API in a fast, lightweight Sound class that handles everything for you.

Note: This tutorial is primarily aimed at JavaScript programmers, but the techniques used to mix and manipulate audio in the code can be applied to almost any programming environment that provides access to a low-level sound API.
"In order to understand recursion, one must first understand recursion".
Post Reply

Return to “Tutorials”