| Crates.io | vbap |
| lib.rs | vbap |
| version | 0.1.0 |
| created_at | 2026-01-02 21:11:43.468268+00 |
| updated_at | 2026-01-02 21:11:43.468268+00 |
| description | Vector Base Amplitude Panning for spatial audio |
| homepage | |
| repository | https://github.com/PoHsuanLai/vbap |
| max_upload_size | |
| id | 2019205 |
| size | 47,648 |
Vector Base Amplitude Panning (VBAP) positions virtual sound sources in a speaker array by computing gain coefficients for the 2-3 speakers nearest to the source direction. Originally described by Ville Pulkki in 1997.
Inspired by Ardour's implementation.
use vbap::VBAPanner;
let panner = VBAPanner::builder()
.stereo()
.build()
.unwrap();
let gains = panner.compute_gains(15.0, 0.0); // 15° left
stereo() - L/R at ±30°surround_5_1() - standard 5.1surround_7_1() - standard 7.1atmos_7_1_4() - 7.1.4 with height speakerslet panner = VBAPanner::builder()
.add_speaker(30.0, 0.0) // azimuth, elevation
.add_speaker(-30.0, 0.0)
.add_speaker(110.0, 0.0)
.add_speaker(-110.0, 0.0)
.build()
.unwrap();
MIT