Anonymous

Changes

From Final Fantasy Inside

FF7/PSX/Sound/AKAO sequence

30 bytes added, 13:56, 31 May 2020
m
Replace ambiguous "frame" with another words
== Introduction ==
AKAO frames are sequence is the most complicated frames in part of the FF7 sound system. ("AKAO" is frame magicthe signature string, probably which implies that the sound format has developed by Minoru Akao, Square Enix sound programmer :) Minoru Akao.)
Frame AKAO sequence is similar to MIDI sequence - it's custom tracker format for playing sequence sound, well tuned specially for PSX.
This frames are The sequence data can be found in all FF7 game modules: Field, Battle, Worldmap and in minigames.
All files with exension *.SND are AKAO.
* '''MOVIE/OVER2.SND''' - same game over sequence, don't know, why to duplicate data
Other AKAO frames sequences are hard-wired in other files.
== AKAO frame structure File Structure ==
=== Header (size: 16 bytes) ===
struct AkaoHeader
{
static const uint8_t magic[4]; // "AKAO" C-string aka frame *MAGIC* uint16_t id; // frame song ID, used for playing sequence uint16_t length; // frame data length - sizeof(header)
uint16_t reverb_type; // reverb type (range from 0 to 9)
struct AkaoTimeStamp
struct AkaoChannelInfo
{
uint32_t mask; // represents bitmask of used channels in this framesong
uint32_t start_offsets[num_channels]; // offsets to channel opcode data
};
num_channels++;
First there is 32-bit number (offset 0x10), which represents bitmask of used channels in this framesong.
After this framebitmask, there is <channels count> offsets to channel opcode data counting from current offset. Each offsets is a relative offset based on the address *next to* the offset itself. (This is a general rule for early versions of AKAO to interpret relative offsets.)
=== Channel Commands [AKAO Opcodes] ===
Most complicated partFor every channel in AKAO sequence there is set of commands to perform. This is similar to Field opcodes. Here I'll call this sound commands "opcodes". Every opcode has it's own number of arguments (from no-arguments, to 3 arguments).
For every channel in AKAO frame there is set of commands to perform. This is similar to Field opcodes. Here I'll call this sound commands "opcodes". Every opcode has it's own number of arguments (from no-arguments, to 3 arguments). == Example (home-created AKAO framesequence): ==
=== Header ===
'''41 4b 41 4f''' - AKAO string
'''34 12''' - frame song ID: 0x1234
'''16 00''' - frame data length 0x16 in hex or 22 in decimal
'''04 00''' - reverb type: 4 (large studio)
'''96 12 18 22 46 28''' - unknown data1996-12-18T22:46:28
112
edits