
Vector Base Amplitude Panning (VBAP) for any 2D layout of speakers. From the position of a sound source and the positions of the speakers, it computes one gain coefficient per speaker: it looks for the two speakers closest to the source, computes the distance of the source to each of them and shares the signal between these two speakers. The coefficients are then shaped by a curve and normalized.
Give the positions of the speakers as two arrays, speakers X and speakers Y (one element per speaker, in the same order), move the source with source X and source Y, and multiply the audio sent to each speaker by the matching element of COEFFS.
The native audio-pan-vbap-vector-amplitude-2d module chooses the two speakers from the angle of the source around the center; this sub-patch chooses them from their distance to the source.
In the browser: tab modules, All Modules > Audio > Panner > Generalized VBAP 2D.
Horizontal position of the sound source.
Vertical position of the sound source.
Smoothing time of the panning: the higher it is, the more slowly the coefficients follow the movements of the source.
Array of the horizontal positions of the speakers, one element per speaker.
Array of the vertical positions of the speakers, in the same order as speakers X.
Array of the gain coefficients, one per speaker, in the order of speakers X and speakers Y. Only the two speakers closest to the source receive the signal.
version 7.0.250921
Edit All Pages