Sound for games
"Sound for Games" is micro-library to load, play and generate sound effects and music for games and interactive applications.
At it's heart it's composed of
just two, short, independent functions. The makeSound function helps you
load and play sound files (mp3, wav, ogg, and webm). The soundEffect
function helps you generate a wide range of sound and music effects.
These two functions are completely modular free of dependencies, so
you can
copy and paste whichever parts of them you need into your own
projects. If you need it, there's also a sounds object with a helpful
load method that makes it convenient to load and access sound files.
You'll find all the code in the sound.js file. Take a look at the
index.html file for a working example of all the features.