DirectX SDK |
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
If the method succeeds, it returns a DirectMusicSegment object, unless no style is available for the composition of the transitional segment. See Remarks.
If the method fails, it raises an error, and Err.Number is set.
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.