VAB (PS Sound Source Data): Difference between revisions
| Revision as of 02:22, 23 October 2026 RemmyLee (Hardware and system software pages from the Sony manuals) | Revision as of 02:27, 23 October 2026 RemmyLee (File format pages from the Sony File Formats manual) | ||
| Line 1: | Line 1: | ||
| + | --- | ||
| + | title: VAB (PS Sound Source Data) | ||
| + | type: format | ||
| + | summary: Group of VAG waveforms and their playback attributes. | ||
| + | category: File formats | ||
| + | info: Header file = .VH | ||
| + | info: Body file = .VB | ||
| + | info: ID = VABp | ||
| + | --- | ||
| + | |||
| + | ## Overview | ||
| + | |||
| + | The VAB format manages several [VAG](/formats/vag/) files as one group. It is handled as a single file at runtime.[^ff45] | ||
| + | |||
| + | A VAB file holds the sounds and sound effects that are used in a scene.[^ff45] | ||
| + | |||
| + | VAB data is managed in a hierarchy of programs and tones. The hierarchy supports multitimbral (multisampling) functions.[^ff45] | ||
| + | |||
| + | The limits are as follows: | ||
| + | |||
| + | Table: VAB limits | ||
| + | |||
| + | | Item | Maximum | | ||
| + | | --- | --- | | ||
| + | | Programs per VAB | 128 | | ||
| + | | Tone lists per program | 16 | | ||
| + | | VAG files per VAB | 254 | | ||
| + | |||
| + | Several tone lists can reference the same waveform. Each tone list sets its own playback parameters, so one waveform can give different sounds.[^ff45] | ||
| + | |||
| + | ## Organization | ||
| + | |||
| + | A VAB has a header (.VH) and a body (.VB).[^ff46] | ||
| + | |||
| + | The header has the following fields: | ||
| + | |||
| + | Table: VAB header (.VH) | ||
| + | |||
| + | | 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 | | ||
| + | | Tone attribute table | 32 x 16 x number of programs | | ||
| + | | VAG offset table | 512 | | ||
| + | |||
| + | The body (.VB) holds the VAG waveforms from VAG (0) to the VAG count. Each VAG can be up to 516,096 bytes.[^ff46] | ||
| + | |||
| + | ## Structure | ||
| + | |||
| + | Each attribute in the header can be set at execution time through a structure.[^ff46] | ||
| + | |||
| + | The header holds the following structures: | ||
| + | |||
| + | Table: VAB header structures | ||
| + | |||
| + | | Area | Structure | | ||
| + | | --- | --- | | ||
| + | | First 32 bytes | VabHdr | | ||
| + | | Program attribute table | ProgAtr, one for each of 128 programs | | ||
| + | | Tone attribute table | VagAtr, one for each tone | | ||
| + | |||
| + | The structures are described in the libsnd section of the Run-Time Library Reference.[^ff46] | ||
| + | |||
| + | ### VAG Offset Table | ||
| + | |||
| + | The VAG offset table holds the size of each VAG as a 16-bit short. The size is shifted right by 3 bits.[^ff46] | ||
| + | |||
| + | The manual gives this example:[^ff47] | ||
| + | |||
| + | Table: VAG offset table | ||
| + | |||
| + | | VAG# | 0 | 1 | 2 | | ||
| + | | --- | --- | --- | --- | | ||
| + | | VAG offset table | 0x1000 | 0x0800 | 0x0200 | | ||
| + | | Actual size | 0x8000 | 0x4000 | 0x1000 | | ||
| + | | Offset | 0x8000 | 0xc000 | 0xd000 | | ||
| + | |||
| + | ## References | ||
| + | |||
| + | [^ff45]: Sony Computer Entertainment Inc. File Formats. November 1998. Page 4-5. | ||
| + | [^ff46]: Sony Computer Entertainment Inc. File Formats. November 1998. Page 4-6, Figure 202. | ||
| + | [^ff47]: Sony Computer Entertainment Inc. File Formats. November 1998. Page 4-7, Table 4-1. | ||