IDirectMusicComposer::AutoTransition

The IDirectMusicComposer::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.

HRESULT AutoTransition(
  IDirectMusicPerformance* pPerformance,
  IDirectMusicSegment* pToSeg,
  WORD wCommand,
  DWORD dwFlags,
  IDirectMusicChordMap* pChordMap,
  IDirectMusicSegment** ppTransSeg,
  IDirectMusicSegmentState** ppToSegState, 
  IDirectMusicSegmentState** ppTransSegState
);
 

Parameters

pPerformance
Performance in which to do the transition.
pToSeg
Segment to which the transition should smoothly flow. See Remarks.
wCommand
Embellishment to use when composing the transition. See DMUS_COMMANDT_TYPES. If this value is DMUS_COMMANDT_ENDANDINTRO, the method will compose a segment containing both an ending to the primary segment and an intro to pToSeg.
dwFlags
Composition options. See DMUS_COMPOSEF_FLAGS.
pChordMap
Chordmap to be used when composing the transition.
ppTransSeg
Address of a variable to receive a pointer to the created segment. This value may be NULL, in which case the pointer is not returned.
ppToSegState
Address of a variable to receive a pointer to the segment state created by the performance (pPerformance) for the segment following the transition (pToSeg). See Remarks.
ppTransSegState
Address of a variable to receive a pointer to receive the segment state created by the performance (pPerformance) for the created segment (ppTransSeg). See Remarks.

Return Values

If the method succeeds, the return value is S_OK.

If it fails, the method may return E_POINTER.

Remarks

The value in pToSeg can be NULL as long as dwFlags does not include DMUS_COMPOSEF_MODULATE. If pToSeg is NULL or doesn't contain a style track, intro embellishments are not valid. If the currently playing segment is NULL or doesn't contain a style track, then fill, break, end, and groove embellishments are not valid.

It is possible for both the currently playing segment and pToSeg to be NULL or segments that don't contain 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 pToSeg. Both ppTransSeg and ppTransSegState will return NULL, but the method succeeds and cues the segment represented by pToSeg.

The value in pChordMap can be NULL. If so, an attempt is made to obtain a chordmap from a chordmap track, first from pToSeg, 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.

QuickInfo

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dmusici.h.

See Also

IDirectMusicComposer::ComposeTransition, Using Transitions