How DirectMusic and DirectMusic Producer Work Together
Applications that use the DirectMusic application programming interface (API) are not restricted to playing content from DirectMusic Producer. They can play wave and MIDI files, and can construct music and sound effects by playing individual notes on available DLS instruments. However, the full power of DirectMusic can be unleashed only with files authored in DirectMusic Producer.
Using DirectMusic Producer content, an application can:
- Play music or sound effects with automatic variations, ranging from subtle changes in the timing to different patterns of notes.
- Change the choice of patterns in the soundtrack by setting a value called the groove level.
- Synchronize different pieces of music on rhythmic boundaries.
- Synchronize other events in the application with the rhythm; for example, display graphics in time with music.
- Compose a musical piece at run time, based on note and chord patterns authored in DirectMusic Producer.
- Compose smooth transitions between pieces of music at run time, even when the current piece is interrupted.
- Play different musical parts on different audiopaths, so that different effects and 3-D positioning can be applied to different band instruments or other sounds within a single file.
- Use scripts to give the sound designer more immediate control over the soundtrack.
The main type of file used by most DirectMusic applications is the segment. A segment is a self-contained unit that can be loaded and played with just a few simple commands. It may also contain short sounds called motifs that can be played separately.
In the context of a DirectMusic application, there are two types of segment: primary and secondary. One segment is played as the primary segment, and any number of segments can be played along with it as secondary segments. One segment, usually the primary segment, is designated as the controlling segment, and controls global parameters such as tempo and chords.
Note The DirectMusic application is responsible for specifying whether a segment is played as the primary segment or as a secondary segment, regardless of the segment's role within the DirectMusic Producer environment.
Playing authored segments is the most common scenario in a DirectMusic application, but DirectMusic also has composition capabilities which enable an application to construct segments at run time from supplied style and chordmap files. Applications can also make use of DLS collections, bands, and audiopaths that you create in DirectMusic Producer.
See Also