Platform SDK: DirectX

How Music Varies During Playback

As DirectMusic plays a segment (other than a simple MIDI file or an authored segment based on a MIDI file), changes are made to the basic harmony and rhythm so that the performance does not sound static. Changes are partly scripted and partly random.

In many cases, applications exert control over the music by playing different segments, rather than by manipulating existing segments. For example, to have the music reflect a change in the intensity of a game, you can simply transition to a new segment authored for that intensity level. You can achieve a similar effect with a single style-based segment by having the author create patterns with different groove ranges, then changing the groove level in response to game events.

For more information on how to change the music at run time, see Music Parameters.