Sound design

Summary

Things I’ve done during the week:

  • Looked into the basics of FMOD (audio middleware), set up a test project and experimented with an event that would support pitch shifting
  • Prepared a prioritised list of sounds to source- 25 total – and split it into categories:
    • Beat: percussive sounds that would be dynamically chosen to play in the background (later expanded to chords)
    • Instrument: samples of varying pitch to create melodies matching die and enemy movement/attack power
    • Battle: sound effects for attacking
    • UI: sound effects for the interface
    • Level: misc. sound effects and jingles for the level
    • Game shop: ambience and misc. sound effects for the game shop
  • Of the 25, I prepared 11 this week, predominantly Beats and Instruments, using:
    • Garageband for instrumental/melodic sounds
    • Phone for foley recording: including dice hitting a soft surface, wood, and each other
  • Created the right mixer groups and code changes in Unity to have the sounds play in-game

Choosing the sound

Since a full release would have 6 themed levels, I planned for each to have a different sound. E.g. – the first level with broadly appealing games could take inspiration from pop music; a monopoly-inspired level would be jazzy, the level with battleships could sound militaristic.

However, this prototype is almost certainly going to focus on a single level. So ultimately, I went with a jazz-inspired selection of instruments and a jazz/blues scale due to the following reasons:

  • It has a bit more character than pop and therefore could make a stronger impression
  • A jazzy theme lends itself well to unusual note patterns
  • An upright bass is easy on the ears (which was a concern after the strong square wave melody from the grey box prototype).

To represent the six values of dice, I had to pick a scale. I arranged some arpeggios (sequences of notes) and layered them on top of chords to help me decide (I could replace them later easily):

  • A major chord across two octaves (C2, E2, G2, C3, E3, G3) – sounds well regardless of pattern, if a bit basic
  • A minor chord across two octaves
  • A seventh major chord
  • A minor pentatonic scale
  • A hexatonic blues scale
Minor hexatonic blues scale (Applied Guitar Theory 2018).

With the hexatonic blues scale, not all of the notes would harmonise with each other quite as nicely as with the more basic chords, but it sounded the most interesting and fitting of the lot – so that is what I decided on for the first pass – with the intention to fall back on the minor pentatonic scale if needed.

FMOD

During the module, I was advised by colleagues to look into audio middleware such as FMOD. One of my goals is professional development, and FMOD is used in the industry, so I’ve spend some time with the Integration example and FMOD studio documentation (Firelight Technologies 2021).

After understanding some basics, I tried to see if I could achieve two goals:

  • Use a single, parametised event to get any pitch-shifted note from a single sample – so that I could export a sound once and then be able to dynamically produce any tone without having to deliberately export each tone separately from Garageband;
  • Add some detail to the bass sample – such as playing a finger slide sound when the sample is released.
Attempting to build an audio event which could pitch shift a small number of samples (rather than having to export each tone) – unfortunately doesn’t sound too great across the range of an octave, especially for higher frequencies. In the interest of time, it’s probably best to abandon this experiment.

Ultimately, after two evenings with the software, I’ve come to the conclusion that the end result for the pitch-shifting event would not sound great. In addition, while I found FMOD to be powerful, I could not justify the time and added complexity resulting from integrating it with the project, against my fairly simple requirements of playing the right sounds on beat. It was simpler to build on the code I had, and consider switching to middleware only if there is a need.

Implementation

In-game, sounds are essentially triggered in reaction to the same Metronome object that notifies objects at each beat.

This week, I’ve managed to implement a few of the important dynamically controlled sounds responsible for setting the tone of the level.

In the video below, you can notice:

  • A soft percussive shuffle that alternates between one and two hits every beat
    • The shuffle turns into a triplet (ts-ts-ts) when next to an enemy (accentuated by a subtle camera zoom)
    • Clash on impact
  • A bass track reacting to the player’s current attack power
  • Different piano chords for when the player hits an obstacle with an equal, lower or higher value.

Sounds on enemies are implemented as 3D audio attenuated to the player’s position, and only audible at a short distance. This solution seemed to be heavy on resources though and required some polish, so it is currently turned off to be (hopefully) adressed properly later.

I also plan to implement the more realistic foley in the game shop areas of the game, where music will give way to a more realistic ambience.

Challenge:

The sounds will currently not react to changes in the Metronome tempo, therefore locking the gameplay at 120 beats per minute. This seems like the right speed, but if it ever needs to be tuned, it would be great to have the extra flexibility to change the tempo to an arbitrary number. This can be achieved either by using Unity’s built in pitch shift effect (which affects playback speed), or by integrating a package like Chronos, which handles changes to the passage of time, including the appearance of sounds (Ludiq 2021).

Reflection

I am glad to have tried FMOD, even if I don’t end up using it for the prototype. It seems like a great tool in a collaborative environment, where work on the logic behind audio behaviour can be completed separately from any other logic, using a convenient GUI. It is a tool that would have worked well in the Global Game jam earlier this year, where we had a dedicated audio expert in the team.

References

APPLIED GUITAR THEORY. 2018. “The Blues Scale.” Applied Guitar Theory [online]. Available at: https://appliedguitartheory.com/lessons/blues-scale/ [accessed 31 Mar 2021].

FIRELIGHT TECHNOLOGIES PTY LTD. 2021a. “Integration Tutorial.” Fmod.com [online]. Available at: https://fmod.com/resources/documentation-unity?version=2.1&page=integration-tutorial.html [accessed 31 Mar 2021].

FIRELIGHT TECHNOLOGIES PTY LTD. 2021b. “FMOD Studio Concepts.” Fmod.com [online]. Available at: https://fmod.com/resources/documentation-studio?version=2.1&page=fmod-studio-concepts.html [accessed 31 Mar 2021].

LUDIQ. 2021. “Chronos: Time Control for Unity.” Ludiq [online]. Available at: https://ludiq.io/chronos/features [accessed 31 Mar 2021].

Leave a comment