VAB (PS Sound Source Data): Difference between revisions
| Revision as of 02:46, 23 October 2026 RemmyLee (SPU and CD-ROM at register depth; CPU overview rewritten) | Revision as of 02:47, 23 October 2026 RemmyLee (Formats: Sony paragraph voice; HMD, RSD extended files, full BS code book; sprite editor formats) | ||
| Line 11: | Line 11: | ||
| ## Overview | ## Overview | ||
| − | The VAB format manages several [VAG](/formats/vag/) files as one group. It is handled as a single file at runtime.[^ff45] | + | 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] |
| − | A VAB file holds the sounds and sound effects 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] |
| − | 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 | Table: VAB limits | ||
| Line 27: | Line 23: | ||
| | VAG files per VAB | 254 | | | 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 | ## Organization | ||
| − | A VAB has a header (.VH) and a body (.VB).[^ff46] | + | 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] |
| − | The header has the following fields: | ||
| − | |||
| Table: VAB header (.VH) | Table: VAB header (.VH) | ||
| Line 52: | Line 44: | ||
| | Bank attribute 2 (user defined) | 1 | | | Bank attribute 2 (user defined) | 1 | | ||
| | System reserved | 4 | | | System reserved | 4 | | ||
| − | | Program attribute table | 16 x 128 | | + | | Program attribute table | 16 x 128 (maximum programs) | |
| − | | Tone attribute table | 32 x 16 x number of programs | | + | | Tone attribute table | 32 x 16 (maximum tones) x number of programs | |
| | VAG offset table | 512 | | | 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 | ## Structure | ||
| − | Each attribute in the header can be set at execution time through a structure.[^ff46] | + | 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] |
| − | The header holds the following structures: | ||
| − | |||
| Table: VAB header structures | Table: VAB header structures | ||
| Line 72: | Line 60: | ||
| | Tone attribute table | VagAtr, one for each tone | | | 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 | ### 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 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] |
| − | The manual gives this example:[^ff47] | ||
| − | |||
| Table: VAG offset table | Table: VAG offset table | ||