Audiokinetic Wwise Knowledge Base

Delays for State Changes in Interactive Music

Music objects can also subscribe to state groups, so when a state changes, the properties of the music objects will be affected. Interactive music must address how and when the music object will be affected using the Change Occurs At property to determine the sync type. This property is defined in the States Tab of the music object’s Property Editor and depends on the current playback position.

Although the moment when the state change occurs is defined by the Sync type, it is important to remember that states are global by definition, and because there may be more than one playing node that is registered to the same state group, the state change will occur at the earliest moment specified by the Change Occurs At settings of all the Wwise objects currently playing and will affect the properties of all Wwise objects that are registered to it at once.

Because many nodes can be playing at the same time, for example, a pre-entry of a segment that overlaps the current segment, segments of a previous switch child that are fading out because of a positive fade offset in the transition rules, and descendents - tracks - and ascendants - playlists, switch containers - of these segments, how do we decide when the state change should occur? We need to consider three points, when we decide this:

  • Only one segment can be considered active at any given time. This is also true for stingers.
  • State changes for music objects must be as natural and smooth as possible.
  • A state change should be applied at the earliest moment possible.

To define the state change strategy, we need to inspect the currently active segment when a state change occurs, and poll the sync types in this segment’s hierarchy. If no sync type can be found, then the next segment is inspected. This condition of no state change position can occur for various reasons such as the Next Grid/Beat/Bar or User Cue will not occur in the currently active segment, or the current segment is <nothing>. When inspecting either the current or the next segment, we can identify these distinct cases. Based on these possible cases, a state change can be scheduled.

IMPORTANT
As mentionned previously, States are global and may be delayed by a objects of the Interactive Music hierarchy. When the state change effectively occurs, the new property values are applied to _all_ objects that are registered to it, including objects of the Actor-Mixer hierarchy.




Article Details

Last Updated
16th o February, 2010

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF

User Opinions (0 votes)

No users have voted.

How would you rate this answer?



Thank you for rating this answer.

Related Articles

No related articles were found.

Attachments

No attachments were found.

Continue