DirectX SDK |
The DirectMusicComposer.ComposeSegmentFromTemplate method creates an original segment from a style, a chord map, and a template.
object.ComposeSegmentFromTemplate( _ style As DirectMusicStyle, _ templateSeg As DirectMusicSegment, _ activity As Integer, _ chordmap As DirectMusicChordMap) As DirectMusicSegment
If the method succeeds, it returns a DirectMusicSegment object.
If the method fails, it raises an error, and Err.Number can be set to one of the following values:
DMUS_E_INVALIDARG |
If style is not Nothing, it is used in composing the segment; if it is Nothing, a style is retrieved from the template specified in templateSeg. Similarly, if chordmap is not Nothing, it is used in composing the segment; if it is Nothing, a chord map is retrieved from the template.
If style is Nothing and there is no style track in the template, or chordmap is Nothing and there is no chord-map track, the method returns DMUS_E_INVALIDARG.
The length of the segment is equal to the length of the template passed in.
DirectMusicComposer.ComposeSegmentFromShape, DirectMusicComposer.ComposeTemplateFromShape