Skip to content

Latest commit

 

History

History
39 lines (38 loc) · 1.62 KB

Music format specs.md

File metadata and controls

39 lines (38 loc) · 1.62 KB

Wonderswan music format

  • 32 byte header
    • 0x00 - 0x01 Identifier (TBD)
    • 0x02 Default speed
    • 0x03 Pattern count
    • 0x04 - 0x05 Tempo
      • Default value 240 (125bpm)
      • Calculated with 12000*60 / bpm*24
  • 31 x 32 byte instruments
    • 16 bytes info
      • 0x00 Default volume
    • 16 byte waveform (unsigned 4bit packed nybble)
  • 256 byte order list
    • Pattern number 1 byte
    • 0xFF = end of list
  • ?? x 1024 byte patterns
    • 64 rows per pattern
    • 16 bytes per row
    • XX YY ZZ WW XX YY ZZ WW XX YY ZZ WW XX YY ZZ WW
      • XX = pitch
        • 0x00 = no note
        • 0x01 - 0x0c = Octave 0 (Only G-0 to B-0)
        • 0x0d - 0x18 = Octave 1
        • 0x19 - 0x24 = Octave 2
        • 0x25 - 0x30 = Octave 3
        • 0x31 - 0x3c = Octave 4
      • YY = instrument number
      • ZZ WW = Effect + parameters (Protracker)
        • 0x00 - Arpeggio (Protracker compatible)
        • 0x01 - Porta up (NOT Protracker compatible)
        • 0x02 - Porta down (NOT Protracker compatible)
        • 0x05 - Porta to note + Volume slide (Protracker compatible, only volume slide implemented)
        • 0x06 - Vibrato + Volume slide (Protracker compatible, only volume slide implemented)
        • 0x0a - Volume slide (Protracker compatible)
        • 0x0b - Jump to position (Protracker compatible)
        • 0x0c - Set Volume (Protracker compatible)
        • 0x0d - Pattern break (Protracker row jump not implemented)
        • 0x0f - Set Speed (Protracker speed only, no tempo)