node package manager


Easy way to manage and play sound effects using HTML5 Web Audio API


Is just that. It's a simple sound effect manager for playing sounds using the awesome HTML 5 Web Audio API.

If you think I'm talking about <audio> tags, go read this:

It's significantly better than <audio> tags for several reasons:

  • You don't have to create a tag for each sound you want to play
  • You can multiplex an effect without having to create duplicate tags
  • You can also control volume and add other effects

Part of the Ampersand.js toolkit for building clientside applications.

npm install sound-effect-manager

// just init the sound effect manager 
var SoundEffectManager = require('sound-effect-manager');
var sm = new SoundEffectManager();
// load some files by passing it a url and a name 
sm.loadFile('taps.mp3', 'taps');
sm.loadFile('rocket.wav', 'rocket');
// then play the sounds like so:'rocket');
// or play a sound in looping mode:'taps', true);
// and to stop a loop: 
// that's it! 


Built (rather hastily) by @HenrikJoreteg for use in And Bang. Which you should totally check out if you work with a team, for anything, ever.