vbaplsinit idim, ils_amount, idir1, idir2,...
a1, a2, a3, a4 vbapl4 asig, iazi,iele
a1, a2, a3, a4,
a5, a6, a7, a8 vbapl8 asig, iazi,iele
a1, a2, a3, a4 vbapl4move asig, ifld_amount, ifld1, ifld2, ...
a1, a2, a3, a4,
a5, a6, a7, a8 vbapl8move asig, ifld_amount, ifld1, ifld2, ...
Distribute an audio signal amongst two to eight channels with
localization control.
ils_amount - number of loudspeakers. In two dimensions the number can vary between two to eight. In three dimensions the number can vary between three and eight.
idirn - directions of loudspeakers, number of directions must be less or equal than 8. 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,...).
asig - audio signal to be panorated.
iazi - azimuth angle of the virtual source.
iele - elevation angle of the virtual source
ifld_amount - number of fields (absolute value must be 2 or larger). If ifld_amount is positive, the virtual source movement is a polyline specified by given directions, each transition is performed in an equal time interval. If ifld_amount is negative, specified angular velocities are applied to the virtual source during specified relative time intervals (see below).
ifldn - Azimuth angles or angular velocities, and relative durations of movement phases (see below).
vbapl4move and vbapl8move allow moving virtual sources to be applied. If ifld_amount is positive, the fields represent directions of virtual sources and equal times, iazi1, [iele1,] iazi2, [iele2,] .... The position of the virtual source is interpolated between directions starting from first direction and ending to last. Each interval is interpolated in time that is fraction total_time / number_of_intervals of the duration of the sound event.
If ifld_amount 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 angular velocity is negated. Thus the elevational angular velocity produces a virtual source that moves up and down between 0 and 90 degrees.
sr = 44100
kr = 441
ksmps = 100
nchnls = 4
vbaplsinit 2, 6, 0, 45, 90, 135, 200, 315,
instr 1 ;parameter
asig oscil 20000, 440, 1 ; p4 = azimuth
a1, a2, a3, a4, a5, a6, a7, a8 vbapl8 asig, p4, 0
outq a1,a2,a3,a4
; outq a5,a6,a7,a8
endin
Implementation by Ville Pulkki Sibelius Academy Computer Music Studio Laboratory of Acoustics and Audio Signal Processing Helsinki University of Technology August 1998