Skip to main content
Version: Next

Source Properties

You can do a lot more with the sources than just position them. The most common thing you might want to to is set their overal gain without the need to re-export them from your sound design project. Some sources could use some more reverb than others, and for some you might have a different distance to loudness behavior in mind!

Controlling the gain

You can control the overal gain of a source either linearily or in decibels using its gain setter methods:

// or in decibels

// forgot the gain you've set them?
const value = source.getGainLinear();
const valuedB = source.getGainDecibels();

Setting the reverb send level

Per default, sources don't contribute to the reverb effect. But you can change that by setting their reverb send level:

// or in decibels

// guess what? there's a getter as well!
const value = source.getReverbSendLinear()
const valuedB = source.getReverbSendDecibels()

Assign an Attenuation Curve

In combination with reverb, attenuation curves are the best way to simulate distance. See also attenuation curves


If you want to create the feeling that a bigger object sits between a source and the listener, you can increase the occlusion value of a source. This will dampen the audio signal and redude its volume, simulating occlusion/obstruction.

The occlusion value has to be in the range [0.0; 0.1], with 0.0 no occlusion happening and 1.0 full occlusion.

const value = source.getOcclusion()