Microsoft DirectX 8.1 (C++)

Self-Controlling Segments

A self-controlling segment ignores any control information from the control segment that duplicates control information in the self-controlling segment. For example, if the segment has a command track, it can use its own groove levels rather than the groove levels set by the control segment.

Segments can define for each track where it gets its controlling information, as follows:

Segments are usually configured to be self-controlling by the author. However, applications can configure individual tracks within segments by setting or clearing the following flags, using the IDirectMusicSegment8::SetTrackConfig or IDirectMusicSegmentState8::SetTrackConfig method:

Flag Effect
DMUS_TRACKCONFIG_OVERRIDE_ALL The track should get parameters from this segment before control and primary tracks.
DMUS_TRACKCONFIG_OVERRIDE_PRIMARY The track should get parameters from this segment before the primary segment tracks.
DMUS_TRACKCONFIG_FALLBACK The track should get parameters from this segment if the primary and control segments don't return the needed information.

The following example code, where pSegment is an IDirectMusicSegment8 interface pointer, instructs the style track to get all its parameters from other tracks in the same segment, ensuring that chords, groove levels, and mute commands do not come from the control segment.

HRESULT hr = pSegment ->SetTrackConfig(CLSID_DirectMusicStyleTrack,
    -1, DMUS_SEG_ALLTRACKS, DMUS_TRACKCONFIG_OVERRIDE_ALL, 0);

For more information, see Track Configuration.