Difference between revisions of "BRSEQ (File Format)"

From Custom Mario Kart
Jump to navigation Jump to search
m
m (→‎Tools: download for rseq2midi is broken (it was the only tool linked btw))
Line 77: Line 77:
 
= Tools =
 
= Tools =
 
The following tools can handle BRSEQ files:  
 
The following tools can handle BRSEQ files:  
* [http://www.mediafire.com/?8a27rvo5cfni5ae rseq2midi] (Converts BRSEQ to MIDI)
+
* rseq2midi (Converts BRSEQ to MIDI)
  
 
[[Category:File Format/Wii]]
 
[[Category:File Format/Wii]]

Revision as of 20:33, 15 December 2021

BRSEQ (Binary Revolution SEQuence) is a sub file format found in BRSAR files from games like Mario Kart Wii. It corresponds to the music data represented in a MIDI-like file, but in binary. Commands that process changes in attributes such as sound generation and volume change over time are described on this kind of file. Since the sequence data is simply a set of commands, sounds are actually producing using bank data (stored in BRBNK sub files) that corresponds to the sound source data.

File Format

File Header

The file starts with a file header that is 0x20 bytes long.

Offset Type Description
0x00 String File magic. Always RSEQ in ASCII.
0x04 UInt16 Byte order mark (BOM): The value is always 0xFEFF. If value 0xFFFE is read, then the false endian is used. Mario Kart Wii uses nearly always big endian (bytes 0xFE,0xFF).
0x06 UInt16 Version number of the file format.
0x08 UInt32 Length of the file in bytes.
0x0C UInt16 Length of this header in bytes.
0x0E UInt16 Number of sections.
0x10 UInt32 Offset to DATA section.
0x14 UInt32 Length of DATA section.
0x18 UInt32 Offset to LABL section.
0x1C UInt32 Length of LABL section.
0x20 End of this file header

DATA

The DATA starts with a header.

Offset Type Description
0x00 String Section magic. Always DATA in ASCII.
0x04 UInt32 Length of this section.
0x08 UInt32 Length of this header (always 0x0C).

After the header, the sound data is specified. It contains different commands and parameters for the sound.

LABL

Offset Type Description
0x00 String Section magic. Always LABL in ASCII.
0x04 UInt32 Length of this section.
0x08 UInt32 N = Number of sound labels.
0x0C UInt32[N] Offset to label, relative to offset 0x08 in this header.

This is the label structure.

Offset Type Description
0x00 UInt32 Offset to the sound data this label uses. Relative to the end of the DATA header.
0x04 UInt32 L = Length of label string.
0x08 String Label name.

Tools

The following tools can handle BRSEQ files:

  • rseq2midi (Converts BRSEQ to MIDI)