Microsoft DirectX 8.1 (Visual Basic)

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 objects for them. See Loading Audio Data.

The following table summarizes the types of file objects you will encounter. Any of these objects can also be obtained from a resource by the corresponding method, such as DirectMusicLoader8.LoadBandFromResource.

Element DirectMusicLoader8 method Class File type
Band LoadBand DirectMusicBand8 bnd
Chordmap LoadChordMap DirectMusicChordMap8 cdm
DLS collection LoadCollection DirectMusicCollection dls
Segment LoadSegment DirectMusicSegment8 sgt
Style LoadStyle DirectMusicStyle8 sty

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 don't need separate files for those elements.

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