Music Implementation

I am a huge fan of adaptive music in games. Being able to have the music adapt naturally based on game parameters is an awesome way to make the game feel responsive and immersive. With great adaptive music, the player can feel like they're listening to a movie score written just for them! 

Below are a few examples of the adaptive music systems I have created for my own projects as well tips on writing and implementing adaptive music.

Following the Horror

See how I created a dynamic music system that is able to adapt to various situations in the horror game Shadownest

Shadownest has three major gameplay states:

  • Exploration: when the players are exploring outside of combat

  • Chase: When the monster is chasing the human players

  • Hiding: When a human player is currently hidden from the monster after an encounter

I created three music states and silence in Wwise to match these three gameplay states. Each state has beat-locked, musical transitions between them and has two additional sets of intensity layers that can come in and out based on the human players' Fear Level (parameter determined by player health and number of human-monster confrontations).

Hiding successfully might mean you evade the monster, but coming out too soon can lead to your doom! The Hiding state can very quickly and easily transition to the Chase state and visa-versa. The Hiding state also has an additional thumping bass layer that raises and lowers in volume based on how close the monster is to the human player. 

Additionally, the Hiding state has Intensity Levels that will go down if the monster is far enough away and the human player is hiding for long enough. This allows hiding to feel intense the moment you stuff yourself in a closet, but to eventually ease off as you feel the coast is clear.

Finally, the Hiding and Chase states both contain random music tracks that contain different musical phrases each time the music loops. The multiple random tracks lead to many different combinations of music playing at once. This is done so the music always feels evolving and eerily inconsistent.  

 

 

Sounds of the Forest

Polaris Postal Service is a game where you explore a magical forest and deliver letters to its inhabitants. Here's how a creating ambient music that could feel as natural and evolving as that forest

You spend most of your time in Polaris Postal Service exploring the forest and using the stars to guide you while you receive and deliver letters. As well as a dynamic forest ambiance that included owls hooting, crickets, and the wind rustling through the trees, I wanted to create a music system that would support the sound effects to create a continuously evolving forest bed. 

The ambient music of the game is composed of many small musical phrases which are grouped into three categories: longer fuller ambient synth phrases, and two types of shorter, quieter phrases made from two different synth patches. I called them Delays and Plucks. 

Wwise selects a category of phrase and then selects a music clip from within one of those categories. This way, the player will never hear the same type of phrase twice in a row, and they will never hear the exact same phrase played again shortly after it was played the first time. 

The different categories of phrases with different levels of intensity between them create natural dynamics, and the silence between each phrase allows for the music to feel like it is coming in and out of the bed of forest ambient sounds. 

In Polaris Postal Service, the player connects stars in the sky to create a constellation. Every time a star in the constellation is clicked on, a musical note plays. When the constellation is fully created, a musical stinger plays in the same key as those musical notes. These stingers toggle between the keys of G and F, so we made sure that the notes that play when you click on a star are always in the same key as the stinger that will play once the player finishes the constellation. 

 

 

Don't Miss Your Entrance!: Natural Layering

In this video, I explain how to add and remove layers in your adaptive music in a way that feels more natural than fading in and out. Hope it's helpful!

This trick is pretty easy, and while it might not always be the best choice, I think it can really help your adaptive music feel convincing. 

Normally, when you are adding or removing layers, you will fade them in and out. This technique uses the same idea but only fades the layers during moments of rest. If a layer only fades in or out during silence, you won't hear the fade, and it will sound like an instrumentalist is intentionally starting or stopping. 

I did this uses Switch Tracks in Wwise with one switch being an empty track and the other being the layer. I only allow Wwise to transition between the switches during moments of rest. This could be on every bar or every beat if that works for your music, or you could manually add Custom Cues during moments of rest and have Wwise only transition during those Custom Cues. 

This technique is not as immediate as fading in or out anytime since the music has to wait for a moment of silence, so this is best used when the music does not have to be quickly responsive. The composer also must write with this technique in mind which could be more difficult, but I always think it's great to compose with the implementation in mind anyway!