ABSTRACT

In this chapter, we’re going to add a sound effect to the Sentry Drone.

In Chapter 5 we created a looping audio file for this, but to add some interest, we’ll also add an electrical sparking sound.

If we were to use another loop file for this, the player might notice it repeat. This could be avoided by using longer loops, but this results in larger audio file sizes.

Instead, we’ll take this opportunity to look at Scatterer Instruments, which are ideal for creating generative sound effects. This will result in a 3D sound that gets quieter over distance. This is an example of a built-in parameter – the distance between the listener and the emitter controls the level of the audio.

However, in the real world, not only does sound get quieter over distance, but we also lose high-frequency content.

In this chapter, we’ll see how to add a low pass filter effect in FMOD, and how a 3D Event can be configured to control the cut-off frequency with the distance parameter.

We’ll then look at another of FMOD and Unity’s built-in parameters (Event Cone Angle) to add an audible indication when the Sentry Drone is looking towards the player.