vbap8
Prev | Orchestra Opcodes and Operators | Next

## vbap8

vbap8 — Distributes an audio signal among 8 channels.

## Description

Distributes an audio signal among 8 channels.

## Syntax

    ar1, ..., ar8 vbap8 asig, kazim [, kelev] [, kspread]

## Performance

asig -- audio signal to be panned

kazim -- azimuth angle of the virtual source

kelev (optional) -- elevation angle of the virtual source

kspread (optional) -- spreading of the virtual source (range 0 - 100). If value is zero, conventional amplitude panning is used. When kspread is increased, the number of loudspeakers used in panning increases. If value is 100, the sound is applied to all loudspeakers.

vbap8 takes an input signal, asig, and distributes it among 8 outputs, according to the controls kazim and kelev, and the configured loudspeaker placement. If idim = 2, kelev 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.

| Warning
Please note that all vbap panning opcodes require the vbap system to be initialized using vbaplsinit.

## Example

Here is a simple example of the vbap8 opcode. It uses the file vbap8.csd.

Example 978. Example of the vbap8 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
    ; Audio out   Audio in
    ;-odac           -iadc    ;;;RT audio I/O
    ; For Non-realtime ouput leave only the line below:
    -o vbap8.wav -W ;;; for file output any platform
    </CsOptions>
    <CsInstruments>

      sr       =          44100
      kr       =           441
      ksmps    =           100
      nchnls   =             4
      vbaplsinit          2, 8,  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
    ; or use an 8-channel output for realtime output (set nchnls to 8):
    ;        outo a1,a2,a3,a4,a5,a6,a7,a8
              endin

    </CsInstruments>
    <CsScore>
    f 1 0 8192 10 1
    ; Play Instrument #1 for one second.
    ;          azimuth
    i 1 0 1      20
    i 1 + .      40
    i 1 + .      60
    i 1 + .      80
    i 1 + .      100
    i 1 + .      120
    i 1 + .      140
    i 1 + .      160
    e

    </CsScore>
    </CsoundSynthesizer>

## 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, vbap8move, vbaplsinit, 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. Input parameters accept k-rate since Csund 5.09.

Prev | Up | Next
vbap4move | Home | vbap8move