FMOD Engine User Manual 2.03

5. White Papers | Using Multiple Reverbs

Using multiple reverbs

In some situations, multiple styles of reverberations within a single environment must be modeled. For example, imagine a large church hall with a tunnel down into the catacombs. The reverb applied to the player's footsteps within the church hall (such as FMOD_PRESET_STONEROOM) could be quite different to that of the monster sounds emitting from the tunnel (which may be applied with both FMOD_PRESET_SEWERPIPE and FMOD_PRESET_STONEROOM). To handle this situation, multiple instances of the reverb DSP are required. As many as four instances of the reverb DSP can be added to the FMOD DSP graph, though each instance incurs a cost of more CPU time and memory usage.

FMOD Studio allows a sound designer to design their own reverbs, add them to group buses, and use sends and mixer snapshots to control the reverb mix. In this white paper, however, we will look at examples of using the Core API to add reverbs, query an instance's reverb properties, and control the wet/dry mix of each reverb instance on a per-channel basis.

Should you want to model multiple reverbs types within an environment without the extra resource expense of multiple reverbs, see the 3D Reverb white paper, which covers using automated 3D reverb zones to simulate reverb for different environments using only a single reverb instance.

Setting up the reverbs

Below is an example of setting up four reverb instances. You do not need to explicitly create the extra reverb instance DSP objects, as the FMOD engine creates them and connects them to the DSP graph when you reference them.

In the following example we will use System::setReverbProperties to specify four different reverb effects.

First we define four different FMOD_REVERB_PROPERTIES structures. The example below uses presets. You can define your own reverb settings but presets make it easier to get some common reverbs working. See FMOD_REVERB_PRESETS.

FMOD_REVERB_PROPERTIES prop1 = FMOD_PRESET_HALLWAY;
FMOD_REVERB_PROPERTIES prop2 = FMOD_PRESET_SEWERPIPE;
FMOD_REVERB_PROPERTIES prop3 = FMOD_PRESET_PARKINGLOT;
FMOD_REVERB_PROPERTIES prop4 = FMOD_PRESET_CONCERTHALL;

We then supply the 'instance' parameter to set which reverb DSP unit will be used for each preset, whilst calling the System::setReverbProperties function.

result = system->setReverbProperties(0, &prop1);
result = system->setReverbProperties(1, &prop2);
result = system->setReverbProperties(2, &prop3);
result = system->setReverbProperties(3, &prop4);

Getting the reverb properties

Should you wish to get the current System reverb properties, you must specify the instance number in the 'instance' parameter when calling System::getReverbProperties. In this example we will get the properties for Instance 3.

FMOD_REVERB_PROPERTIES prop = { 0 };
result = system->getReverbProperties(3, &prop);

Setting the wet/dry mix per Channel

You can set the wet/dry mix for each reverb on a channel of the FMOD Engine's mixer with ChannelControl::setReverbProperties. By default, a channel sends to all instances. This example sets the instance 1 send value to linear 0.0 (-80 db) (off).

result = channel->setReverbProperties(1, 0.0f);

To get the reverb mix level to be full volume again, simply set it to 1 (0db)

result = channel->setReverbProperties(1, 1.0f);

This system supercedes the now obsolete method of using FMOD_REVERB_CHANNELPROPERTIES and flags to specify which instance.