SMR.szs: Difference between revisions
(Added volume and cit references) |
(BSC section) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
{{WIP}} | {{WIP}} | ||
SMR.szs is a compressed BAA | '''SMR.szs''' is a compressed '''BAA''' file ('''B'''inary '''A'''udio '''A'''rchive) which defines the game's sound system. It contains references to [[AST (File Format)|streamed]] and [[BMS (File Format)|sequenced]] music files as well as data for sound effects and instruments. It can be found in various JAudio games, however the specifications below mainly apply to ''Super Mario Galaxy'' and ''Super Mario Galaxy 2''.<br> | ||
<br> | |||
The following files are directly linked to SMR.szs: | |||
* [[BgmParam|AudioRes/Info/BgmParam.arc]] (SMG2 only, overrides the BGM and STM volume parameter) | |||
* [[CIT (File Format)|AudioRes/Info/JaiChord.arc]] (SMR.szs links BGM labels to CIT file IDs within this archive) | |||
* [[BMS (File Format)|AudioRes/Seqs/JaiSeq.arc]] (SMR.szs links BGM labels to BMS file IDs within this archive) | |||
* [[AST (File Format)|AudioRes/Stream/*.ast]] (SMR.szs links STM labels to AST files) | |||
* [[AW (File Format)|AudioRes/Waves/*.aw]] (SMR.szs defines the contents of AW files) | |||
The following files are indirectly linked to SMR.szs: | |||
* [[ActionSound|AudioRes/Info/ActionSound.arc]] (SMG2 only, links hardcoded triggers for all objects to sound effects in SMR.szs) | |||
* AudioRes/Info/JaiMe.arc (References instruments from SMR.szs) | |||
* [[BRS (File Format)|AudioRes/Info/JaiRemixSeq.arc]] (References instruments from SMR.szs) | |||
* [[MultiBgmInfo|AudioRes/Info/MultiBgmInfo.arc]] (SMG2 only, connects MBGM labels to STM and BGM labels, allowing streamed and sequenced audio to play simultaneously) | |||
* [[SoundIdToInstList|AudioRes/Info/SoundIdToInstList]] (SMG2 only, references Sound IDs and instruments from SMR.szs and allows loading AW files) | |||
* AudioRes/Info/StageBgmInfo.arc (SMG2 only, controls the [[ScenarioBgmInfo|main music]] and [[StageBgmInfo|music changes]] for all stages)<br><br> | |||
==Header== | |||
The header contains offsets to all files included in SMR.szs: | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x00 | |||
| Magic (0x4) | |||
| <code>AA_<</code> (0x41415F3C) | |||
|- | |||
| 0x04 | |||
| Magic (0x4) | |||
| <code>bst </code> (0x62737420) | |||
|- | |||
| 0x08 | |||
| UInt32 (0x4) | |||
| Offset to [[SMR.szs#BST|BST]] section start | |||
|- | |||
| 0x0C | |||
| UInt32 (0x4) | |||
| Offset to BST section end | |||
|- | |||
| 0x10 | |||
| Magic (0x4) | |||
| <code>bstn</code> (0x6273746E) | |||
|- | |||
| 0x14 | |||
| UInt32 (0x4) | |||
| Offset to [[SMR.szs#BSTN|BSTN]] section start | |||
|- | |||
| 0x18 | |||
| UInt32 (0x4) | |||
| Offset to BSTN section end | |||
|- | |||
| 0x1C | |||
| Magic (0x4) | |||
| <code>bsc </code> (0x62736320) | |||
|- | |||
| 0x20 | |||
| UInt32 (0x4) | |||
| Offset to [[SMR.szs#BSC|BSC]] section start | |||
|- | |||
| 0x24 | |||
| UInt32 (0x4) | |||
| Offset to BSC section end | |||
|- | |||
| 0x28 + N * 0x10 | |||
| Magic (0x4) | |||
| <code>ws </code> (0x77732020) | |||
|- | |||
| 0x28 + N * 0x10 + 0x4 | |||
| UInt32 (0x4) | |||
| WSYS file ID (N) | |||
|- | |||
| 0x28 + N * 0x10 + 0x8 | |||
| UInt32 (0x4) | |||
| Offset to [[SMR.szs#WSYS|WSYS]] file | |||
|- | |||
| 0x28 + N * 0x10 + 0xC | |||
| UInt32 (0x4) | |||
| Unknown (mostly 0x00000000, once seen as 0xFFFFFFFF) | |||
|- | |||
| 0x38 + N * 0x10 + M * 0xC | |||
| Magic (0x4) | |||
| <code>bnk </code> (0x626E6B20) | |||
|- | |||
| 0x38 + N * 0x10 + M * 0xC + 0x4 | |||
| UInt32 (0x4) | |||
| IBNK file ID (M) | |||
|- | |||
| 0x38 + N * 0x10 + M * 0xC + 0x8 | |||
| UInt32 (0x4) | |||
| Offset to [[SMR.szs#IBNK|IBNK]] file | |||
|- | |||
| 0x44 + N * 0x10 + M * 0xC | |||
| Magic (0x4) | |||
| <code>>_AA</code> (0x3E5F4141) | |||
|} | |||
==BST== | |||
The '''B'''inary '''S'''ound '''T'''able contains parameters for all music and sound effects | |||
===BST Header=== | |||
size: 0x20 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x00 | |||
| Magic (0x4) | |||
| <code>BST </code> (0x42535420) | |||
|- | |||
| ? | |||
| ? | |||
| | |||
|- | |||
| 0x08 | |||
| UInt8 (0x1) ? | |||
| Unknown. 0x01 in SMG and SMG2 | |||
|- | |||
| ? | |||
| ? | |||
| | |||
|- | |||
| 0x0C | |||
| UInt32 (0x4) | |||
| Offset to [[SMR.szs#BST main table|BST main table]] | |||
|- | |||
| 0x10 | |||
| Padding (0x10) | |||
| | |||
|} | |||
===BST main table=== | |||
size: (N + 1) * 0x4 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x00 | |||
| UInt32 (0x4) | |||
| Amount N of entries (3 in SMG and SMG2) | |||
|- | |||
| 0x04 | |||
| UInt32 (0x4) | |||
| Offset to [[SMR.szs#SE table|SE table]] | |||
|- | |||
| 0x08 | |||
| UInt32 (0x4) | |||
| Offset to [[SMR.szs#BGM table|BGM table]] | |||
|- | |||
| 0x0C | |||
| UInt32 (0x4) | |||
| Offset to [[SMR.szs#STREAM table|STREAM table]] | |||
|} | |||
===SE table=== | |||
size: (N + 1) * 0x4 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x00 | |||
| UInt32 (0x4) | |||
| Amount N of entries (0xE in SMG and SMG2) | |||
|- | |||
| 0x04 | |||
| UInt32 (0x4) | |||
| Offset to SYSTEM table | |||
|- | |||
| 0x08 | |||
| UInt32 (0x4) | |||
| Offset to PLAYER_VOICE table | |||
|- | |||
| 0x0C | |||
| UInt32 (0x4) | |||
| Offset to PLAYER_MOTION table | |||
|- | |||
| 0x10 | |||
| UInt32 (0x4) | |||
| Offset to BOSS_VOICE table | |||
|- | |||
| 0x14 | |||
| UInt32 (0x4) | |||
| Offset to BOSS_MOTION table | |||
|- | |||
| 0x18 | |||
| UInt32 (0x4) | |||
| Offset to OBJECT table | |||
|- | |||
| 0x1C | |||
| UInt32 (0x4) | |||
| Offset to ATMOSPHERE table | |||
|- | |||
| 0x20 | |||
| UInt32 (0x4) | |||
| Offset to DEMO table | |||
|- | |||
| 0x24 | |||
| UInt32 (0x4) | |||
| Offset to ENEMY_VOICE table | |||
|- | |||
| 0x28 | |||
| UInt32 (0x4) | |||
| Offset to ENEMY_MOTION table | |||
|- | |||
| 0x2C | |||
| UInt32 (0x4) | |||
| Offset to SUPPORTER_VOICE table | |||
|- | |||
| 0x30 | |||
| UInt32 (0x4) | |||
| Offset to SUPPORTER_MOTION table | |||
|- | |||
| 0x34 | |||
| UInt32 (0x4) | |||
| Offset to REMIX_SEQ table | |||
|- | |||
| 0x38 | |||
| UInt32 (0x4) | |||
| Offset to HOME_BUTTON_MENU table | |||
|} | |||
Each of the referenced tables are defined identically, see [[SMR.szs#SE parameter table|SE parameter table]]. | |||
===BGM table=== | |||
size: (N + 1) * 0x4 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x00 | |||
| UInt32 (0x4) | |||
| Amount N of entries (2 in SMG and SMG2) | |||
|- | |||
| 0x04 | |||
| UInt32 (0x4) | |||
| Offset to MAIN_BGM table | |||
|- | |||
| 0x08 | |||
| UInt32 (0x4) | |||
| Offset to MULTI_BGM table | |||
|} | |||
Each of the referenced tables are defined identically, see [[SMR.szs#BGM parameter table|BGM parameter table]]. | |||
===STREAM table=== | |||
size: (N + 1) * 0x4 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x00 | |||
| UInt32 (0x4) | |||
| Amount N of entries (1 in SMG and SMG2) | |||
|- | |||
| 0x04 | |||
| UInt32 (0x4) | |||
| Offset to [[SMR.szs#STREAM parameter table|STREAM parameter table]] | |||
|} | |||
===SE parameter table=== | |||
size: (N + 2) * 0x4 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x0 | |||
| UInt32 (0x4) | |||
| Amount N of entries | |||
|- | |||
| 0x4 | |||
| UInt32 (0x4) | |||
| Padding? | |||
|- | |||
| 0x8 + N * 0x4 | |||
| UInt8 (0x1) | |||
| Unknown. Always 0x50 | |||
|- | |||
| 0x9 + N * 0x4 | |||
| UInt24 (0x3) | |||
| Offset to [[SMR.szs#SE parameters|SE parameters]] | |||
|} | |||
====SE parameters==== | |||
size: 0x6 for each entry | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x0 | |||
| UInt8 (0x1) | |||
| Volume? | |||
|- | |||
| 0x1 | |||
| UInt8 (0x1) | |||
| Unknown | |||
|- | |||
| 0x2 | |||
| UInt8 (0x1) | |||
| Unknown | |||
|- | |||
| 0x3 | |||
| UInt8 (0x1) | |||
| Unknown | |||
|- | |||
| 0x4 | |||
| UInt8 (0x1) | |||
| Unknown | |||
|- | |||
| 0x5 | |||
| UInt8 (0x1) | |||
| Unknown | |||
|} | |||
===BGM parameter table=== | |||
size: (N + 2) * 0x4 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x0 | |||
| UInt32 (0x4) | |||
| Amount N of entries | |||
|- | |||
| 0x4 | |||
| UInt32 (0x4) | |||
| Padding? | |||
|- | |||
| 0x8 + N * 0x4 | |||
| UInt8 (0x1) | |||
| Unknown. Always 0x60 | |||
|- | |||
| 0x9 + N * 0x4 | |||
| UInt24 (0x3) | |||
| Offset to [[SMR.szs#BGM parameters|BGM parameters]] | |||
|} | |||
====BGM parameters==== | |||
size: 0x8 for each entry | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description for MAIN_BGM | |||
! Description for MULTI_BGM | |||
|- | |||
| 0x0 | |||
| UInt8 (0x1) | |||
| Unknown. Always 0x70 | |||
| Unknown. Always 0x70 | |||
|- | |||
| 0x1 | |||
| UInt8 (0x1) | |||
| Volume. Overridden by [[BgmParam]] in SMG2. | |||
| Unknown. Always 0x78 | |||
|- | |||
| 0x2 | |||
| UInt16 (0x2) | |||
| JaiSeq.arc file ID. Must always be valid. | |||
| Unknown. Always 0x0000 | |||
|- | |||
| 0x4 | |||
| UInt16 (0x2) | |||
| JaiChord.arc file ID. 0xFFFF if no JaiChord file is set. | |||
| Unknown. Always 0xFFFF | |||
|- | |||
| 0x6 | |||
| UInt16 (0x2) | |||
| Unknown. Seen as 0x0000 and 0x0001. | |||
| Unknown. Always 0x0000 | |||
|} | |||
===STREAM parameter table=== | |||
size: (N + 2) * 0x4 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x0 | |||
| UInt32 (0x4) | |||
| Amount N of entries | |||
|- | |||
| 0x4 | |||
| UInt32 (0x4) | |||
| Padding? | |||
|- | |||
| 0x8 + N * 0x4 | |||
| UInt8 (0x1) | |||
| Unknown. Always 0x70 | |||
|- | |||
| 0x9 + N * 0x4 | |||
| UInt24 (0x3) | |||
| Offset to [[SMR.szs#STREAM parameters|STREAM parameters]] | |||
|} | |||
====STREAM parameters==== | |||
size: 0x8 for each entry | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x0 | |||
| UInt8 (0x1) | |||
| Unknown. Always 0x80 | |||
|- | |||
| 0x1 | |||
| UInt8 (0x1) | |||
| Volume. Overridden by [[BgmParam]] in SMG2. | |||
|- | |||
| 0x2 | |||
| UInt16 (0x2) | |||
| Channel count. 0x000E for 2 channels, 0x00EE for 4 channels | |||
|- | |||
| 0x4 | |||
| UInt32 (0x4) | |||
| Offset to null-terminated AST filename, relative to the root of the ISO. Example: <code>/AudioRes/Stream/smg2_ev_starchance_strm.ast</code> | |||
|} | |||
The rest of the BST section is padded to the nearest 0x20. | |||
==BSTN== | |||
The '''B'''inary '''S'''ound '''T'''able '''N'''ames section contains labels for all music and sound effects | |||
===BSTN Header=== | |||
size: 0x20 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x00 | |||
| Magic (0x4) | |||
| <code>BSTN</code> (0x4253544E) | |||
|- | |||
| ? | |||
| ? | |||
| | |||
|- | |||
| 0x08 | |||
| UInt8 (0x1) ? | |||
| Unknown. 0x01 in SMG and SMG2 | |||
|- | |||
| ? | |||
| ? | |||
| | |||
|- | |||
| 0x0C | |||
| UInt32 (0x4) | |||
| Offset to [[SMR.szs#BSTN main table|BSTN main table]] | |||
|- | |||
| 0x10 | |||
| Padding (0x10) | |||
| | |||
|} | |||
===BSTN main table=== | |||
size: (N + 1) * 0x4 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x00 | |||
| UInt32 (0x4) | |||
| Amount N of entries (3 in SMG and SMG2) | |||
|- | |||
| 0x04 | |||
| UInt32 (0x4) | |||
| Offset to [[SMR.szs#SE names table|SE names table]] | |||
|- | |||
| 0x08 | |||
| UInt32 (0x4) | |||
| Offset to [[SMR.szs#BGM names table|BGM names table]] | |||
|- | |||
| 0x0C | |||
| UInt32 (0x4) | |||
| Offset to [[SMR.szs#STREAM names table|STREAM names table]] | |||
|} | |||
===SE names table=== | |||
size: (N + 2) * 0x4 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x00 | |||
| UInt32 (0x4) | |||
| Amount N of entries (0xE in SMG and SMG2) | |||
|- | |||
| 0x04 | |||
| UInt32 (0x4) | |||
| Offset to null-terminated global Sound Effect name. Points to <code>SE</code> in SMG and SMG2 | |||
|- | |||
| 0x08 | |||
| UInt32 (0x4) | |||
| Offset to SYSTEM names table | |||
|- | |||
| 0x0C | |||
| UInt32 (0x4) | |||
| Offset to PLAYER_VOICE names table | |||
|- | |||
| 0x10 | |||
| UInt32 (0x4) | |||
| Offset to PLAYER_MOTION names table | |||
|- | |||
| 0x14 | |||
| UInt32 (0x4) | |||
| Offset to BOSS_VOICE names table | |||
|- | |||
| 0x18 | |||
| UInt32 (0x4) | |||
| Offset to BOSS_MOTION names table | |||
|- | |||
| 0x1C | |||
| UInt32 (0x4) | |||
| Offset to OBJECT names table | |||
|- | |||
| 0x20 | |||
| UInt32 (0x4) | |||
| Offset to ATMOSPHERE names table | |||
|- | |||
| 0x24 | |||
| UInt32 (0x4) | |||
| Offset to DEMO names table | |||
|- | |||
| 0x28 | |||
| UInt32 (0x4) | |||
| Offset to ENEMY_VOICE names table | |||
|- | |||
| 0x2C | |||
| UInt32 (0x4) | |||
| Offset to ENEMY_MOTION names table | |||
|- | |||
| 0x30 | |||
| UInt32 (0x4) | |||
| Offset to SUPPORTER_VOICE names table | |||
|- | |||
| 0x34 | |||
| UInt32 (0x4) | |||
| Offset to SUPPORTER_MOTION names table | |||
|- | |||
| 0x38 | |||
| UInt32 (0x4) | |||
| Offset to REMIX_SEQ names table | |||
|- | |||
| 0x3C | |||
| UInt32 (0x4) | |||
| Offset to HOME_BUTTON_MENU names table | |||
|} | |||
Each of the referenced tables are defined identically, see [[SMR.szs#SE name offset table|SE name offset table]]. | |||
===BGM names table=== | |||
size: (N + 2) * 0x4 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x00 | |||
| UInt32 (0x4) | |||
| Amount N of entries (2 in SMG and SMG2) | |||
|- | |||
| 0x04 | |||
| UInt32 (0x4) | |||
| Offset to null-terminated global Background Music name. Points to <code>BGM</code> in SMG and SMG2 | |||
|- | |||
| 0x08 | |||
| UInt32 (0x4) | |||
| Offset to MAIN_BGM names table | |||
|- | |||
| 0x0C | |||
| UInt32 (0x4) | |||
| Offset to MULTI_BGM names table | |||
|} | |||
Each of the referenced tables are defined identically, see [[SMR.szs#BGM name offset table|BGM name offset table]]. | |||
===STREAM names table=== | |||
size: (N + 2) * 0x4 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x00 | |||
| UInt32 (0x4) | |||
| Amount N of entries (1 in SMG and SMG2) | |||
|- | |||
| 0x04 | |||
| UInt32 (0x4) | |||
| Offset to null-terminated global Stream Music name. Points to <code>STREAM</code> in SMG and SMG2 | |||
|- | |||
| 0x08 | |||
| UInt32 (0x4) | |||
| Offset to [[SMR.szs#STREAM name offset table|STREAM name offset table]] | |||
|} | |||
===SE name offset table=== | |||
size: (N + 2) * 0x4 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x0 | |||
| UInt32 (0x4) | |||
| Amount N of entries | |||
|- | |||
| 0x4 | |||
| UInt32 (0x4) | |||
| Offset to null-terminated Sound Effect category name. Examples: <code>SYSTEM</code>, <code>PLAYER_VOICE</code> etc. | |||
|- | |||
| 0x8 + N * 0x4 | |||
| UInt32 (0x4) | |||
| Offset to null-terminated Sound Effect name. Examples: <code>SE_SY_COIN</code>, <code>SE_PV_JUMP_S</code> etc. | |||
|} | |||
===BGM name offset table=== | |||
size: (N + 2) * 0x4 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x0 | |||
| UInt32 (0x4) | |||
| Amount N of entries | |||
|- | |||
| 0x4 | |||
| UInt32 (0x4) | |||
| Offset to null-terminated Background Music category name, like <code>MAIN_BGM</code> or <code>MULTI_BGM</code>. | |||
|- | |||
| 0x8 + N * 0x4 | |||
| UInt32 (0x4) | |||
| Offset to null-terminated Background Music name. Examples: <code>BGM_MISS</code>, <code>MBGM_STAR_CHANCE</code> etc. | |||
|} | |||
===STREAM name offset table=== | |||
size: (N + 2) * 0x4 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x0 | |||
| UInt32 (0x4) | |||
| Amount N of entries | |||
|- | |||
| 0x4 | |||
| UInt32 (0x4) | |||
| Offset to null-terminated Stream Music category name. Simply <code>0</code> in SMG and SMG2 | |||
|- | |||
| 0x8 + N * 0x4 | |||
| UInt32 (0x4) | |||
| Offset to null-terminated Stream Music name. Examples: <code>STM_STAR_CHANCE</code>, <code>STM_SMG_GALAXY_01</code> etc. | |||
|} | |||
The rest of the BSTN section is padded to the nearest 0x20. | |||
==BSC== | |||
The '''B'''inary '''S'''equence '''C'''ollection section (often referred to as '''SC section''') defines the playback of all sound effects via [[BMS (File Format)|BMS]] data. | |||
===BSC Header=== | |||
size: N * 0x4 + 0x8 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x00 | |||
| Magic (0x2) | |||
| <code>SC</code> (0x5343) | |||
|- | |||
| 0x02 | |||
| UInt16 (0x2) | |||
| Amount N of sound categories (0x0E in SMG and SMG2) | |||
|- | |||
| 0x04 | |||
| UInt32 (0x4) | |||
| BSC section size | |||
|- style="vertical-align:bottom;" | |||
| 0x08 | |||
| UInt32 (0x4) | |||
| Offset to SYSTEM offset table | |||
|- style="vertical-align:bottom;" | |||
| 0x0C | |||
| UInt32 (0x4) | |||
| Offset to PLAYER_VOICE offset table | |||
|- style="vertical-align:bottom;" | |||
| 0x10 | |||
| UInt32 (0x4) | |||
| Offset to PLAYER_MOTION offset table | |||
|- style="vertical-align:bottom;" | |||
| 0x14 | |||
| UInt32 (0x4) | |||
| Offset to BOSS_VOICE offset table | |||
|- style="vertical-align:bottom;" | |||
| 0x18 | |||
| UInt32 (0x4) | |||
| Offset to BOSS_MOTION offset table | |||
|- style="vertical-align:bottom;" | |||
| 0x1C | |||
| UInt32 (0x4) | |||
| Offset to OBJECT offset table | |||
|- style="vertical-align:bottom;" | |||
| 0x20 | |||
| UInt32 (0x4) | |||
| Offset to ATMOSPHERE offset table | |||
|- style="vertical-align:bottom;" | |||
| 0x24 | |||
| UInt32 (0x4) | |||
| Offset to DEMO offset table | |||
|- style="vertical-align:bottom;" | |||
| 0x28 | |||
| UInt32 (0x4) | |||
| Offset to ENEMY_VOICE offset table | |||
|- style="vertical-align:bottom;" | |||
| 0x2C | |||
| UInt32 (0x4) | |||
| Offset to ENEMY_MOTION offset table | |||
|- style="vertical-align:bottom;" | |||
| 0x30 | |||
| UInt32 (0x4) | |||
| Offset to SUPPORTER_VOICE offset table | |||
|- style="vertical-align:bottom;" | |||
| 0x34 | |||
| UInt32 (0x4) | |||
| Offset to SUPPORTER_MOTION offset table | |||
|- style="vertical-align:bottom;" | |||
| 0x38 | |||
| UInt32 (0x4) | |||
| Offset to REMIX_SEQ offset table | |||
|- style="vertical-align:bottom;" | |||
| 0x3C | |||
| UInt32 (0x4) | |||
| Offset to HOME_BUTTON_MENU offset table | |||
|} | |||
Each of the referenced tables are defined identically, see [[SMR.szs#BSC offset table|BSC offset table]]. | |||
===BSC offset table=== | |||
size: (N + 1) * 0x4 | |||
{| class="wikitable" | |||
|- | |||
! Offset | |||
! Type | |||
! Description | |||
|- | |||
| 0x0 | |||
| UInt32 (0x4) | |||
| Amount N of entries | |||
|- | |||
| 0x4 + N * 0x4 | |||
| UInt32 (0x4) | |||
| Offset to BMS data | |||
|} | |||
Inbetween tables is the BMS data that makes up all of the sound effects. The BSC section is basically structured like this: | |||
{| class="wikitable" | |||
|- | |||
! BSC | |||
! Contents | |||
|- | |||
| BSC Header | |||
| Offsets to [CATEGORY] offset tables | |||
|- | |||
| Main BMS controller | |||
| BMS data thats mandatory for all sound effects. Its stored once at the beginning of the file to reduce filesize | |||
|- | |||
| [CATEGORY] offset table | |||
| A table with offsets to BMS data for the first sound category (SYSTEM) | |||
|- | |||
| [CATEGORY] BMS data | |||
| Raw BMS data defining the playback of each sound effect | |||
|- | |||
| [CATEGORY] offset table | |||
| A table with offsets to BMS data for the second sound category (PLAYER_VOICE) | |||
|- | |||
| [CATEGORY] BMS data | |||
| Raw BMS data defining the playback of each sound effect | |||
|- | |||
| ... | |||
| ... | |||
|} | |||
===BSC optimizations=== | |||
Despite using the same data that BMS files use, the BSC section optimizes a lot of them. Here are some notable ones: | |||
{| class="wikitable" | |||
|- | |||
! BMS files | |||
! BSC section | |||
|- | |||
| Use E2 + E3 to define an instrument. Takes 0x4 bytes in total | |||
| Use E1 to define an instrument. Takes 0x3 bytes in total | |||
|- | |||
| Close all tracks with FF, even tracks that end with a C7 loop | |||
| Omit use of FF when the last operation in a track is C7 | |||
|- | |||
| Define playback speed with D8 and E0 for each BMS file individually | |||
| Define playback speed with EA and D8 once. Every sound effect references this with a C3 jump, reducing the filesize by a lot as opposed to defining the playback speed individually for each sound effect | |||
|- | |||
| no equivalent | |||
| All dummy sounds point to offset 0x6B, which holds FF instead of defining FF for all dummies individually | |||
|- | |||
| OpenTrack with voices 1-7, wait with F0 and shut voices with the 8X operator. Takes up 0x6 bytes minimum | |||
| OpenTrack with voice 0, which enables a Midi gate. This only needs 0x4 bytes to define a sound/key and how long its supposed to last | |||
|} | |||
==WSYS== | |||
'''W'''ave '''Sys'''tem. See [[WSYS]] | |||
==IBNK== | |||
'''I'''nstrument '''B'''a'''nk'''. See [[IBNK]] | |||
==Editing SMR.szs== | |||
'''The following section contains instructions for editing SMR.szs with the SoundModdingToolkit. They do not contain specifications for the file itself.''' | |||
The tool [https://xayr.gay/tools/SoundModdingToolkit/ SoundModdingToolkit] can convert this file into a clear and readable file structure, so the structure of the file is shown on this page using the tool's converted structure. | The tool [https://xayr.gay/tools/SoundModdingToolkit/ SoundModdingToolkit] can convert this file into a clear and readable file structure, so the structure of the file is shown on this page using the tool's converted structure. | ||
Line 9: | Line 850: | ||
'''Please note that only version 4.1.0 can edit the lists without any problems. Later versions can lead to problems such as muted songs.''' | '''Please note that only version 4.1.0 can edit the lists without any problems. Later versions can lead to problems such as muted songs.''' | ||
==BGM== | ===BGM=== | ||
===MAIN_BGM=== | ====MAIN_BGM==== | ||
Found in ''SoundTable/BGM/libraries/MAIN_BGM.json'' </br> | Found in ''SoundTable/BGM/libraries/MAIN_BGM.json'' </br> | ||
Defines the sequenced music. The music sequence files can be found in bms format in ''AudioRes/Seqs/JaiSeq.arc''. | Defines the sequenced music. The music sequence files can be found in bms format in ''AudioRes/Seqs/JaiSeq.arc''. | ||
Line 47: | Line 888: | ||
|} | |} | ||
===MULTI_BGM=== | ====MULTI_BGM==== | ||
Found in ''SoundTable/BGM/libraries/MULTI_BGM.json'' </br> | Found in ''SoundTable/BGM/libraries/MULTI_BGM.json'' </br> | ||
Defines settings about Multi BGM such as its name. Multi BGM combines Stream (STM) and sequential Music (BGM). Which Music is set for each Multi BGM is defined in [[MultiBgmInfo]]. | Defines settings about Multi BGM such as its name. Multi BGM combines Stream (STM) and sequential Music (BGM). Which Music is set for each Multi BGM is defined in [[MultiBgmInfo]]. | ||
Line 84: | Line 925: | ||
|} | |} | ||
==STREAM== | ===STREAM=== | ||
Found in ''SoundTable/STREAM/0.json''</br> | Found in ''SoundTable/STREAM/0.json''</br> | ||
Defines the streamed ast audio files including its internal STM name as well as its filepath. | Defines the streamed ast audio files including its internal STM name as well as its filepath. | ||
Line 118: | Line 959: | ||
|} | |} | ||
==SE== | ===SE=== | ||
===AW=== | ====AW==== | ||
Each aw. file is converted by the tool into a folder that has the ID of the aw file in its name, and besides the sound files converted in wav format, contains the following settings for each sound: | Each aw. file is converted by the tool into a folder that has the ID of the aw file in its name, and besides the sound files converted in wav format, contains the following settings for each sound: | ||
*'''manifest.json''' Contains the ID and name of the aw file | *'''manifest.json''' Contains the ID and name of the aw file | ||
*'''wavetable.json''' Contains settings for each sound of the aw. file | *'''wavetable.json''' Contains settings for each sound of the aw. file | ||
====wavetable==== | =====wavetable===== | ||
Each entry starts with the name of the Wav file (e.g. "31") followed by its settings: | Each entry starts with the name of the Wav file (e.g. "31") followed by its settings: | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 159: | Line 1,000: | ||
|} | |} | ||
====Libraries==== | |||
===Libraries=== | |||
In ''SoundTable\SE\libraries\'' there are several libraries which contain settings for sounds with their internal assigned names. | In ''SoundTable\SE\libraries\'' there are several libraries which contain settings for sounds with their internal assigned names. | ||
Latest revision as of 08:13, 13 February 2025
This page is in progress and may contain incomplete information or editor's notes. |
---|
SMR.szs is a compressed BAA file (Binary Audio Archive) which defines the game's sound system. It contains references to streamed and sequenced music files as well as data for sound effects and instruments. It can be found in various JAudio games, however the specifications below mainly apply to Super Mario Galaxy and Super Mario Galaxy 2.
The following files are directly linked to SMR.szs:
- AudioRes/Info/BgmParam.arc (SMG2 only, overrides the BGM and STM volume parameter)
- AudioRes/Info/JaiChord.arc (SMR.szs links BGM labels to CIT file IDs within this archive)
- AudioRes/Seqs/JaiSeq.arc (SMR.szs links BGM labels to BMS file IDs within this archive)
- AudioRes/Stream/*.ast (SMR.szs links STM labels to AST files)
- AudioRes/Waves/*.aw (SMR.szs defines the contents of AW files)
The following files are indirectly linked to SMR.szs:
- AudioRes/Info/ActionSound.arc (SMG2 only, links hardcoded triggers for all objects to sound effects in SMR.szs)
- AudioRes/Info/JaiMe.arc (References instruments from SMR.szs)
- AudioRes/Info/JaiRemixSeq.arc (References instruments from SMR.szs)
- AudioRes/Info/MultiBgmInfo.arc (SMG2 only, connects MBGM labels to STM and BGM labels, allowing streamed and sequenced audio to play simultaneously)
- AudioRes/Info/SoundIdToInstList (SMG2 only, references Sound IDs and instruments from SMR.szs and allows loading AW files)
- AudioRes/Info/StageBgmInfo.arc (SMG2 only, controls the main music and music changes for all stages)
Header
The header contains offsets to all files included in SMR.szs:
Offset | Type | Description |
---|---|---|
0x00 | Magic (0x4) | AA_< (0x41415F3C)
|
0x04 | Magic (0x4) | bst (0x62737420)
|
0x08 | UInt32 (0x4) | Offset to BST section start |
0x0C | UInt32 (0x4) | Offset to BST section end |
0x10 | Magic (0x4) | bstn (0x6273746E)
|
0x14 | UInt32 (0x4) | Offset to BSTN section start |
0x18 | UInt32 (0x4) | Offset to BSTN section end |
0x1C | Magic (0x4) | bsc (0x62736320)
|
0x20 | UInt32 (0x4) | Offset to BSC section start |
0x24 | UInt32 (0x4) | Offset to BSC section end |
0x28 + N * 0x10 | Magic (0x4) | ws (0x77732020)
|
0x28 + N * 0x10 + 0x4 | UInt32 (0x4) | WSYS file ID (N) |
0x28 + N * 0x10 + 0x8 | UInt32 (0x4) | Offset to WSYS file |
0x28 + N * 0x10 + 0xC | UInt32 (0x4) | Unknown (mostly 0x00000000, once seen as 0xFFFFFFFF) |
0x38 + N * 0x10 + M * 0xC | Magic (0x4) | bnk (0x626E6B20)
|
0x38 + N * 0x10 + M * 0xC + 0x4 | UInt32 (0x4) | IBNK file ID (M) |
0x38 + N * 0x10 + M * 0xC + 0x8 | UInt32 (0x4) | Offset to IBNK file |
0x44 + N * 0x10 + M * 0xC | Magic (0x4) | >_AA (0x3E5F4141)
|
BST
The Binary Sound Table contains parameters for all music and sound effects
BST Header
size: 0x20
Offset | Type | Description |
---|---|---|
0x00 | Magic (0x4) | BST (0x42535420)
|
? | ? | |
0x08 | UInt8 (0x1) ? | Unknown. 0x01 in SMG and SMG2 |
? | ? | |
0x0C | UInt32 (0x4) | Offset to BST main table |
0x10 | Padding (0x10) |
BST main table
size: (N + 1) * 0x4
Offset | Type | Description |
---|---|---|
0x00 | UInt32 (0x4) | Amount N of entries (3 in SMG and SMG2) |
0x04 | UInt32 (0x4) | Offset to SE table |
0x08 | UInt32 (0x4) | Offset to BGM table |
0x0C | UInt32 (0x4) | Offset to STREAM table |
SE table
size: (N + 1) * 0x4
Offset | Type | Description |
---|---|---|
0x00 | UInt32 (0x4) | Amount N of entries (0xE in SMG and SMG2) |
0x04 | UInt32 (0x4) | Offset to SYSTEM table |
0x08 | UInt32 (0x4) | Offset to PLAYER_VOICE table |
0x0C | UInt32 (0x4) | Offset to PLAYER_MOTION table |
0x10 | UInt32 (0x4) | Offset to BOSS_VOICE table |
0x14 | UInt32 (0x4) | Offset to BOSS_MOTION table |
0x18 | UInt32 (0x4) | Offset to OBJECT table |
0x1C | UInt32 (0x4) | Offset to ATMOSPHERE table |
0x20 | UInt32 (0x4) | Offset to DEMO table |
0x24 | UInt32 (0x4) | Offset to ENEMY_VOICE table |
0x28 | UInt32 (0x4) | Offset to ENEMY_MOTION table |
0x2C | UInt32 (0x4) | Offset to SUPPORTER_VOICE table |
0x30 | UInt32 (0x4) | Offset to SUPPORTER_MOTION table |
0x34 | UInt32 (0x4) | Offset to REMIX_SEQ table |
0x38 | UInt32 (0x4) | Offset to HOME_BUTTON_MENU table |
Each of the referenced tables are defined identically, see SE parameter table.
BGM table
size: (N + 1) * 0x4
Offset | Type | Description |
---|---|---|
0x00 | UInt32 (0x4) | Amount N of entries (2 in SMG and SMG2) |
0x04 | UInt32 (0x4) | Offset to MAIN_BGM table |
0x08 | UInt32 (0x4) | Offset to MULTI_BGM table |
Each of the referenced tables are defined identically, see BGM parameter table.
STREAM table
size: (N + 1) * 0x4
Offset | Type | Description |
---|---|---|
0x00 | UInt32 (0x4) | Amount N of entries (1 in SMG and SMG2) |
0x04 | UInt32 (0x4) | Offset to STREAM parameter table |
SE parameter table
size: (N + 2) * 0x4
Offset | Type | Description |
---|---|---|
0x0 | UInt32 (0x4) | Amount N of entries |
0x4 | UInt32 (0x4) | Padding? |
0x8 + N * 0x4 | UInt8 (0x1) | Unknown. Always 0x50 |
0x9 + N * 0x4 | UInt24 (0x3) | Offset to SE parameters |
SE parameters
size: 0x6 for each entry
Offset | Type | Description |
---|---|---|
0x0 | UInt8 (0x1) | Volume? |
0x1 | UInt8 (0x1) | Unknown |
0x2 | UInt8 (0x1) | Unknown |
0x3 | UInt8 (0x1) | Unknown |
0x4 | UInt8 (0x1) | Unknown |
0x5 | UInt8 (0x1) | Unknown |
BGM parameter table
size: (N + 2) * 0x4
Offset | Type | Description |
---|---|---|
0x0 | UInt32 (0x4) | Amount N of entries |
0x4 | UInt32 (0x4) | Padding? |
0x8 + N * 0x4 | UInt8 (0x1) | Unknown. Always 0x60 |
0x9 + N * 0x4 | UInt24 (0x3) | Offset to BGM parameters |
BGM parameters
size: 0x8 for each entry
Offset | Type | Description for MAIN_BGM | Description for MULTI_BGM |
---|---|---|---|
0x0 | UInt8 (0x1) | Unknown. Always 0x70 | Unknown. Always 0x70 |
0x1 | UInt8 (0x1) | Volume. Overridden by BgmParam in SMG2. | Unknown. Always 0x78 |
0x2 | UInt16 (0x2) | JaiSeq.arc file ID. Must always be valid. | Unknown. Always 0x0000 |
0x4 | UInt16 (0x2) | JaiChord.arc file ID. 0xFFFF if no JaiChord file is set. | Unknown. Always 0xFFFF |
0x6 | UInt16 (0x2) | Unknown. Seen as 0x0000 and 0x0001. | Unknown. Always 0x0000 |
STREAM parameter table
size: (N + 2) * 0x4
Offset | Type | Description |
---|---|---|
0x0 | UInt32 (0x4) | Amount N of entries |
0x4 | UInt32 (0x4) | Padding? |
0x8 + N * 0x4 | UInt8 (0x1) | Unknown. Always 0x70 |
0x9 + N * 0x4 | UInt24 (0x3) | Offset to STREAM parameters |
STREAM parameters
size: 0x8 for each entry
Offset | Type | Description |
---|---|---|
0x0 | UInt8 (0x1) | Unknown. Always 0x80 |
0x1 | UInt8 (0x1) | Volume. Overridden by BgmParam in SMG2. |
0x2 | UInt16 (0x2) | Channel count. 0x000E for 2 channels, 0x00EE for 4 channels |
0x4 | UInt32 (0x4) | Offset to null-terminated AST filename, relative to the root of the ISO. Example: /AudioRes/Stream/smg2_ev_starchance_strm.ast
|
The rest of the BST section is padded to the nearest 0x20.
BSTN
The Binary Sound Table Names section contains labels for all music and sound effects
BSTN Header
size: 0x20
Offset | Type | Description |
---|---|---|
0x00 | Magic (0x4) | BSTN (0x4253544E)
|
? | ? | |
0x08 | UInt8 (0x1) ? | Unknown. 0x01 in SMG and SMG2 |
? | ? | |
0x0C | UInt32 (0x4) | Offset to BSTN main table |
0x10 | Padding (0x10) |
BSTN main table
size: (N + 1) * 0x4
Offset | Type | Description |
---|---|---|
0x00 | UInt32 (0x4) | Amount N of entries (3 in SMG and SMG2) |
0x04 | UInt32 (0x4) | Offset to SE names table |
0x08 | UInt32 (0x4) | Offset to BGM names table |
0x0C | UInt32 (0x4) | Offset to STREAM names table |
SE names table
size: (N + 2) * 0x4
Offset | Type | Description |
---|---|---|
0x00 | UInt32 (0x4) | Amount N of entries (0xE in SMG and SMG2) |
0x04 | UInt32 (0x4) | Offset to null-terminated global Sound Effect name. Points to SE in SMG and SMG2
|
0x08 | UInt32 (0x4) | Offset to SYSTEM names table |
0x0C | UInt32 (0x4) | Offset to PLAYER_VOICE names table |
0x10 | UInt32 (0x4) | Offset to PLAYER_MOTION names table |
0x14 | UInt32 (0x4) | Offset to BOSS_VOICE names table |
0x18 | UInt32 (0x4) | Offset to BOSS_MOTION names table |
0x1C | UInt32 (0x4) | Offset to OBJECT names table |
0x20 | UInt32 (0x4) | Offset to ATMOSPHERE names table |
0x24 | UInt32 (0x4) | Offset to DEMO names table |
0x28 | UInt32 (0x4) | Offset to ENEMY_VOICE names table |
0x2C | UInt32 (0x4) | Offset to ENEMY_MOTION names table |
0x30 | UInt32 (0x4) | Offset to SUPPORTER_VOICE names table |
0x34 | UInt32 (0x4) | Offset to SUPPORTER_MOTION names table |
0x38 | UInt32 (0x4) | Offset to REMIX_SEQ names table |
0x3C | UInt32 (0x4) | Offset to HOME_BUTTON_MENU names table |
Each of the referenced tables are defined identically, see SE name offset table.
BGM names table
size: (N + 2) * 0x4
Offset | Type | Description |
---|---|---|
0x00 | UInt32 (0x4) | Amount N of entries (2 in SMG and SMG2) |
0x04 | UInt32 (0x4) | Offset to null-terminated global Background Music name. Points to BGM in SMG and SMG2
|
0x08 | UInt32 (0x4) | Offset to MAIN_BGM names table |
0x0C | UInt32 (0x4) | Offset to MULTI_BGM names table |
Each of the referenced tables are defined identically, see BGM name offset table.
STREAM names table
size: (N + 2) * 0x4
Offset | Type | Description |
---|---|---|
0x00 | UInt32 (0x4) | Amount N of entries (1 in SMG and SMG2) |
0x04 | UInt32 (0x4) | Offset to null-terminated global Stream Music name. Points to STREAM in SMG and SMG2
|
0x08 | UInt32 (0x4) | Offset to STREAM name offset table |
SE name offset table
size: (N + 2) * 0x4
Offset | Type | Description |
---|---|---|
0x0 | UInt32 (0x4) | Amount N of entries |
0x4 | UInt32 (0x4) | Offset to null-terminated Sound Effect category name. Examples: SYSTEM , PLAYER_VOICE etc.
|
0x8 + N * 0x4 | UInt32 (0x4) | Offset to null-terminated Sound Effect name. Examples: SE_SY_COIN , SE_PV_JUMP_S etc.
|
BGM name offset table
size: (N + 2) * 0x4
Offset | Type | Description |
---|---|---|
0x0 | UInt32 (0x4) | Amount N of entries |
0x4 | UInt32 (0x4) | Offset to null-terminated Background Music category name, like MAIN_BGM or MULTI_BGM .
|
0x8 + N * 0x4 | UInt32 (0x4) | Offset to null-terminated Background Music name. Examples: BGM_MISS , MBGM_STAR_CHANCE etc.
|
STREAM name offset table
size: (N + 2) * 0x4
Offset | Type | Description |
---|---|---|
0x0 | UInt32 (0x4) | Amount N of entries |
0x4 | UInt32 (0x4) | Offset to null-terminated Stream Music category name. Simply 0 in SMG and SMG2
|
0x8 + N * 0x4 | UInt32 (0x4) | Offset to null-terminated Stream Music name. Examples: STM_STAR_CHANCE , STM_SMG_GALAXY_01 etc.
|
The rest of the BSTN section is padded to the nearest 0x20.
BSC
The Binary Sequence Collection section (often referred to as SC section) defines the playback of all sound effects via BMS data.
BSC Header
size: N * 0x4 + 0x8
Offset | Type | Description |
---|---|---|
0x00 | Magic (0x2) | SC (0x5343)
|
0x02 | UInt16 (0x2) | Amount N of sound categories (0x0E in SMG and SMG2) |
0x04 | UInt32 (0x4) | BSC section size |
0x08 | UInt32 (0x4) | Offset to SYSTEM offset table |
0x0C | UInt32 (0x4) | Offset to PLAYER_VOICE offset table |
0x10 | UInt32 (0x4) | Offset to PLAYER_MOTION offset table |
0x14 | UInt32 (0x4) | Offset to BOSS_VOICE offset table |
0x18 | UInt32 (0x4) | Offset to BOSS_MOTION offset table |
0x1C | UInt32 (0x4) | Offset to OBJECT offset table |
0x20 | UInt32 (0x4) | Offset to ATMOSPHERE offset table |
0x24 | UInt32 (0x4) | Offset to DEMO offset table |
0x28 | UInt32 (0x4) | Offset to ENEMY_VOICE offset table |
0x2C | UInt32 (0x4) | Offset to ENEMY_MOTION offset table |
0x30 | UInt32 (0x4) | Offset to SUPPORTER_VOICE offset table |
0x34 | UInt32 (0x4) | Offset to SUPPORTER_MOTION offset table |
0x38 | UInt32 (0x4) | Offset to REMIX_SEQ offset table |
0x3C | UInt32 (0x4) | Offset to HOME_BUTTON_MENU offset table |
Each of the referenced tables are defined identically, see BSC offset table.
BSC offset table
size: (N + 1) * 0x4
Offset | Type | Description |
---|---|---|
0x0 | UInt32 (0x4) | Amount N of entries |
0x4 + N * 0x4 | UInt32 (0x4) | Offset to BMS data |
Inbetween tables is the BMS data that makes up all of the sound effects. The BSC section is basically structured like this:
BSC | Contents |
---|---|
BSC Header | Offsets to [CATEGORY] offset tables |
Main BMS controller | BMS data thats mandatory for all sound effects. Its stored once at the beginning of the file to reduce filesize |
[CATEGORY] offset table | A table with offsets to BMS data for the first sound category (SYSTEM) |
[CATEGORY] BMS data | Raw BMS data defining the playback of each sound effect |
[CATEGORY] offset table | A table with offsets to BMS data for the second sound category (PLAYER_VOICE) |
[CATEGORY] BMS data | Raw BMS data defining the playback of each sound effect |
... | ... |
BSC optimizations
Despite using the same data that BMS files use, the BSC section optimizes a lot of them. Here are some notable ones:
BMS files | BSC section |
---|---|
Use E2 + E3 to define an instrument. Takes 0x4 bytes in total | Use E1 to define an instrument. Takes 0x3 bytes in total |
Close all tracks with FF, even tracks that end with a C7 loop | Omit use of FF when the last operation in a track is C7 |
Define playback speed with D8 and E0 for each BMS file individually | Define playback speed with EA and D8 once. Every sound effect references this with a C3 jump, reducing the filesize by a lot as opposed to defining the playback speed individually for each sound effect |
no equivalent | All dummy sounds point to offset 0x6B, which holds FF instead of defining FF for all dummies individually |
OpenTrack with voices 1-7, wait with F0 and shut voices with the 8X operator. Takes up 0x6 bytes minimum | OpenTrack with voice 0, which enables a Midi gate. This only needs 0x4 bytes to define a sound/key and how long its supposed to last |
WSYS
Wave System. See WSYS
IBNK
Instrument Bank. See IBNK
Editing SMR.szs
The following section contains instructions for editing SMR.szs with the SoundModdingToolkit. They do not contain specifications for the file itself.
The tool SoundModdingToolkit can convert this file into a clear and readable file structure, so the structure of the file is shown on this page using the tool's converted structure.
Please note that only version 4.1.0 can edit the lists without any problems. Later versions can lead to problems such as muted songs.
BGM
MAIN_BGM
Found in SoundTable/BGM/libraries/MAIN_BGM.json
Defines the sequenced music. The music sequence files can be found in bms format in AudioRes/Seqs/JaiSeq.arc.
Name | Description |
---|---|
unk1 | |
unk2 | Volume (overridden by BgmParam in SMG2) |
unk3 | File ID of the bms file in JaiSeq.arc to use (the filename is ignored) |
unk4 | File ID of the cit file in JaiChord.arc to use (the filename is ignored) |
unk5 | |
type | |
mOffset | |
NameOffset | |
name | Internal mapping name for this sequence (e.g. "BGM_MISS"). This name can then be used in musiclists like ScenarioBgmInfo. |
MULTI_BGM
Found in SoundTable/BGM/libraries/MULTI_BGM.json
Defines settings about Multi BGM such as its name. Multi BGM combines Stream (STM) and sequential Music (BGM). Which Music is set for each Multi BGM is defined in MultiBgmInfo.
Name | Description |
---|---|
unk1 | ? always 112 |
unk2 | ? always 120 |
unk3 | ? always 0 |
unk4 | ? always -1 |
unk5 | ? always 0 |
type | ? always 96 |
mOffset | |
NameOffset | ? always 0 |
name | Internal mapping name for this entry (e.g. "MBGM_STAR_CHANCE") This name can then be used in musiclists like ScenarioBgmInfo. |
STREAM
Found in SoundTable/STREAM/0.json
Defines the streamed ast audio files including its internal STM name as well as its filepath.
Name | Description |
---|---|
unk1 | ? always 128 |
unk2 | Volume (overridden by BgmParam in SMG2) |
streamType | Stream Type 14: Standard Stream (2 Channels) 238: Multi Stream (4 Channels) |
streamPath | Filepath of the AST file to use (e.g. "/AudioRes/Stream/smg2_ev_starchance_strm.ast") |
type | ? always 112 |
mOffset | |
NameOffset | ? always 0 |
name | Internal mapping name for this song (e.g. "STM_STAR_CHANCE") This name can then be used in musiclists like ScenarioBgmInfo. |
SE
AW
Each aw. file is converted by the tool into a folder that has the ID of the aw file in its name, and besides the sound files converted in wav format, contains the following settings for each sound:
- manifest.json Contains the ID and name of the aw file
- wavetable.json Contains settings for each sound of the aw. file
wavetable
Each entry starts with the name of the Wav file (e.g. "31") followed by its settings:
Name | Description |
---|---|
format | ? always 0 |
key | |
sampleRate | The sample rate at which the sound should be played. (e.g. "22050.0") |
sampleCount | Length of the sound in samples |
loop | Whether it should be looped or not true: loop false: do not loop |
loop_start | Loop Start position in samples. |
loop_end | Loop End position in samples. |
last | |
penult |
Libraries
In SoundTable\SE\libraries\ there are several libraries which contain settings for sounds with their internal assigned names.
Name | Description |
---|---|
unk1 | ? always 128 |
unk2 | |
unk3 | |
unk4 | |
unk5 | |
unk6 | |
type | Always 80 |
mOffset | |
NameOffset | ? Always 0 |
name | Internal Name of the soundeffect (e.g. "SE_SV_LV_YOSHI_FLUTTER") |