VAB (PS Sound Source Data)
Group of VAG waveforms and their playback attributes.
| Header file | .VH |
|---|---|
| Body file | .VB |
| ID | VABp |
This is an old revision of this page, as edited by RemmyLee at 02:47, 23 October 2026. Edit this revision | Latest revision
Overview
The VAB format manages several VAG files as a single group, and it is handled as a single file at runtime. A VAB file contains the sounds, sound effects and other sound data that are used in a scene.1
The data is managed in a hierarchy of programs and tone lists, which supports multitimbral (multisampling) functions. Several tone lists can reference the same waveform. Each tone list has its own playback parameters, and the same waveform can therefore give different sounds. The limits of the hierarchy are as follows:1
| Item | Maximum |
|---|---|
| Programs per VAB | 128 |
| Tone lists per program | 16 |
| VAG files per VAB | 254 |
Organization
A VAB is divided into a header (.VH) and a body (.VB). The header holds the bank attributes and the program, tone and VAG offset tables. The body holds the VAG waveforms from VAG (0) to the VAG count, and each VAG can be up to 516,096 bytes.2
| Field | Byte count |
|---|---|
| ID (VABp) | 4 |
| Version | 4 |
| VAB ID | 4 |
| Waveform size | 4 |
| System reserved | 2 |
| Number of programs | 2 |
| Number of tones | 2 |
| VAG count | 2 |
| Master volume | 1 |
| Master pan | 1 |
| Bank attribute 1 (user defined) | 1 |
| Bank attribute 2 (user defined) | 1 |
| System reserved | 4 |
| Program attribute table | 16 x 128 (maximum programs) |
| Tone attribute table | 32 x 16 (maximum tones) x number of programs |
| VAG offset table | 512 |
Structure
Each attribute in the VAB header can be set dynamically at execution time through a structure. The structures are described in the libsnd section of the Run-Time Library Reference, and the header holds them as follows:2
| Area | Structure |
|---|---|
| First 32 bytes | VabHdr |
| Program attribute table | ProgAtr, one for each of 128 programs |
| Tone attribute table | VagAtr, one for each tone |
VAG Offset Table
The VAG offset table holds the size of each VAG as a 16-bit short that is shifted right by 3 bits. The actual size of a VAG is therefore 8 times its table value. In the manual's example below, the Offset row is the running total of the actual sizes:23
| VAG# | 0 | 1 | 2 |
|---|---|---|---|
| VAG offset table | 0x1000 | 0x0800 | 0x0200 |
| Actual size | 0x8000 | 0x4000 | 0x1000 |
| Offset | 0x8000 | 0xc000 | 0xd000 |