IDirectMusicComposer::ComposeTransition

This method composes a transition from a measure inside one segment to another.

HRESULT ComposeTransition(
  IDirectMusicSegment* pFromSeg,
  IDirectMusicSegment* pToSeg,
  MUSIC_TIME mtTime,
  WORD wCommand,
  DWORD dwFlags,
  IDirectMusicChordMap* pChordMap,
  IDirectMusicSegment** ppTransSeg
);

Parameters

  • pFromSeg
    Segment from which to compose the transition.
  • pToSeg
    Segment to which the transition should smoothly flow. Can be NULL if dwFlags does not include DMUS_COMPOSEF_MODULATE.
  • mtTime
    Time in pFromSeg from which to compose the transition.
  • wCommand
    Embellishment to use when composing the transition. For more information, see DMUS_COMMANDT_TYPES. If this value is DMUS_COMMANDT_ENDANDINTRO, the method composes a segment containing both an ending to pFromSeg and an introduction to pToSeg.
  • dwFlags
    Composition options. This parameter can contain one or more of the DMUS_COMPOSEF_FLAGS enumerated type values.
  • pChordMap
    Chord map to be used when composing the transition. See Remarks.
  • ppTransSeg
    Address of a variable to receive a pointer to the created segment.

Return Values

If the method succeeds, the return value is S_OK.

If it fails, the method can return one of the following error values:

E_INVALIDARG
E_OUTOFMEMORY
E_POINTER

Remarks

The value in pChordMap can be NULL. If it is, an attempt is made to obtain a chord map from a chord-map track, first from pToSeg, and then from pFromSeg. If neither of these segments contains a chord-map 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.

Requirements

OS Versions: Windows CE .NET 4.0 and Windows CE .NET 4.1.
Header: Dmusici.h.
Link Library: Dmusic.lib.

See Also

Using Transitions | DMUS_COMMANDT_TYPES | IDirectMusicComposer::AutoTransition

 Last updated on Monday, April 12, 2004

© 1992-2002 Microsoft Corporation. All rights reserved.