Downloadable Sounds (DLS) format

Files with the format Downloadable Sounds (DLS) contain sampled audio data and information about how these samples should be played. More specifically, DLS files contain Wave samples for various notes on various instruments (piano, guitar, etc.). These wave samples are designed to be used by MIDI synthesizers when synthesizing sound for MIDI messages.

For example, if a MIDI synthesizer that uses the DLS file receives a MIDI note on message that says that the synthesizer should play the note C on a piano, the synthesizer will find the wave sample for the note C on a piano in the DLS file and will play this sample.

The following are interesting aspects of the DLS file format.

  • A DLS file does not necessarily contain separate samples for all notes on all available instruments. One and the same wave sample can be pitch shifted to play different notes. The DLS file specifies which sample can be used for which notes.
  • Wave samples are stored with the Wave file format, but are not necessarily designed to be played from beginning through to the end. If the specific note to be played must be sustained, the DLS file may specify what portion of the sampled audio data in the wave sample must be repeated over and over to achieve the sustain.
  • Wave samples are accompanied with information on how the samples should be played. This may include what portion of the sample should be repeated to achieve sustain as described above. This may also include information such as how quickly the amplitude of the note played should increase and decay, whether there should be oscillations in pitch or amplitude, and other.

DLS top level chunks

The DLS file format extends the Resource Interchange File Format (RIFF) file structure and hence data is organized in chunks. Each chunk contains information about its type and size and can easily be skipped by software that does not understand the specific chunk type.

The following are top-level chunks that may be present in a DLS file (i.e., chunks that are not sub-chunks of other chunks).

Collection header
Conditional
DLS ID
Instrument list
Info list (see List chunk (of a Wave file))
Pool table
Version
Wave pool list

Some of these chunks can exist not only as top-level chunks, but also as sub-chunks of other chunks. The DLS ID chunk, for example, is simply a globally unique identifier. It can contain a globally unique identifier for the DLS file, when a top-level chunk, or a unique identifier some other chunk or sub-chunk, when a sub-chunk to it.

Other DLS chunks

The following are other chunks that may be present in a DLS file, as sub-chunks of a top-level chunk or as sub-chunks of another sub-chunk.

Articulation
Articulation list
Instrument header
Instrument
Region
Region header
Region list
Wave link
Wave list
Wave sample

The wave list chunk is the actual wave sample. It is a LIST chunk with the type "wave", which is specific to the DLS file format. However, sub-chunks of this chunk can include chunks that are defined in the Wave file format. Typically, this chunk will contain at least the following two Wave chunks.

Format
Data

DLS use of the RIFF LIST chunk

DLS files format make heavy use of LIST chunks. The instrument, info, and wave pool list chunks are list chunks with chunk identifications "LIST", but with different list types.

Some of the top-level chunks contain sub-chunks that are also LIST chunks and some of the sub-chunks of these sub-chunks can also be LIST chunks. For example:

  • The instrument list chunk is a LIST chunk. It contains the list of instruments that the DLS file can be used to play.
  • The instruments themselves are LIST chunks. They contain information on the instrument, as well as on the notes that the instrument can play and the way these notes should be played.
  • One of the sub-chunks of each instrument is a list of regions. The region list is a LIST chunk. An individual region is an interval of notes that can be played by the same sample.
  • The region itself is also a LIST chunk. It points to a specific wave sample and contains information on how this sample should be played (articulated).
  • The articulation information is also a LIST chunk. It contains individual articulators. Each individual articulator provides an individual piece of articulation information (e.g., the rate of decay of the note).

Except for the LIST chunk of type INFO, which is a part of the RIFF specifications, the remaining DLS LIST chunks are specific to the DLS file format. This includes the instrument list, instruments, regions, articulation lists, and so on.

Structure of the DLS file

The DLS file begins as follows.

Byte sequence description Length in bytes Starts at byte Value
RIFF ID 4 0x00 The ASCII character string "RIFF"
size 4 0x04 The size of the DLS file (number of bytes) less 8 (less the size of "RIFF" and the "size")
RIFF type ID 4 0x08 The ASCII character string "DLS " (with the space)
DLS chunks various 0x0C Various chunks. An example structure is below

