BRS (File Format): Difference between revisions

From Luma's Workshop
Jump to navigation Jump to search
No edit summary
(Added tag)
Line 1: Line 1:
[[category:File formats]]
'''BRS''' ('''B'''inary '''R'''emix '''S'''equence) files contain sequence data for the NoteFairy (Rainbow Notes) object. ''Super Mario Galaxy'' and ''Super Mario Galaxy 2'' each contain only one '''BRS''' file, located in <code>AudioRes/Info/JaiRemixSeq.arc/brs/defaultremixseq.brs</code>.
'''BRS''' ('''B'''inary '''R'''emix '''S'''equence) files contain sequence data for the NoteFairy (Rainbow Notes) object. ''Super Mario Galaxy'' and ''Super Mario Galaxy 2'' each contain only one '''BRS''' file, located in <code>AudioRes/Info/JaiRemixSeq.arc/brs/defaultremixseq.brs</code>.



Revision as of 14:25, 14 December 2024

BRS (Binary Remix Sequence) files contain sequence data for the NoteFairy (Rainbow Notes) object. Super Mario Galaxy and Super Mario Galaxy 2 each contain only one BRS file, located in AudioRes/Info/JaiRemixSeq.arc/brs/defaultremixseq.brs.

Header

The BRS format contains no header magic like most files do. Instead, it consists of a Sequence Count and Pointers. The size of the header is 0x4 + (Sequence Count x 0x4):

Offset Type Description
0x00 UInt32 (0x4) Sequence Count

Offsets

Each pointer holds the offset of a Sequence relative to the beginning of the file and is formatted like this:

Offset Type Description
0x00 UInt32 (0x4) Offset

Sequence Header

Each sequence's header consists of a Track and Note Count:

Offset Type Description
0x00 UInt32 (0x4) Track Count
0x04 UInt32 (0x4) Note Count

Note Duration (?)

The header is followed by a section that (presumably) defines the duration of each Note. This section's size is Note Count x 0x4.

Offset Type Description
0x00 UInt32 (0x4) Note Duration (?)

Track

Each Track starts by defining its instrument (0x4), followed by the individual Key-presses for a Note (0x10 each). There is no padding between Tracks.

Instrument

Offset Type Description
0x00 ??? (0x2) Likely unused
0x02 UInt8 (0x1) Set Bank
0x03 UInt8 (0x1) Set Prog

Key

Offset Type Description
0x00 UInt32 (0x4) Key (0x00 = C-1, 0x60 = C4 (middle C), 0x7F = G9, FFFFFFFF = None)
0x04 UInt32 (0x4) Velocity
0x08 UInt32 (0x4) Duration
0x0C UInt32 (0x4) Delay

Sequences in SMG & SMG2

A sequence can be defined in Obj_arg4 for the NoteFairy object. The following sequences are available in both games:

Obj_arg4 Name Note Count Notes
0 Super Mario Bros. main theme (long) 13 Unused
1 Super Mario Bros. main theme (short) 7 Unused
2 Super Mario Bros. underground theme 43
3 Super Mario Bros. main theme (short) 7 Unused
4 Super Mario Bros. underwater theme 46
5 Super Mario World bonus room theme 64