DirectMusic For The Masses

Output API
By Tom Hays
Gamasutra
November 6, 1998
Vol. 2: Issue 44


Published in Game Developer Magazine, September 1998

Game Developer Magazine
DirectMusic For The Masses
Introduction

History

DirectMusic's Innards

Segments, Tracks and Tools

Programming

The DMS Loader

Output API

Basic Playback

Layers

Composing With Producer

How Deep Do You Want To Go Today?

The Future

Output API: Instruments and Ports

The basic means by which DirectMusic makes actual sounds come out of the digital-to-analog converters of a game player's PC is DLS. The API represents DLS instruments with the DirectMusicInstrument object, and sets of instruments (Collections and Bands) with the DirectMusicCollection and DirectMusicBand objects. The way any of this gets out of the box is via a Port object.

To use DLS in an application, first you must have one or more files full of DLS instruments, comprising both sample data and associated control (articulation) data. This industry-standard (not just Microsoft's) file type is known as a DLS Collection. As a simple enhancement to General MIDI, you can use the General MIDI/GS DLS collection bundled with DirectMusic. This way, all of your users will hear the same sounds, and you won't play sound-card roulette.

Of course, using the stock GS set sort of misses the point of using custom sounds. The better way is to have your crack team of composers and sound designers deliver custom DLS collections comprising instruments specifically developed to go along with your game's music. Sound designers can also supply DirectMusic bands, which are detailed references to DLS data in one or more collections (Figure 4).

Figure 4: DirectMusic DLS Band
Figure 4:
DLS Device: Band/ Instrument Relationships
Basic Playback  Next Page