DirectX SDK

DirectMusicComposer.AutoTransition

The DirectMusicComposer.AutoTransition method composes a transition from inside a performance's primary segment (or from silence) to another segment, and then cues the transition and the second segment to play.

object.AutoTransition( _ 
    performance As DirectMusicPerformance, _ 
    toSeg As DirectMusicSegment, _ 
    lCommand As Long, _ 
    lFlags As Long, _ 
    chordmap As DirectMusicChordMap) _ 
    As DirectMusicSegment

Parameters

object
Object expression that resolves to a DirectMusicComposer object.
performance
Performance in which to do the transition.
toSeg
Segment to which the transition should smoothly flow. See Remarks.
lCommand
Embellishment to use when composing the transition. See CONST_DMUS_COMMANDT_TYPES. If this value is DMUS_COMMANDT_ENDANDINTRO, the method composes a segment containing both an ending to the primary segment and an introduction to toSeg.
lFlags
Composition options. See CONST_DMUS_COMPOSEF_FLAGS.
chordmap
DirectMusicChordmap to be used when composing the transition.

Return Values

If the method succeeds, it returns a DirectMusicSegment object, unless no style is available for the composition of the transitional segment. See Remarks.

Error Codes

If the method fails, it raises an error, and Err.Number is set.

Remarks

The value in toSeg can be Nothing, as long as lFlags does not include DMUS_COMPOSEF_MODULATE. If toSeg is Nothing or a segment that contain no style track, intro embellishments are not valid. If there is no currently playing segment or it contain no style track, then fill, break, end, and groove embellishments are not valid.

It is possible for both the currently playing segment and toSeg to be Nothing or segments that contain no style tracks (such as segments based on MIDI files). If so, all embellishments are invalid, and no transition occurs between the currently playing segment and toSeg. The method returns Nothing, but it succeeds and cues the segment represented by toSeg.

The value in chordmap can be Nothing. If so, an attempt is made to obtain a chord map from a chord-map track, first from toSeg, and then from the performance's primary segment. If neither of these segments contains a chord-map track, the chord occurring at the current time in the primary segment is used as the chord in the transition.