Music: Difference between revisions

From LEGO Island Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
Music is stored in Lego Island SI files. SI files are derivatives of the {{Wikipedia|Resource Interchange File Format}} best known as the basis of AVI and WAV files.
Music is stored in Lego Island SI files. SI files are derivatives of the {{Wikipedia|Resource Interchange File Format}} best known as the basis of AVI and WAV files.


All music appears to be 11025Hz Mono Signed 16-bit.
All music appears to be 11025Hz Mono Signed 16-bit. All bytes are little endian.


Music appears to begin with a <code>MxDa</code> and is split into chunks of <code>MxCh</code>. The <code>MxDa</code> header contains information about the PCM audio in the <code>MxCh</code> chunks.
Music appears to begin with a <code>MxDa</code> and is split into chunks of <code>MxCh</code>. The <code>MxDa</code> header contains information about the PCM audio in the <code>MxCh</code> chunks. The first <code>MxCh</code> appears to be information about the remainder of the chunks in the <code>MxDa</code> structure.


'''MxDa Header Specification'''
'''MxDa Header Specification'''
Line 15: Line 15:
| <code>MxCh</code> || 4 || Chunk Header
| <code>MxCh</code> || 4 || Chunk Header
|-
|-
| Audio Format || 26 || 2-byte Integer (Little Endian) - 1 = PCM, others indicate some form of compression
| Sub-Chunk Size || 22 || 4-byte Integer - The remaining size of this chunk after this value
|-
|-
| Number of Channels || 28 || 2-byte Integer (Little Endian) - 1 = Mono, 2 = Stereo
| Audio Format || 26 || 2-byte Integer - 1 = PCM, others indicate some form of compression
|-
|-
| Sample Rate || 30 || 4-byte Integer (Little Endian)
| Number of Channels || 28 || 2-byte Integer - 1 = Mono, 2 = Stereo
|-
|-
| Byte Rate || 34 || 4-byte Integer (Little Endian) Is equal to <code>Sample Rate * Number of Channels * BitsPerSample/8</code>
| Sample Rate || 30 || 4-byte Integer
|-
|-
| Bytes per Sample || 36 || 2-byte Integer (Little Endian) - is equal to <code>Number of Channels * BitsPerSample/8</code>
| Byte Rate || 34 || 4-byte Integer - is equal to <code>Sample Rate * Number of Channels * BitsPerSample/8</code>
|-
|-
| Bits per Sample per Channel || 38 || 2-byte Integer (Little Endian) - 8 = 8-bits, 16 = 16-bits, etc.
| Bytes per Sample || 36 || 2-byte Integer - is equal to <code>Number of Channels * BitsPerSample/8</code>
|-
| Bits per Sample per Channel || 38 || 2-byte Integer - 8 = 8-bit, 16 = 16-bit, etc.
|}
|}

Revision as of 02:34, 18 April 2019

Technical Information

Music is stored in Lego Island SI files. SI files are derivatives of the Resource Interchange File Format best known as the basis of AVI and WAV files.

All music appears to be 11025Hz Mono Signed 16-bit. All bytes are little endian.

Music appears to begin with a MxDa and is split into chunks of MxCh. The MxDa header contains information about the PCM audio in the MxCh chunks. The first MxCh appears to be information about the remainder of the chunks in the MxDa structure.

MxDa Header Specification

Bytes Offset Description
MxDa 0 Identifier
MxCh 4 Chunk Header
Sub-Chunk Size 22 4-byte Integer - The remaining size of this chunk after this value
Audio Format 26 2-byte Integer - 1 = PCM, others indicate some form of compression
Number of Channels 28 2-byte Integer - 1 = Mono, 2 = Stereo
Sample Rate 30 4-byte Integer
Byte Rate 34 4-byte Integer - is equal to Sample Rate * Number of Channels * BitsPerSample/8
Bytes per Sample 36 2-byte Integer - is equal to Number of Channels * BitsPerSample/8
Bits per Sample per Channel 38 2-byte Integer - 8 = 8-bit, 16 = 16-bit, etc.