<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="vbap16">
  <refmeta>
    <refentrytitle>vbap16</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>vbap16</refname>
    <refpurpose>
      Distributes an audio signal among 16 channels.
      <indexterm id="IndexVbap16"><primary>vbap16</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Distributes an audio signal among 16 channels.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar1, ..., ar16 <command>vbap16</command> asig, iazim [, ielev] [, ispread]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>iazim</emphasis> -- azimuth angle of the virtual source
    </para>

    <para>
      <emphasis>ielev</emphasis> (optional) -- elevation angle of the virtual source
    </para>

    <para>
      <emphasis>ispread</emphasis> (optional) -- spreading of the virtual source (range 0 - 100).  If value is zero, conventional amplitude panning is used. When <emphasis>ispread</emphasis> is increased, the number of loudspeakers used in panning increases. If value is 100, the sound is applied to all loudspeakers.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>asig</emphasis> -- audio signal to be panned
    </para>

    <para>
      <emphasis>vbap16</emphasis> takes an input signal, <emphasis>asig</emphasis>, and distribute it among 16 outputs, according to the controls <emphasis>iazim</emphasis> and <emphasis>ielev</emphasis>, and the configured loudspeaker placement.  If <emphasis>idim</emphasis> = 2, <emphasis>ielev</emphasis> 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 <emphasis>vbaplsinit</emphasis>. 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.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Examples</title>
    <para>
      <example>
        <title>2-D panning example with stationary virtual sources</title>
        <programlisting>
  <emphasis>sr</emphasis>      =          4100
  <emphasis>kr</emphasis>      =           441
  <emphasis>ksmps</emphasis>   =           100
  <emphasis>nchnls</emphasis>  =             4
  <emphasis>vbaplsinit</emphasis>         2, 6,  0, 45, 90, 135, 200, 245, 290, 315 

          <emphasis>instr</emphasis> 1	           
  asig    <emphasis>oscil</emphasis>      20000, 440, 1                    
  a1,a2,a3,a4,a5,a6,a7,a8   <emphasis>vbap8</emphasis>  asig, p4, 0, 20 ;p4 = azimuth
	
  ;render twice with alternate <emphasis>outq</emphasis> statements
  ;  to obtain two 4 channel .wav files:

          <emphasis>outq</emphasis>       a1,a2,a3,a4
  ;       <emphasis>outq</emphasis>       a5,a6,a7,a8
          <emphasis>endin</emphasis>
        </programlisting>
      </example>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Reference</title>
    <para>
      Ville Pulkki: <quote>Virtual Sound Source Positioning Using Vector Base Amplitude Panning</quote> <emphasis>Journal of the Audio Engineering Society</emphasis>, 1997 June, Vol. 45/6, p. 456.
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="vbap16move"><citetitle>vbap16move</citetitle></link>,
      <link linkend="vbap4"><citetitle>vbap4</citetitle></link>,
      <link linkend="vbap4move"><citetitle>vbap4move</citetitle></link>,
      <link linkend="vbap8"><citetitle>vbap8</citetitle></link>,
      <link linkend="vbap8move"><citetitle>vbap8move</citetitle></link>,
      <link linkend="vbaplsinit"><citetitle>vbaplsinit</citetitle></link>,
      <link linkend="vbapz"><citetitle>vbapz</citetitle></link>,
      <link linkend="vbapzmove"><citetitle>vbapzmove</citetitle></link>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: Ville Pulkki</member>
        <member>Sibelius Academy Computer Music Studio</member>
        <member>Laboratory of Acoustics and Audio Signal Processing</member>
        <member>Helsinki University of Technology</member>
        <member>Helsinki, Finland</member>
        <member>May 2000</member>
      </simplelist>
    </para>

    <para>New in Csound Version 4.07</para>
  </refsect1>
</refentry>
