vbaplsinit
Prev | Orchestra Opcodes and Operators | Next

## vbaplsinit

vbaplsinit — Configures VBAP output according to loudspeaker parameters.

## Description

Configures VBAP output according to loudspeaker parameters.

## Syntax

    vbaplsinit idim, ilsnum [, idir1] [, idir2] [...] [, idir32]

## Initialization

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.).

## Performance

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.

## Examples

Here is an example of the vbaplsinit opcode. It uses the file vbaplsinit.csd.

Example 880. Example of the vbaplsinit 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 vbaplsinit.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

    sr = 44100
    ksmps = 32
    nchnls = 8
    0dbfs  = 1

    vbaplsinit 2, 8, 0, 45, 90, 180, 270, 0, 0, 0		;5 speakers for 5.1 amps

    instr 1

    asig diskin2 "beats.wav", 1, 0, 1			;loop beats.wav
    kazim line 1, p3, 355
    a1,a2,a3,a4,a5,a6,a7,a8 vbap8  asig, kazim, 0, 1	;change azimuth of soundsource
    ; Speaker mapping
    aFL = a1 						; Front Left
    aMF = a5 						; Mid Front
    aFR = a2 						; Front Right
    aBL = a3 						; Back Left
    aBR = a4 						; Back Right
        outo aFL,aFR,aBL,aBR,aMF,a6,a7,a8			;a6, a7 and a8 are dummies

    endin
    </CsInstruments>
    <CsScore>

    i 1 0 5

    e
    </CsScore>
    </CsoundSynthesizer>

See the other entries of the vbap opcodes for different examples.

## Reference

Ville Pulkki: “Virtual Sound Source Positioning Using Vector Base Amplitude Panning” Journal of the Audio Engineering Society, 1997 June, Vol. 45/6, p. 456.

## See Also

vbap16, vbap16move, vbap4, vbap4move, vbap8, vbap8move, vbapz, vbapzmove

## Credits

Author: Ville Pulkki
Sibelius Academy Computer Music Studio
Laboratory of Acoustics and Audio Signal Processing
Helsinki University of Technology
Helsinki, Finland
May 2000

New in Csound Version 4.07

Prev | Up | Next
vbap8move | Home | vbapz