Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:VAB

From ReverseEngineering.wiki
Format
Platforms Platform:PlayStation
Magic 70 42 41 56 ("pBAV") at 0x0
Extensions .VAB, .VH, .VB
Endianness little
On this wiki Facts · Code · Notes · Topics

Sony's PlayStation sound bank: a header (VH, magic "pBAV") with up to 128 programs of up to 16 tones each, and a body (VB) of headerless SPU-ADPCM samples; stored as one .VAB file or as separate .VH and .VB files, played by the SEQ/SEP sequences.

Overview

A VAB maps MIDI-style program and note numbers to samples ("tones") with volume, pan, key range and ADSR. The Format:SEQ and SEP sequences select its programs. The samples are Format:SPU-ADPCM (PlayStation) blocks without per-sample headers, to be uploaded to SPU RAM; Sony recommended at most 0x7E000 bytes of ADPCM per bank.

Header (VH)

Offset Size Meaning
0x00 4 ID "pBAV"
0x04 4 version (usually 7; 5, 6 and 0x20 seen)
0x08 4 VAB id (usually 0)
0x0C 4 total size of VH plus VB
0x10 2 reserved 0xEEEE
0x12 2 program count minus 1 (max 128 programs)
0x14 2 tone count
0x16 2 VAG count
0x18 1+1 master volume (usually 0x7F), master pan (usually 0x40)
0x1A 1+1 bank attributes (user defined)
0x1C 4 reserved 0xFFFFFFFF
0x20 0x800 128 program attribute records of 0x10 bytes (fixed size)
0x820 P*0x200 tone attributes, 16 tones of 0x20 bytes per program that exists
next 0x200 256 16-bit VAG sizes, divided by 8
next ADPCM data (in a .VAB; in a separate .VB otherwise)

Program record (0x10 bytes): tones (count), mvol, prior, mode, mpan, reserved, attr (u16), reserved. Tone record (0x20 bytes): prior, mode, vol, pan, center note, fine tune (shift), min note, max note, vibW, vibT, porW, porT, pbmin, pbmax, two reserved bytes, ADSR1 (u16), ADSR2 (u16), program number (u16), VAG number (u16), eight reserved bytes. Field names follow Sony's libsnd structures.

Evidence & references

  • psx-spx, "CDROM File Audio Sample Sets VAB and VH/VB (Sony)" (docs/cdromfileformats.md in the psx-spx mirror).
  • Unverified: exact tone-count and VAG-count conventions (minus one or not) are marked uncertain in that document.