6.4 Transitions


6.4) Transitions



You may have noticed that If you try to transition between Start and End States while the music plays, you won’t hear the music immediately change. This is because, by default, the Transition won’t occur until the Exit Cue of the currently playing Music Segment is reached. This is defined by something called a Transition Rule. You can use the Transition Rules to make Wwise play the music being transitioned to at the right time. Take a look at the default Transition currently configured for the Music Switch Container.

Pic01 Transition Rules

Pic02 Any to Any Transition Rule

Pic03 Add Transition

Pic04 Start to End Transition Rule

Pic05 Grid Frequency

Pic06 Exit Source at Next Beat

Pic07 Transition Segments

Pic08 Edit Fade-out

Pic09 Music Fade Editor

Pic10 Post-Exit

Pic11 Jump to

Pic12 Sync to

Pic13 Pre-Entry

  1. In the Project Explorer, select the Music Switch Container and click the Transitions Tab.

    The window you see is used to define how Transitions between Playlist Containers or Music Segments occur. Each row listed represents a Transition Rule that should be carried out based on a certain circumstance of which pieces of music are being transitioned from or to. There is always a default Rule that says Any Source going to Any Destination should behave in a particular way. This default Rule is currently displayed on the first line. (Pic01 Transition Rules)

  2. Select the “Any to Any” Transition Rule on the first line.

    Below, in the Source group box, you can see that it says the Source should be exited at the next Exit Cue. This is why you don’t hear the music immediately transition from the Start to End music as you change the Music State Group status. Based on this Rule, the Playlist Container that is being played back must first reach its Exit Cue before the Transition will occur, and with the used Start and End music, it can be several musical bars before that occurs. There are a lot of different options for when a Transition can occur, including an immediate value, but it’s the rhythmically aware options that provide a way to transition between Playlists or Segments that often feels a bit more musically appropriate.

  3. Change the Exit Source at property to say Next Bar. Now you’re ready to test the change to the Transition Rule. (Pic02 Any to Any Transition Rule)

  4. Play the Event for the Music System and experiment with changing the State Group from Start to End in the Transport Control View.

    Notice how the Transitions always wait until the next bar, so the change always occurs on the downbeat of a measure. Remember that this “Any to Any” Transition Rule is in effect for all transitions, unless you add another Rule that provides an exception. You should definitely think about your default Transition Rule, but for more control over specific transitions you’ll need custom Rules for individual State changes.

  5. Click the Add Transition button. (Pic03 Add Transition)

    A new Transition rule is then created on a second line. Let’s set a custom Transition Rule for a State change from Start to End.

  6. Set the start Playlist Container as Source, and the end Playlist Container as Destination for the Transition. You can to this via dragging and dropping the Objects from the Audio Tab to the corresponding field in the Transitions Tab of the Music Switch Container Property Editor, or by clicking the >> button and browsing for the right object. (Pic04 Start to End Transition Rule)

    Now, let’s create a smooth Transition. But what is a smooth Transition in this instance? Consider the circumstances in which the Music State Group’s status is set to End. The game engine makes a Game Call to set the State to End as soon as the player hits the finish line. Therefore you’ll need a relatively responsive transition, but one that is still musically appropriate. There are quite a handful of options for exiting a Source, even custom Cues which can be created in the timeline of Music Track Objects and have a custom String for reference. But let’s look at the other more common options. Immediate would not consider the Time Settings of the current music playing. When setting Next Bar you’d have to wait a bit too long for the transition. To still respect the Time Settings of the track, you could either choose Next Beat, which would be the next fourth of the 4/4 Time Signature in this instance, or Next Grid, which could be any musical Time Signature, set in the General Settings Tab of the Music Switch Container. (Pic05 Grid Frequency)

  7. It always depends on the circumstances and also on how the different musical elements are being delivered, but let’s choose Next Beat for this scenario. (Pic06 Exit Source at Next Beat)

  8. Now test the new Transition Rule a couple of times.

    It already sounds pretty good! Another thing you could do, which is quite important for longer transitions than this one, is to create a short Crossfade in between the transition, so that the current track doesn’t just cut off and the next track doesn’t just begin to play out of nowhere. The good thing is that there are Properties for either using a custom Transition Segment (as long as the Music Composer has considered creating one for this game) or Properties for Fade-outs and Fade-ins. (Pic07 Transition Segments)

  9. Choose the Fade-out Property for the Source and click Edit…. (Pic08 Edit Fade-Out)

    What you see now is the Music Fade Editor. You can use the Fade Time, Offset and Curve Property to set your custom Fade-out for when the Transition Rule kicks in. The upper track with white background is a representation of the Source, the lower track with darker background is a representation of the Destination.

  10. Tweak the Properties in the Fade-Editor to your liking. A short Fade-out is sufficient enough to not let the current Track (Source) end abruptly, and to not let it bleed over into the next Track (Destination) by making it too long. The red line indicates your Fade-out. (Pic09 Music Fade Editor)

    Look at the Music Fade Editor one more time and think about it. You now have a Fade-out as soon as the Transition Rule is being triggered by the State change. The Source track fades out, the Destination Tracks begins to play. But in order to be able to actually hear the current track fading out, even if it’s only set to 0,5 seconds, the current track needs to play a bit longer. So it needs to be playing even a little bit after the value set for Exit Source at. This is called the Source Post-Exit. You can even see its name in the Music Fade Editor. This is why you always have to check the Play Post-Exit box in the Transitions Tab, when creating a Fade-out or Fade-in.

  11. Set the Play Post-Exit checkbox. (Pic10 Post-Exit)

  12. Now lets check the Jump Property for the Destination. Whenever your custom Transition occurs, the Source is being exited at the Next Beat with a short Fade-out. The end Playlist Container, which is set as Destination, jumps to the Start of the Playlist. Since you only have one Music Segment as child of the end Playlist Container, this Property doesn’t really affect anything. But maybe for other game scenarios you’ll have to choose another option. (Pic11 Jump to)

  13. The Sync Property to is set to the Entry Cue, which is also fine. You’ll only need the Transition Rule to play the end Playlist with its only Segment just once. For other Transition Rules you could sync the time of the Destination to the same time as the playing Segment for example, or even Random Custom Cues amongst other things. (Pic12 Sync to)

  14. The Fade-in Property is not checked yet, and it doesn’t have to be. It also doesn’t have to Play Pre-Entry, since the only Segment within the end Playlist starts right where it needs to start. You’ll probably have to set these four Properties for any other Destination Segment of a Transition Rule, if the musical piece keeps on playing but it is just transitioning to another Segment. (Pic13 Pre-Entry)

  15. Now test the adjusted Transition Rule a couple of times.

    Well done! The transition now sounds really smooth with the addition of a short Fade-out of the Source track. It may seem subtle, but things like these really show if there is detail and consideration in the way music is implemented into a game. They also show that you know what you are doing, from a professional standpoint.