Custom Instruments

Windows Media Encoder SDK banner art

In this scenario, you want your music to be played on instruments not present in the standard set distributed with DirectMusic. You might even want to play nonmusical sound effects as notes. The support for the Downloadable Sounds standard offered by DirectMusic and DirectMusic Producer enables you to do this. You can create custom instruments and put them in collections for distribution with your content files. When the content is played using your DLS collection, it will sound the same on all systems.

When implementing this scenario, consider the following:

  • DirectMusic applications always have access to the instruments in the GM/GSĀ® Sound Set, which is licensed from Roland Corporation. This set, contained in GM.dls, includes many musical instruments and simple sound effects.
  • An instrument can be based on any sound, not just a musical timbre. You can alter the pitch just as with a musical instrument. For example, you could create an instrument from an engine sound and play different notes to represent different engine speeds.
  • Use regions and layers within instruments to trigger different sounds according to the pitch and velocity being played.
  • Instrument sounds are not intrinsic to a segment. It is the responsibility of the application developer to ensure that the DLS instruments are available on the synthesizer. Instruments are assigned to performance channels by a band, which might be activated either by a band track in the segment or by the application.

Concepts

How-to