Format ‐ Wave Table - waffleoRai/zeqer64 GitHub Wiki
Zeqer Wave Table
The wave table stores metadata for sound samples such as the attached name, hash, and flags.
Byte Order: Big-Endian
Current Version: 3 (As of 2023/07/16)
File Format
Header
Header Size: 0x10
Offset | Type | Size | Field Name | Description |
---|---|---|---|---|
0x00 | char[8] | 8 | Magic Number | Identifier ("zeqrWAVt") |
0x08 | u16 | 2 | Flags | (Reserved) |
0x0A | s16 | 2 | Version | File version stored as a short. |
0x0C | s32 | 4 | Entry Count | Number of entries in the table. |
Entry Format (V2+)
Format
Offset | Type | Size | Field Name | Description | Versions |
---|---|---|---|---|---|
0x00 | u32 | 4 | UID | Wave/sample instance ID. Should be unique for all samples.* | |
0x04 | u16 | 2 | Flags | Wave flags (metadata). Marks ways wave can be used. (See flag section below) | |
0x06 | s8 | 1 | Unity Key | MIDI note wave is considered to match by default. Can use as root for tuning. | |
0x07 | s8 | 1 | Fine Tune | Fine tune in cents for default wave tuning. | |
0x08 | u8[16] | 16 | MD5 | MD5 sum of the just the audio data (encoded as it would appear on ROM). | |
0x18 | VLS 2x2 | Var | Name | Name of sample (UTF8). | |
Var | s16 | 2 | Tag Count | Number of stored tags. | 3+ |
Var | VLS 2x2 | Var | Tag String | Semicolon delimited list of tags stored as single string (UTF8). | 3+ |
* UIDs of 0x00000000
(0) and 0xFFFFFFFF
(-1 signed) denote an empty UID field.
Flags
Bit | Flag |
---|---|
0 | Is music sample |
1 | Is actor sound |
2 | Is environment sound |
3 | Is sound effect |
4 | Is voice sample |
5 | Is unused |
6 | Used in standard instrument |
7 | Used in percussion instrument |
8 | Used in SFX instrument |
9 | In OoT 1.0 |
10 | In OoT 1.1/1.2 |
11 | In MM |
12 | In OoT 1.0 main wave archive/samplebank |
13 | In OoT 1.1/1.2 main wave archive/samplebank |
14 | In MM main wave archive/samplebank |
15 | User custom |