Procedural Audio LODs2

Procedural Audio LODs

A useful technique when designing a procedural audio patch is to divide it based on different levels of details (LODs) of the sound we want to simulate.

To illustrate our point, let’s create a very simple rain patch. If we had to design such a patch, we may be tempted to trigger many Bubble generators in GameSynth, with different settings. We could end up with a patch similar to the one in the picture below:

LOD-patch 1

Although this is certainly doable, it requires a lot of manual parameter adjustments, it is not very readable or manageable, and more importantly it would be quite costly CPU-wise.

Instead, let’s look at the rain preset that comes with GameSynth:

LOD-patch2

You can listen to it here:

The patch has been divided into 3 processing branches – each corresponding to a different level of detail – that are connected to a Mixer module.

  • First, a simple and very cost-efficient Noise module is used to simulate the distant rain. This Noise module is built around a white noise generator followed by a bandpass filter. Here, the upper cutoff frequency of that filter is slowly modulated by a LFO to make the sound a bit less repetitive and simulate waves of more intense rain.

 

  • At a second level, a Granular Noise module – also very CPU-friendly in GameSynth – goes through a Biquad Filter configured as a lowpass to simulate the rain hitting a surface nearby.

 

  • Finally, at the third level, we generate single water drops that are close to the listener by using a Bubble module. The bubbles are triggered randomly by a Distribution module.

 

The three patch sections are mixed together and passed through a small algorithmic Reverb module. It is a lot cheaper CPU-wise than a convolution reverb and sufficient for our case.  Actually, if you are using GameSynth in conjunction with a game audio middleware, the reverberation would usually be applied outside of the patch.

The result is a patch that sounds great, is easy to read and edit, and uses very little CPU. Compared to sample playback, the advantages are obvious: the sound of the rain never repeats itself, we could update all the parameters from the game (e.g. levels of each section, frequency of the water drops, tone of the ambient rain), and the data only takes 380 bytes of memory! Yes, that’s right: three – eight – zero.

This technique – which consists in decomposing sounds in different elements based on their level of detail and using different synthesis techniques to simulate these elements – can be successfully applied to the generation of many other sound effects.

For example, the Camp Fire preset of GameSynth uses a very similar patch structure.

LOD-patch3

You can hear the result here:

 

We will introduce more procedural audio techniques using GameSynth in the upcoming blogs, so happy patching and visit us again soon!