IMPOSTOR HORSE

FMOD API     C++      2 weeks     2020

ABOUT

IMPOSTOR HORSE is a 3D audio testing environment where a strange, glassy-eyed horse runs around and makes sounds of various effects. The following features have been implemented using the FMOD API in a rudimentary C++ game: 

  • Controllable FIR filter for real-time use with a circular buffer in a FMOD custom DSP 
  • Spatialized sound, Doppler effect, and Distance roll-off 
  • 3D occlusion and flanger effect

This project has been developed in collaboration with Nashmia Riaz

Please turn volume on to hear the audio effects

[1] FIR Filter

An averaging FIR filter for real-time use is applied with a circular buffer in a FMOD custom DSP. Filter coefficient interpolation creates a dynamically controllable filter, determining the ratio of how two different filters mix to generate the FIR filter.  

[2A] 3D sound

3D sound is achieved by spatializing FMOD sounds — meaning passing values in three dimensions for position and velocity. The sample on the left shows how sound is perceived differently from ear to ear in the headset. For instance, if the sound comes from the right, the sound will originate from the right ear of the headset. 

[2B] Doppler effect

The velocity of the horse is needed to trigger the doppler effect between the sound source and the listener, the horse and player respectively. As the horse approaches the player, the sound frequency increases; as the horse leaves, the frequency decreases. The position of the horse relative to the player is also important as this determines the volume of audible sound. 

[3A] Flanger effect

A custom flanger effect is applied for the sound source. A new DSP filter has been applied to delay the audio sample from the outbuffer, which then stores the delayed sample in the inbuffer to create the flanger. The sample shows the flanger effect being turned on, and then off. 

[3B] 3D occlusion

In the game scene, the horse is singing a drum-based sound track. Depending on the location of the player from the horse, the horse’s sound becomes occluded if the player is position behind a wall.