vbapgmove — Calculates the gains for a sound location between multiple channels with moving virtual sources.
Calculates the gains for a sound location between multiple channels with moving virtual sources.
kr1[, kr2...] vbapgmove idur, ispread, ifldnum, ifld1 \
[, ifld2] [...]
karray[] vbapgmove idur, ispread, ifldnum, ifld1 \
[, ifld2] [...]
idur -- the duration over which the movement takes place.
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, ... -- azimuth angles or angular velocities, and relative durations of movement phases (see below).
vbapgmove allows 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.
Warning | |
---|---|
Please note that all vbap panning opcodes require the vbap system to be initialized using vbaplsinit. |
Here is an example of the vbapgmove opcode. It uses the file vbapgmove.csd.
Example 1169. Example of the vbapg opcode.
See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
<CsoundSynthesizer> <CsOptions> ; Select audio/midi flags here according to platform -odac ;;;realtime audio out ;-iadc ;;;uncomment -iadc if realtime audio input is needed too ; For Non-realtime ouput leave only the line below: ; -o vbapgmove.wav -W ;;; for file output any platform </CsOptions> <CsInstruments> sr = 44100 ksmps = 32 nchnls = 4 ;quad 0dbfs = 1 vbaplsinit 2, 4, 0, 90, 180, 270 instr 1 asig diskin2 "drumsMlp.wav", 1, 0, 1 ;loop drumsMlp.wav k0,k1,k2,k3 vbapgmove p3, 1, 2, 310, 180 ;change movement of soundsource in outq k0*asig,k1*asig,k2*asig,k3*asig ;the rear speakers endin </CsInstruments> <CsScore> i 1 0 5 e </CsScore> </CsoundSynthesizer>