Platform SDK: DirectX

Music Files for Composition

When programming for DirectMusic composition, you will use a variety of files produced in a tool such as DirectMusic Producer. You load these elements into the application as COM objects and obtain interfaces to them. (See DirectMusic Loader.)

The following table summarizes the types of files that you will encounter.

[C++]

The Class GUID is the value that you put in the guidClass member of the DMUS_OBJECTDESC structure when loading the object.

Element Class GUID Interface File type
Band CLSID_DirectMusicBand IDirectMusicBand .bnd
DLS collection CLSID_DirectMusicCollection IDirectMusicCollection .dls
Chord map CLSID_DirectMusicChordMap IDirectMusicChordMap .cdm
Segment CLSID_DirectMusicSegment IDirectMusicSegment .sgt
Style CLSID_DirectMusicStyle IDirectMusicStyle .sty
Template CLSID_DirectMusicSegment IDirectMusicSegment .tpl

[Visual Basic]
Element DirectMusicLoader method Class File type
Band LoadBand DirectMusicBand .bnd
DLS collection LoadCollection DirectMusicCollection .dls
Chord map LoadChordMap DirectMusicChordMap .cdm
Segment LoadSegment DirectMusicSegment .sgt
Style LoadStyle DirectMusicStyle .sty
Template LoadSegment DirectMusicSegment .tpl

Note  Bands can be authored as part of a style, in which case they are automatically loaded when the style is loaded. Similarly, styles and bands can be authored into a segment, in which case you do not need separate files for those elements.

Files can also contain references to other files. If a style contains a reference to a band, the band is automatically loaded when the style is, provided the loader can find the band file.