DLS Download Support

If you are writing your own synthesizer, you also have to provide support for downloadable sounds (DLS) so that the application can convert MIDI note messages to particular instrument sounds. Specifically, you should implement your IDirectMusicSynth::Download method so that it can download instrument wave and articulation data to the synthesizer. This method should accept raw data (typically from a collection file) and store it in a form that can be used by your rendering engine.

When DirectMusic downloads DLS data to the driver, the format of the data buffer is defined in terms of several DirectMusic structures. The downloaded data begins with two structures:

DMUS_DOWNLOADINFO

A fixed-size header describing the information that is being downloaded.

DMUS_OFFSETTABLE

An offset table that follows the header and describes the offsets of the various chunks of information within the downloaded data.

Following the offset table is the actual data, which can begin with either of the following:

DMUS_INSTRUMENT

A structure describing a DLS instrument.

DMUS_WAVEDATA

A structure containing a chunk of wave data in PCM format.

For more information about these data structures and the data formats that are used to download instrument and wave data, see the discussion of DirectMusic low-level DLS in the Microsoft Windows SDK documentation.

The DLS data format is identical in kernel and user modes.

The KSPROPSETID_Synth_Dls property set contains properties that are used to download DLS samples and instruments to a DirectMusic synthesizer. This property set can be used to download both DLS Level 1 and DLS Level 2 data. Only the format of the downloaded data changes between DLS Levels 1 and 2.

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft