Microsoft DirectX 9.0 SDK Update (Summer 2004) |
Using Templates
A template is a segment that can be used in composing a playable segment of music at run time. The template sets the length of the segment and any loop points. It can provide the command track, which controls changes in the
There are two ways to obtain a template:
- Load it from a segment file or resource, and request the IDirectMusicSegment8 interface.
- Create it from a shape, using the IDirectMusicComposer8::ComposeTemplateFromShape method. You choose the length, the overall shape, whether intro and end embellishment patterns are to be played, and how long the ending is to be. You get back a pointer to the IDirectMusicSegment interface from which you can obtain IDirectMusicSegment8.
After you have obtained a template segment object, you can pass it to the IDirectMusicComposer8::ComposeSegmentFromTemplate method, along with pointers to a
See Also
© 2004 Microsoft Corporation. All rights reserved.