psx.wiki
Log in
Main page
Hardware
Hardware tests
System software
SDKs
File formats
Games
Tools
History
All pages
page
view source
history
View source for VAB (PS Sound Source Data)
← VAB (PS Sound Source Data)
You do not have permission to edit this page.
Log in
to edit.
--- 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 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.[^ff45] 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:[^ff45] Table: VAB limits | 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.[^ff46] 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 (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:[^ff46] 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 | ### 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:[^ff46][^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.