vbaplsinit idim, ilsnum, idir1, idir2,... ar1, ar2, ar3, ar4 vbap4 asig, iazim, ielev, ispread ar1, ar2, ar3, ar4, ar5, ar6, ar7, ar8 vbap8 asig, iazim, ielev, ispread ar1, ar2, ar3, ar4, ar5, ar6, ar7, ar8, vbap16 asig, iazim, ielev, ispread ar9, ar10, ar11, ar12, ar13, ar14, ar15, ar16 ar1, ar2, ar3, ar4 vbap4move asig, ispread, ifldnum, ifld1, ifld2, ... ar1, ar2, ar3, ar4, ar5, ar6, ar7, ar8 vbap8move asig, ispread, ifldnum, ifld1, ifld2, ... ar1, ar2, ar3, ar4, ar5, ar6, ar7, ar8, vbap16move asig, ispread, ifldnum, ifld1, ifld2, ... ar9, ar10, ar11, ar12, ar13, ar14, ar15, ar16 vbapz inumchnls, istartndx, asig, iazim, ielev, ispread vbapzmove inumchnls, istartndx, ispread, ifldnum, ifld1, ifld2,...
Distribute an audio signal among 2 to 16 channels or write it to a ZAK array, all with localization control.
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, etc. – 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.).
iazim – azimuth angle of the virtual source
ielev – elevation angle of the virtual source
ispread – spreading of the virtual source (range 0 - 100). If value is zero, conventional amplitude panning is used. When ispread is increased, the number of loudspeakers used in panning increases. If value is 100, the sound is applied to all loudspeakers.
ifldnum – number of fields (absolute value must be 2 or larger). If ifldnum is positive, the virtual source movement is a polyline specified by given directions. Each transition is performed in an equal time interval. If ifldnum is negative, specified angular velocities are applied to the virtual source during specified relative time intervals (see below).
ifld1, ifld2, etc. – azimuth angles or angular velocities, and relative durations of movement phases (see below).
inumchnls – number of channels to write to the ZA array. Must be in the range 2 - 256.
istartndx – first index or position in the ZA array to use
asig – audio signal to be panned
vbap4, vbap8, and vbap16 take an input signal, asig, and distribute it among 2 to 32 outputs, according to the controls iazim and ielev, and the configured loudspeaker placement. If idim = 2, ielev is set to zero. The distribution is performed using Vector Base Amplitude Panning (VBAP - See reference). 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.
vbap4move, vbap8move, and vbap16move allow the use of moving virtual sources. If ifldnum is positive, the fields represent directions of virtual sources and equal times, iazi1, [iele1,] iazi2, [iele2,], etc. The position of the virtual source is interpolated between directions starting from the first direction and ending at the last. Each interval is interpolated in time that is fraction total_time / number_of_intervals of the duration of the sound event.
If ifldnum is negative, the fields represent angular velocities and equal times. The first field is, however, the starting direction, iazi1, [iele1,] iazi_vel1, [iele_vel1,] iazi_vel2, [iele_vel2,] .... Each velocity is applied to the note that is fraction total_time / number_of_velocities of the duration of the sound event. If the elevation of the virtual source becomes greater than 90 degrees or less than 0 degrees, the polarity of angular velocity is changed. Thus the elevational angular velocity produces a virtual source that moves up and down between 0 and 90 degrees.
The opcodes vbapz and vbapzmove are the multiple channel analogs of the above opcodes, working on inumchnls and using a ZAK array for output.
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
Ville Pulkki: "Virtual Sound Source Positioning Using Vector Base Amplitude Panning"
Journal of the Audio Engineering Society,
1997 June, Vol. 45/6, p. 456.
Sibelius Academy Computer Music Studio
Laboratory of Acoustics and Audio Signal Processing
Helsinki University of Technology
May, 2000 (New in Csound Version 4.16)
John ffitch (vbapz, vbabzmove)
University of Bath/Codemist Ltd.
May, 2000 (New in Csound Version 4.16)