Adaptive Music in FMOD Studio: Transition Markers and Logic
Checked with: Version 1.07.00 01/02/2016
In this video, we’re going to upgrading our simple adaptive music system with a new Game Parameter and use it to move between our two musical segments by introducing some Marker and Transition based Logic Operations. We use assets from Loopmasters, which can be found at the Loopmasters Page.
Download FMOD Studio from the downloads page Downloads Page
(0:00) Hello and welcome to the third video in a mini series introducing adaptive music in FMOD Studio. This video series is designed to get you up and running with logic operations and adaptive music in FMOD Studio. My name is Sally, and I am the sound designer at Firelight Technologies. Today, we are going to be looking at upgrading our simple adaptive music system with a new game parameter and use it to skip between different sections of music. This will help FMOD newcomers to level up their knowledge of adaptive audio for games and help refresh FMOD pro’s on some of the FMOD features.
(0:37) We will delve a little deeper into the world of adaptive audio and see how we can use game parameters to control conditional triggering logic and transitions. I will introduce you to the trigger conditions and quantisation features of modules as well as how we can use parameters to control the condition of the Playhead.
(0:57) Let us have a look at what we would like the music to do by the end of this video. The first thing we will do is we will create a new intensity parameter, and we will do this first because all the logic that we will be crafting today is based off this parameter.
(1:10) We will actually create a higher intensity loop as well and we will add logic operations to loop regions, so that the Playhead will pass onward, past the loop region, but only if the condition for the intensity is met.
(1:23) For example, we will start with the intensity high. And the Playhead passes on, past the low intensity loop and into the high intensity loop. With a low intensity setting, the Playhead will loop within the low intensity loop region. We will be using transition markers for backwards progression. Within segment one, there is no need to return to the start of segment one. But, say the intensity has decreased after the Playhead has progressed, we the playhead moves back to the start of the low intensity segment.
(2:25) The same will happen if the Playhead is within the high intensity loop. We will also be adding more variety to the higher intensity loop region, with new musical elements in a multi sound module. We will also add a new drum section, which is only triggered if the health is low.
(3:00) The first step is to create a new parameter that drives the logic to move forwards and backwards between sections of music, depending on the progression of the player. In our simple game, we will be using a game parameter called Intensity that increases as the player moves through the level.
(3:16) Now we remember how to do this from last time, you press the big plus, press add parameter, name your parameter and set the range as well. We will do the same as we did with the health parameter and set it between zero and 100.
(3:29) What we will do is set the initial value of this parameter to zero, because when the event is loaded and played, it will be when the level is loaded the first time.
(3:46) Since we are so excited about this new parameter, let us go straight in and create our new loop as well. So, with a looping region, right click in the logic track and select add loop region. We are going to create this new looping region between bar 21 and bar 37.
(4:02) We will also create our marker for segment two straight away, so right click in the logic track again, and select add marker. Double click to name your marker.
(4:13) Now, with the loops set up as they are, the Playhead will never move passed the first loop. So what we can do is create some conditional logic to keep the Playhead looping or to break out of the loop and move forwards out of the piece.
(4:26) So we will start with segment one. So select the loop region, hit your big plus in the deck area. Here, you can add a parameter condition. Attach this logic operation to the intensity parameter. Let us set it for a low intensity – zero to 50.
(4:53) As we can hear, the Playhead will only stay and hold looping in this loop region when this intensity condition we have just set is met. If we were to turn up the intensity, up over 50, we will notice that the Playhead continues on and jumps into segment two.
(5:22) Now we can set up the same for segment two.
(5:25) Add a parameter condition for the Loop Region for intensity, and set the range to 50 – 100.
(5:30) Now, we have some logic that controls when the playhead loops and when it breaks out of the loop to move forwards.
(5:36) Let’s create some logic that will move the Playhead backwards along the timeline. To do this, we will need to use transition markers.
(5:44) A transition marker is a special type of marker that moves the Playhead between positions on the timeline. Each transition marker has conditional logic and a destination marker associated with it. So when the Playhead hits a transition marker and the conditional logic is met, the Playhead is moved to the destination marker. In our piece, we want to use these transition markers to move the Playhead back to the start of the previous loops when the intensity parameter decreases.
(6:13) At bar 40, we will need our marker to segment one and a marker to the start of segment two. At bar 21, we will need our marker to send the playhead back to just bar five, the start of segment one.
(6:31) Right click in the logic track, and select add transition to, and select segment one. We will do the same for the transitions up here. Transition to segment one, add transition to segment two.
(6:44) But without any conditional logic actually attached to these markers, they will always transition. Even if we do not really want them to. This is because the probability down here is at 100 percent, it will always happen.
(7:03) So, to do this you just select your transition marker, so this is the one that is going back to the start of segment one, hit the big plus, just like we did before, and select the parameter condition for intensity. For this one, we will need it to be the same as the looping regions. So, just when the intensity is low, between zero and 50, we want the Playhead to skip back to segment one and start playing from there.
(7:51) Now let us set up the logic for these two markers at the end of segment two. So we will do the same thing, so for the transition to segment one, hit the big plus, add a parameter condition for intensity, because it is going to segment one, we will need the low intensity again – zero to 50.
(8:07) Select ‘to segment two’, and we will add the parameter condition for intensity from 50 to 100, because this is going to the start of the high intensity. Audition these changes by playing the event, and manipulating the Intensity dial as the playhead approaches the Markers.
(8:29) Next up, we are going to add the cherry on top of our higher intensity loop, and add a few conditionally triggering musical elements, starting by adding a few more modules to our orchestra hits track. These, we will keep simple without trigger conditions to allow for some consistency in this one instrument, the orchestra hits track.
(8:47) So we will just scroll down and find our orchestra hits track, we will need to bring up the Audio Bin, we have a folder that we have sorted all of our orchestra hits into.
(8:56) Now we will look for a couple of specific files. Drum sequence one, we will drag this and drop it straight to bar 17.
(9:06) We will then select drum loop one, two and three. All together – shift+select. Drop them, and a multi sound is created automatically for us. Drag this multi sound module over to bar 21 and pull across to finish at 33.
(9:26) And then we will throw in drum loop intermediate one – drag and drop to Bar 33. We can close the Audio Bin for now.
(10:00) Now, if you notice, because we hit play straight away, we went straight into listening to what these new regions sound like. We forgot to do something very important, which is set the behaviours of this module.
(10:11) Now I select the multi sound to see the playlist, which includes the three assets that we selected from the Audio Bin. FMOD Studio automatically randomises the playlist for you, so it never plays in the same sequence, but because we want these three different assets in the playlist to loop continuously during the duration of the whole multi sound, we need to select the looping button.
(11:24) Now the last thing I want to do is create a new track for some additional drum hits and apply some additional triggering logic to this new track to spice up the mix according to the player’s health.
(11:36) So what we will do is select any track, right click on the track and select add audio track. This gives us a new audio track. We can name it straight away, so we do not forget what it is. Open up your Audio Bin again, we will need to open up our kick effects asset, and drag and drop into the track. We will start this asset at bar 17.
(12:10) We want to attach some trigger behaviour, and we will do that just by opening the Trigger Conditions panel. Again, we find our Logic section on the left hand side, hit the big plus to add a parameter condition, and we will select the ‘Health’ this time. We want these ominous drum hits to trigger only when the Player Health is getting really low and the pressure is high. So let us set this down to 30 and below.
(13:03) This technique, you can use in any situation where we want to add some variety or randomness to the triggering of a region, we can do the same the same thing to apply some triggering logic driven by any of the parameters we are using in our event.
(13:14) This is actually all we have time for today. We have covered a few more techniques for creating non-linear and adaptive audio in FMOD Studio. We have covered the super flexible and important concept of using a parameter to control conditional logic and Playhead movement in our adaptive music piece. We have also added conditionally triggering regions to ensure that our high intensity segment of music has an element that is responsive to the health parameter as well as being responsive to the overall intensity and progression that the player is through the level.
(13:45) In the next tutorial, we will add to the structure again and implement a transition out to a new musical theme, that will occur when the player dies. We will use transition regions to do this, and we will even experiment with crafting some content in the transition timelines.
Credits and Attribution
Assets in the videos are provided by Loopmasters. They are used for demonstration only, and are not available for distribution.