AST (File Format): Difference between revisions
Jump to navigation
Jump to search
AwesomeTMC (talk | contribs) (Loop enabled is the unknown at 0xE) |
(added volume, last and penult) |
||
| Line 8: | Line 8: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
| 0x00 || String || File magic. '''STRM''' in ASCII | | 0x00 || String || File magic. '''STRM''' in ASCII | ||
|- | |- | ||
| 0x04 || UInt32 || Size of all | | 0x04 || UInt32 || Size of all blocks. ''File size - header length (0x40)'' | ||
|- | |- | ||
| 0x08 || UInt16 || Audio format | | 0x08 || UInt16 || Audio format: 0 = ADPCM, 1 = PCM16 | ||
|- | |- | ||
| 0x0A || UInt16 || Bit depth | | 0x0A || UInt16 || Bit depth | ||
|- | |- | ||
| 0x0C || UInt16 || Number of channels | | 0x0C || UInt16 || Number of channels | ||
|- | |- | ||
| 0x0E || UInt16 || Loop enabled | | 0x0E || UInt16 || Loop enabled: 0x0000 if no loop, 0xFFFF if loop | ||
|- | |- | ||
| 0x10 || UInt32 || Sample rate | | 0x10 || UInt32 || Sample rate | ||
|- | |- | ||
| 0x14 || UInt32 || Total sample count | | 0x14 || UInt32 || Total sample count | ||
|- | |- | ||
| 0x18 || UInt32 || Loop start in samples | | 0x18 || UInt32 || Loop start in samples | ||
|- | |- | ||
| 0x1C || UInt32 || Loop end in samples | | 0x1C || UInt32 || Loop end in samples | ||
|- | |- | ||
| 0x20 || UInt32 || | | 0x20 || UInt32 || Default data size per channel in a block | ||
|- | |- | ||
| 0x24 || UInt32 || Unknown. Always 0 | | 0x24 || UInt32 || Unknown. Always 0 | ||
|- | |- | ||
| 0x28 || UInt32 || | | 0x28 || UInt32 || Volume. Always 0x7F000000 | ||
|- | |- | ||
| 0x2C || Byte || Always 0. Likely padding | | 0x2C || Byte || Always 0. Likely padding | ||
|- | |- | ||
| 0x40 || || End of | | 0x40 || || End of header | ||
|- | |- | ||
|} | |} | ||
== BLCK == | == BLCK == | ||
AST | AST files contain multiple BLCK sections, each containing sound data. | ||
{| class="wikitable" | {| class="wikitable" | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
| 0x00 || String || Block magic. '''BLCK''' in ASCII | | 0x00 || String || Block magic. '''BLCK''' in ASCII | ||
|- | |- | ||
| 0x04 || UInt32 || Block size | | 0x04 || UInt32 || Block size; the data size per channel in this block | ||
|- | |- | ||
| 0x08 || | | 0x08 || UInt16 || ADPCM only: channel 1 last value | ||
|- | |- | ||
| 0x20 || Byte || Sound data | | 0x0A || UInt16 || ADPCM only: channel 1 penult value | ||
|- | |||
| 0x0C || UInt16 || ADPCM only: channel 2 last value | |||
|- | |||
| 0x0E || UInt16 || ADPCM only: channel 2 penult value | |||
|- | |||
| 0x10 || UInt16 || ADPCM only: channel 3 last value | |||
|- | |||
| 0x12 || UInt16 || ADPCM only: channel 3 penult value | |||
|- | |||
| 0x14 || UInt16 || ADPCM only: channel 4 last value | |||
|- | |||
| 0x16 || UInt16 || ADPCM only: channel 4 penult value | |||
|- | |||
| 0x18 || UInt16 || ADPCM only: channel 5 last value | |||
|- | |||
| 0x1A || UInt16 || ADPCM only: channel 5 penult value | |||
|- | |||
| 0x1C || UInt16 || ADPCM only: channel 6 last value | |||
|- | |||
| 0x1E || UInt16 || ADPCM only: channel 6 penult value | |||
|- | |||
| 0x20 || Byte || Sound data | |||
|- | |- | ||
|} | |} | ||
Latest revision as of 10:35, 28 April 2026
AST files are audio streams found in several JAudio2 games, including Super Mario Galaxy and Super Mario Galaxy 2. Both games store their AST files in the AudioRes/Stream directory.
For a comprehensive list linking AST files to the Galaxy they're used in, check the List of Music page.
Header
AST file header, 0x40 bytes in length.
| Offset | Type | Description |
|---|---|---|
| 0x00 | String | File magic. STRM in ASCII |
| 0x04 | UInt32 | Size of all blocks. File size - header length (0x40) |
| 0x08 | UInt16 | Audio format: 0 = ADPCM, 1 = PCM16 |
| 0x0A | UInt16 | Bit depth |
| 0x0C | UInt16 | Number of channels |
| 0x0E | UInt16 | Loop enabled: 0x0000 if no loop, 0xFFFF if loop |
| 0x10 | UInt32 | Sample rate |
| 0x14 | UInt32 | Total sample count |
| 0x18 | UInt32 | Loop start in samples |
| 0x1C | UInt32 | Loop end in samples |
| 0x20 | UInt32 | Default data size per channel in a block |
| 0x24 | UInt32 | Unknown. Always 0 |
| 0x28 | UInt32 | Volume. Always 0x7F000000 |
| 0x2C | Byte | Always 0. Likely padding |
| 0x40 | End of header |
BLCK
AST files contain multiple BLCK sections, each containing sound data.
| Offset | Type | Description |
|---|---|---|
| 0x00 | String | Block magic. BLCK in ASCII |
| 0x04 | UInt32 | Block size; the data size per channel in this block |
| 0x08 | UInt16 | ADPCM only: channel 1 last value |
| 0x0A | UInt16 | ADPCM only: channel 1 penult value |
| 0x0C | UInt16 | ADPCM only: channel 2 last value |
| 0x0E | UInt16 | ADPCM only: channel 2 penult value |
| 0x10 | UInt16 | ADPCM only: channel 3 last value |
| 0x12 | UInt16 | ADPCM only: channel 3 penult value |
| 0x14 | UInt16 | ADPCM only: channel 4 last value |
| 0x16 | UInt16 | ADPCM only: channel 4 penult value |
| 0x18 | UInt16 | ADPCM only: channel 5 last value |
| 0x1A | UInt16 | ADPCM only: channel 5 penult value |
| 0x1C | UInt16 | ADPCM only: channel 6 last value |
| 0x1E | UInt16 | ADPCM only: channel 6 penult value |
| 0x20 | Byte | Sound data |
Tools
Tutorials
Luma's Workshop - Changing Background Music
Luma's Workshop - Importing New Music Tracks