Microsoft DirectX 8.1 (C++) |
In the past, most computer audio has been produced in one of two fundamentally different ways, each with its advantages and disadvantages:
One way to combine the advantages of digital sampling with the compactness and flexibility of MIDI is wave-table synthesis—the synthesis of instrument sounds from digital samples. These samples are obtained from recordings of real instruments and then stored on the hardware. The samples are looped and adjusted in such a way as to produce sounds of any length at various pitches and volumes.
Wave-table synthesis produces more realistic timbres than algorithmic FM synthesis but is still limited to a fixed set of instruments. Also, a particular instrument might sound different on different pieces of hardware, depending on the manufacturer's implementation of that instrument.
Enter the Downloadable Sounds (DLS) standard, published by the MIDI Manufacturers Association. DLS is a way of allowing wave-table synthesis to be based on samples provided at run time rather than hard-wired into the system. The data describing an instrument is downloaded to the synthesizer, and then the instrument can be played like any other MIDI instrument. Because DLS data can be distributed as part of an application, developers can be sure that their soundtracks will be delivered uniformly on all systems. Moreover, they are not limited in their choice of instruments.
A DLS instrument is created from one or more digital samples, typically representing single pitches, which are then modified by the synthesizer to create other pitches. Multiple samples are used to make the instrument sound realistic over a wide range of pitches. When a DLS instrument is downloaded, each sample is assigned to a certain range of pitches, called a region.
DLS Level 2 allows every note to occupy its own region. Moreover, the timbre for each region can be made up of multiple samples, called layers, and different layers can be triggered depending on the velocity of the note. A single instrument can thus be used to produce thousands of different sounds.
In addition, samples can be given an articulation, which defines characteristics that make the sound more like that produced by a real instrument. Articulation includes envelopes, or shapes, for the volume and pitch of the sound and a low-frequency oscillator (LFO) to provide vibrato and tremolo.
Samples can be loopable or single-shot. A loopable sample plays repeatedly for the duration of the note. A single-shot sample plays only once.
DLS data is stored in instrument collections, from which it is downloaded to the synthesizer.
DLS instruments are assigned patch numbers and respond to MIDI messages just like other MIDI instruments. However, a DLS instrument does not have to belong to the General MIDI set. In fact, it doesn't have to represent a musical instrument at all. Any sound, even a fragment of speech or a fully composed measure of music, can be associated with a DLS instrument.
For more information on DLS collections and how instruments are created, see the documentation for DirectMusic Producer. To learn more about the DLS standard, consult the document "Downloadable Sounds Level 2", available from the MIDI Manufacturers Association.
Most applications don't have to deal directly with instruments or DLS data. The opening of collections and downloading of instrument data is handled by the band object. When you download a band, all the instrument data associated with that band is downloaded as well. For more information, see Using Bands.