The following is the structure (chunks) of an example DLS file. This is only an example and not all DLS files have this exact same structure.

  • Collection header chunk
  • Version chunk
  • Instrument list chunk
    • Instrument chunk
      • DLS ID chunk
      • Instrument header chunk
      • Articulation list
        • Articulation chunk
        • Articulation chunk
      • Region list chunk
        • Region chunk
          • Region header chunk
          • Wave link chunk
          • Wave sample chunk
          • Articulation list chunk
            • Articulation chunk
            • Articulation chunk
        • Region chunk
          • Region header chunk
          • Wave link chunk
          • Wave sample chunk
          • Articulation list chunk
            • Articulation chunk
            • Articulation chunk
    • Instrument chunk
  • Pool table chunk
  • Wave pool list chunk
    • Wave list chunk
      • DLS ID chunk
      • Format chunk (of the Wave file format)
      • Data chunk (of the Wave file format)
      • Wave sample chunk
    • Wave list chunk
      • DLS ID chunk
      • Format chunk (of the Wave file format)
      • Data chunk (of the Wave file format)
      • Wave sample chunk

In this file:

  • The collection header chunk specifies the number of instruments in the DLS file.
  • The version chunk specifies the version of the DLS file.
  • The instrument list chunk lists the instruments.
    • The DLS ID chunk contains globally unique ID for the instrument.
    • The instrument header chunk specifies the number of regions, the MIDI bank, and instrument number for this instrument.
    • The articulation list contains the list of articulators.
      • Each articulator contains something about how the instrument should be played (e.g., how quickly its notes should decay or at what amplitude level the note should be sustained).
    • The region list is the list of regions.
      • Each region contains information about which wave sample should play what notes.
        • The region header contains the group of notes and group of velocities that are covered by the region (and other information).
        • The wave link chunk specifies the index of the cue in the pool table chunk that points to the specific wave sample (and other information).
        • The wave sample chunk describes what note the wave sample will play if not pitch shifted, whether this sample should be tuned, whether the sample can be played through or must be looped, and other information.
        • The articulation list contains a list of articulators. Those are similar to the list of articulators for the instrument. An articulation list can be a part of the instrument chunk and provide information how all notes should be played on the instrument, or it could be a part of the region chunk and provide information on how specific notes on this instrument should be played.
  • The pool table chunk contains the cues that describe where the wave samples are in the wave pool list chunk. These are the cues that wave link chunks in regions point to.
  • The wave pool list chunk contains a list of waves.
    • Each wave is a list that contains, among other things, the format and sampled data of the wave sample.
      • The DLS ID is a globally unique identifier for the wave sample. A DLS ID chunk can be present in essentially any piece of the DLS file, but is not required.
      • The format chunk is the format of the sampled data (i.e., sampling rate, sampling resolution, and so on).
      • The data chunk contains the samples as with any wave file.
      • The wave sample chunk contains the same information as the wave sample chunk in the region chunk.

Other DLS files may differ. For example, they may contain conditional chunks. Articulation data may be specified only for regions and not for instruments, there may be no DLS ID chunks, a LIST chunk with the type INFO can be placed in any other (and all) chunks, and so on.

Example DLS file

The Windows "sound mapper" or "wave mapper" is a virtual synthesizer that plays MIDI files by relying on a DLS file called "gm.dls". On some computers, the file resides in "c:\Windows\SysWOW64\drivers", "c:\Windows\System32\drivers", and a couple of other folders. Roland holds the copyright for the gm.dls file. The file is Roland's 1996 interpretation of what sound data should be used in a MIDI synthesizer and how these data should be used.

Word alignment and endianism

As with all RIFF files, chunks must be word aligned (have an even number of bytes). Thus, for example, if the data of a chunk has an uneven number of bytes, these data are padded with a zero (a zero byte is added). Strings, such as the text contained in the parts of the LIST chunk of type INFO, must also be of even length and will be padded with zero, if of uneven length. The size of the chunk, however, is stored in the DLS chunks as it is (without counting the padding, even or uneven) and this stored size may differ from the actual size, which is always even.

As with wave files, all data in DLS files are stored with the least significant byte first (little-endian).

DLS files and the MIDI specifications

Since DLS files support MIDI synthesizers, there is a fair amount of complementarity between the DLS file format and the MIDI protocol. For example, the DLS specifications include information on how the velocity of a MIDI note on message should be treated, including in terms of note amplitude and, if specified in an articulation, how the velocity of the note may change the attack time (the time it takes the note amplitude to increase from zero to maximum). Much of the DLS format provides detail where the General MIDI specifications do not (see General MIDI 1 and General MIDI 2), specifically for the consistent treatment of wave samples across MIDI synthesizers.

Downloadable Sounds Levels 1 and 2

Downloadable Sounds Level 1 is the first standard published in 1997. Downloadable Sounds Level 2 is an extension of Level 1, produced in 1998. It specifies mainly additional chunks (e.g., for a different type of articulation) and additional types of articulation (e.g., the time to hold a note at a maximum amplitude before decay).

Add new comment

Filtered HTML

  • Freelinking helps you easily create HTML links. Links take the form of [[indicator:target|Title]]. By default (no indicator): Click to view a local node.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.