Lesson 6

Table of Contents

Adjusting the Default Transition Rule

You may have noticed that if you try to transition between Alive and Defeated 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 worked with Transition rules when you configured the guitar Music Track in the previous lesson. Music Switch Containers also have a Transition rule system. 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 rules currently configured for the Wwise 201 Music Music Playlist Container.

  1. In the Project Explorer, select the Wwise 201 Music object and click the Transitions tab.

    The window you see is used to define how Transitions between Music 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.

  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 Combat to Defeated music as you change the PlayerLife State Group status. Based on this rule, the playing Music Segment must reach its Exit Cue before the Transition will occur, and with the Combat and Defeated music, it can be several bars before that occurs. There are a lot of 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 Music Segments that often feel 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.

  4. Play the Wwise 201 Music Event and experiment with changing the PlayerLife State Group 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. For example, when the player is defeated, the Defeated music plays, but not for a measure. It may seem a bit awkward that when the player is defeated the transition to the music signifying the defeat doesn’t occur for a few beats. Defeat is oftentimes unexpected and instantaneous, so the music signifying it should transition the same way as well. To do this, you can add a specific Transition rule that is in effect only when the player is defeated.

  5. Click the Add Transition button.

    A new Transition rule is created on a second line.

    In principle, any music that is playing should be cut off and transition immediately to the Defeated music. This means that your Source should be Any and the Destination should be Defeated. To set this, you can drag Music Playlist Container to the desired column.

  6. In the Project Explorer, expand the Wwise 201 Music object and drag the Defeated Music Playlist Container to the Destination column of the second row in the Transition rule.

    You’ve identified the circumstance that should be the exception, but you still need to define how you want things to behave differently when this occurs.

  7. Select the second row and change the Exit source at property to Immediate.

    Before you test this change, there’s another circumstance you should consider. When the player respawns, the PlayerLife State Group is set back to Alive. This may cause the ending of the Defeated music to cut off abruptly. Since the Defeated music is only a few bars long, It would sound better to let the Defeated music finish playing before transitioning back to the Combat music. This can be accommodated with another Transition rule.

  8. Add another Transition rule and select it.

    The default Exit Source at, Exit Cue, is already appropriate for what you’re trying to do. You just need to define the Source and Destination values, which in this case would be Defeated to Any.

  9. Drag the Defeated object to the Source column of the new Transition rule.

    Now you’re ready to test how your Transition rules are working when you play the Music Event and change the PlayerLife State Group.

  10. Play the Music Event and adjust the Player Life State.

    When the PlayerLife State Group changes to Defeated, the Defeated music plays instantly. Notice how when you switch from Defeated to Alive, the Transition waits until the Defeated music’s Exit Cue is reached. This way, when the player respawns, you don’t have to worry about the Defeated music being cut short.


Was this page helpful?