DirectX SDK

DirectMusicComposer.ComposeTransition

The DirectMusicComposer.ComposeTransition method composes a transition from a measure inside one segment to another.

object.ComposeTransition(fromSeg As DirectMusicSegment, _
    toSeg As DirectMusicSegment, _
    mtTime As Long, _
    lCommand As Long, _
    lFlags As Long, _
    chordmap As DirectMusicChordMap) _
    As DirectMusicSegment 

Parameters

object
Object expression that resolves to a DirectMusicComposer object.
fromSeg
DirectMusicSegment object representing the segment from which to compose the transition.
toSeg
Segment to which the transition should smoothly flow. Can be Nothing if lFlags does not include DMUS_COMPOSEF_MODULATE.
mtTime
Time in fromSeg from which to compose the transition.
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 fromSeg and an introduction to toSeg.
lFlags
Composition options. This parameter can contain one or more of the CONST_DMUS_COMPOSEF_FLAGS enumeration.
chordmap
DirectMusicChordmap object representing the chord map to be used when composing the transition. See Remarks.

Return Values

If the method succeeds, it returns a DirectMusicSegment object.

Error Codes

If the method fails, it raises an error, and Err.Number can be set to one of the following values:

DMUS_E_INVALIDARG
DMUS_E_OUTOFMEMORY

Remarks

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 fromSeg. If neither of these segments contains a chord-map track, the chord occurring at mtTime in fromSeg is used as the chord in the transition.

The composer looks for a tempo, first in fromSeg, and then in toSeg. If neither of those segments contains a tempo track, the tempo for the transition segment is taken from the style.

See Also

DirectMusicComposer.AutoTransition