HTTXPlugin V2.0


URL  : file://localhost/SD0:DBM format.htm
Title: DBM format



                                   [Image]

DBM is IFF like format. It means that module consists of hunks. Each hunk has
a 4 bytes identification and after that hunk length (LWORD - 4bytes). If the
 module doesn't consist of any hunk, for example VENV - volume envelope hunk
 that will mean this module doesn't use volume envelope effect. These hunks
   DBM module should always consits of: NAME, INFO, SONG, INST, PATT, SMPL

                           Mode Length Desciption
                    0 4 ID "DBM0" - module identification
                            4 2 tracker version:
                            eg. $0200 - version 2.00
                                6 2 reserved
               8 4 ID "NAME" - module name hunk identification
                              +4 4 hunk length
                               +8 44 mod name
                               ??? 4 ID "INFO"

                              +4 4 hunk length
                    +8 2 number of instruments in module
                      +10 2 number of samples in module
                       +12 2 number of songs in module
                     +14 2 number of patterns in module
                          +16 2 number of channels
                 ??? 4 ID "SONG" - songs hunk identification
                              +4 4 hunk length
                              +12 44 song name
                    +56 2 number of orders for this song
          +58 ??? order list (words) NOTE: Each order list can use
                          the same numbers of patterns.
              ??? 4 ID "INST" - instruments hunk identification
                              +4 4 hunk length
                            +8 30 instrument name
                 +38 2 sample number used in this instrument
                           +40 2 instrument volume
                  +42 4 instrument finetune (stored in HZ)
                        +46 4 instrument repeat start
                       +50 4 instrument repeat length
                                +54 4 flags:
                          bit 0 set - forward loop uesd
                         bit 1 set - ping pong loop uesd
               ??? 4 ID "PATT" - patterns hunk identification
                              +4 4 hunk length
                 +8 2 number of positions (rows) in pattern
                          +10 4 size of packed data
                         +14 ??? packed pattern data
                ??? 4 ID "SMPL" - samples hunk identification
                              +4 4 hunk length
                                 +8 4 flags:
                            bit 0 set - 8 bit sample
                            bit 1 set - 16 bit sample
                            bit 2 set - 32 bit sample
                             +12 4 sample length
                       +16 ??? sample data (unsigned)
           ??? 4 ID "VENV" - volume envelopes hunk identification
                              +4 4 hunk length
         +8 2 how many volume envelope tables does this hunk contain
         +10 2 to which instrument this volume envelope data belongs
                        +12 134 volume envelope data




                 o Each volume envelope table takes 134 bytes.
                         o Max. number of points is 32.
                     o Max. number of sustain points is 2.
                          o Max. number of loops is 1.

                          Offset Length Description
                      +0 1 type bit 0: envelope on/off
                            bit 1: 1st sustain on/off
                           bit 2: envelope loop on/off
                            bit 3: 2nd sustain on/off
                       +1 1 number of envelope points
                           +2 1 1st sustain point
                            +3 1 loop start point
                             +4 1 loop end point
                           +5 1 2nd sustain point
                                +6 1 reserved
                      +8 2 1st point time (in vblanks)
                    +10 2 1st point volume (range: 0-64)
                      +12 2 2nd point time (in vblanks)
                    +14 2 2nd point volume (range: 0-64)
                                  +16 2 ...





                    Here is a pattern format description:



If the byte is zero it means that you must skip to next position (row).
If the byte is nonzero bits are interpreted as follows:

                        o bit 0 set: Note follows (byte)
                 o bit 1 set: Instrument number follows (byte)
                  o bit 2 set: 1st effect type follows (byte)
                o bit 3 set: 1st effect parameter follows (byte)
                  o bit 4 set: 1st effect type follows (byte)
                o bit 5 set: 1st effect parameter follows (byte)

          Next byte is a channel number to which this data belongs.





                                  Example:

                      o 00 - skip to next pattern position
                      o 00 - skip to next pattern position
    o 03 - byte is nonzero; the bit 0 and 1 is set; take note and instrument
             o 24 - channel number to which following data belongs
           o 81 - note (hex: $51 - this is a 5th octave and 1st note)
                            o 04 - instrument number


 I think these informations are enough at the moment - the format is rather
 self - explaining. But if you have any problems you can always contact me.



    ---------------------------------------------------------------------

Main | Copyrights | Requirements | Features | Authors | History | Register |
               Formats | Effects | Keyboard | DBM | Envelopes

 DSP | TB303 | Links | XMs & MODs | Benchmarks | Problems | Future | Greets


              Copyright  1997-1999 Digital Multimedia Software
                          Designed by Tomasz Piasta
                             All Rights Reserved

