AGSC (File Format): Difference between revisions
→MusyX chunks
>MrSinistar No edit summary |
>Aruki |
||
Line 73: | Line 73: | ||
=== MusyX chunks === | === MusyX chunks === | ||
After the AGSC header, there are four chunks: the Pool chunk, the Properties chunk, the Sample chunk and the Sample Directory chunk. | After the AGSC header, there are four chunks: the Pool chunk, the Properties chunk, the Sample chunk and the Sample Directory chunk. Each chunk is a standard MusyX file, embedded in the AGSC. | ||
==== | ==== Pool ==== | ||
The Pool chunk denotes MusyX's "SoundMacros", small scripts that apply various effects and commands on the sounds in the game. The chunk first calls out a command ID then the parameters of that particular command, which varies. | The Pool chunk denotes MusyX's "SoundMacros", small scripts that apply various effects and commands on the sounds in the game. The chunk first calls out a command ID then the parameters of that particular command, which varies. | ||
Every 4 bytes | Every 4 bytes were originally little endian, but have been swapped to big endian in the AGSC files (despite not being longs). To read the data as originally formatted, every four bytes needs to be byte-swapped. | ||
{|class="wikitable" | {|class="wikitable" | ||
Line 91: | Line 91: | ||
|- | |- | ||
| 0x1 | | 0x1 | ||
| | | 7 | ||
| '''Command | | '''Command arguments''' (varies between commands) | ||
|- | |- | ||
| 0x8 | | 0x8 | ||
Line 124: | Line 100: | ||
The Soundmacro terminates when the END command is read. The command ID for END is 0 and has no command arguments, so when 0x00000000 is read, start the next SoundMacro. The entire chunk terminates when 0xFFFF is read. | The Soundmacro terminates when the END command is read. The command ID for END is 0 and has no command arguments, so when 0x00000000 is read, start the next SoundMacro. The entire chunk terminates when 0xFFFF is read. | ||
==== | ==== Project ==== | ||
The Project properties chunk contains values for the sounds, including priority, polyphony, volume, etc. | The Project properties chunk contains values for the sounds, including priority, polyphony, volume, etc. | ||
==== | ==== Sample ==== | ||
The Sample chunk is all the sound data encoded using the standard Gamecube DSP ADPCM codec. It can be decoded the same way as a [[DSP (File Format)|DSP]] file. Each sound's size is padded to 32 bytes before the next sound's data begins. | The Sample chunk is all the sound data encoded using the standard Gamecube DSP ADPCM codec. It can be decoded the same way as a [[DSP (File Format)|DSP]] file. Each sound's size is padded to 32 bytes before the next sound's data begins. | ||
==== | ==== Sample Directory chunk ==== | ||
The Sample Directory chunk (chunk 4 in Metroid Prime, chunk 3 in Metroid Prime 2) is made up of two sets of tables. The structure of both these tables is identical between both games. | The Sample Directory chunk (chunk 4 in Metroid Prime, chunk 3 in Metroid Prime 2) is made up of two sets of tables. The structure of both these tables is identical between both games. |