vbaplsinit — Configures VBAP output according to loudspeaker parameters.
idim -- dimensionality of loudspeaker array. Either 2 or 3.
ilsnum -- number of loudspeakers. In two dimensions, the number can vary from 2 to 16. In three dimensions, the number can vary from 3 and 16.
idir1, idir2, ..., idir32 -- directions of loudspeakers. Number of directions must be less than or equal to 16. In two-dimensional loudspeaker positioning, idirn is the azimuth angle respective to nth channel. In three-dimensional loudspeaker positioning, fields are the azimuth and elevation angles of each loudspeaker consequently (azi1, ele1, azi2, ele2, etc.).
VBAP distributes the signal using loudspeaker data configured with vbaplsinit. The signal is applied to, at most, two loudspeakers in 2-D loudspeaker configurations, and three loudspeakers in 3-D loudspeaker configurations. If the virtual source is panned outside the region spanned by loudspeakers, the nearest loudspeakers are used in panning.
Example 415. 2-D panning example with stationary virtual sources
sr = 4100 kr = 441 ksmps = 100 nchnls = 4 vbaplsinit 2, 6, 0, 45, 90, 135, 200, 245, 290, 315 instr 1 asig oscil 20000, 440, 1 a1,a2,a3,a4,a5,a6,a7,a8 vbap8 asig, p4, 0, 20 ;p4 = azimuth ;render twice with alternate outq statements ; to obtain two 4 channel .wav files: outq a1,a2,a3,a4 ; outq a5,a6,a7,a8 endin