The ComposeTransition method composes a transition from a measure inside one segment to another segment.
HRESULT ComposeTransition( IDirectMusicSegment* pFromSeg, IDirectMusicSegment* pToSeg, MUSIC_TIME mtTime, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppTransSeg );
Segment from which to compose the transition.
Segment to which the transition should smoothly flow. Can be NULL if dwFlags does not include DMUS_COMPOSEF_MODULATE.
Time in pFromSeg from which to compose the transition.
Embellishment to use when composing the transition. This can be one of the DMUS_COMMANDT_TYPES enumeration, or a value defined in DirectMusic Producer as a custom embellishment. If this value is DMUS_COMMANDT_ENDANDINTRO, the method composes a segment containing both an ending to pFromSeg and an introduction to pToSeg.
Composition options. This parameter can contain one or more values from the DMUS_COMPOSEF_FLAGS enumerated type.
Pointer to the IDirectMusicChordMap8 interface of the chordmap to be used when composing the transition. (See Remarks.)
Address of a variable that receives a pointer to the created segment.
If the method succeeds, the return value is S_OK.
If it fails, the method can return one of the error values shown in the following table.
The value in pChordMap can be NULL. If it is, an attempt is made to obtain a chordmap from a chordmap track, first from pToSeg, and then from pFromSeg. If neither of these segments contains a chordmap track, the chord occurring at mtTime in pFromSeg is used as the chord in the transition.
The composer looks for a tempo, first in pFromSeg, and then in pToSeg. If neither of those segments contains a tempo track, the tempo for the transition segment is taken from the style .
** Header:** Dmusici.h
Library: Dmcompos.dll, Dmcompod.dll