This page is work-in-progress. You can reach me on twitter or mail to


Instance of SoundOnDemand.Channel - imagine it as a tube that sound has to get through. This tube makes the sound audible and modifies its properies such as volume or reverberation.

Create channels

Channels can be created by an instance of SoundOnDemand = new SoundOnDemand();

/* you can create as many channels as you need */

this.gui ="gui"); ="game"); ="music");


Adjust volume of a channel.;


Mix any sound that gets through a tube with an impulse response. It's mostly used to create a reverb effect

channel.convolver(amount, impulse);


channel.convolver(0.5, "reverbs/cave");

And when you've already picked some impulse you can change just amount:


Impulse response is just an audio file. In this case reverbs/cave.ogg

You can get a lot of free impulse responses in OpenAir project

A brief explanation of impulse responses and convolution

Clap your hands. Sound will propagate, get bounced of the walls and come back to your ear. If you were standing in a cave you would hear significant echo and reverb as some of this sound gets back to your ear earlier while the rest have to hit distant walls.

If you could record that clap - you would get what we call an impulse response - a three dimensional image of sound propagation in an environment. Imagine it as a raycasting for sound.

Then you could mix this response with another sound to reproduce the original environment of the impulse through a process called convolution wgucg we use it to simulate variety range of reverbs and environements including caves, forest or a guy talking through a telephone.

Ask question:

Fork me on GitHub