Microsoft DirectX 8.1 (Visual Basic) |
The 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 DirectMusicPerformance8, _
toSeg As DirectMusicSegment8, _
lCommand As Long, _
lFlags As Long, _
chordmap As DirectMusicChordMap8 _
) As DirectMusicSegment8
Parts
object
Resolves to a DirectMusicComposer8 object.
performance
DirectMusicPerformance8 object 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
DirectMusicChordMap8 object representing the
Return Values
Returns a DirectMusicSegment8 object, unless no
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 contains no style track, intro embellishments are not valid. If there is no currently playing segment or it contains no style track, then fill, break, end, and groove embellishments are not valid.
It is possible for both the currently playing segment and segment1 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 segment1. The method returns Nothing, but it succeeds and cues the segment represented by segment1.
The value in chordmap can be Nothing. If so, an attempt is made to obtain a chordmap from a chordmap track, first from segment1 and then from the performance's primary segment. If neither of these segments contains a chordmap track, the chord occurring at the current time in the primary segment is used as the chord in the transition.