Platform SDK: DirectX

DirectMusicComposer.ComposeSegmentFromShape

The DirectMusicComposer.ComposeSegmentFromShape method creates an original segment from a style and a chord map, based on a predefined shape. The shape represents the way chords and embellishments occur over time across the segment.

object.ComposeSegmentFromShape(style As DirectMusicStyle, _
    numberOfMeasures As Integer, _
    shape As Integer, _
    activity As Integer, _
    bIntro As Boolean, _
    bEnd As Boolean, _
    chordmap As DirectMusicChordMap) As DirectMusicSegment

Parameters

object
Object expression that resolves to a DirectMusicComposer object.
style
Style from which to compose the segment.
numberOfMeasures
Length, in measures, of the segment to be composed.
shape
Shape of the segment to be composed, based on changes in the groove level. Possible values are of the CONST_DMUS_SHAPET_TYPES enumeration.
activity
Rate of harmonic motion. Valid values are from 0 through 3. Lower values mean more chord changes.
bIntro
True if an introduction is to be composed for the segment, False otherwise.
bEnd
True if an ending is to be composed for the segment, False otherwise.
chordmap
DirectMusicChordmap from which to create the segment.

Return Values

If the method succeeds, it returns a DirectMusicSegment object.

Error Codes

If the method fails, it raises an error, and Err.Number is set.

See Also

DirectMusicComposer.ComposeSegmentFromTemplate, DirectMusicComposer.ComposeTemplateFromShape