| 1 | |
| 2 | <refentry id="vbapg"> |
| 3 | <indexterm id="IndexVbapg"><primary>vbapg</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Modifiers:Panning and Spatialization</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>vbapg</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>vbapg</refname> |
| 11 | <refpurpose> |
| 12 | Calculates the gains for a sound location between multiple channels. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Calculates the gains for a sound location for up to 64. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis>k1[, k2...] <command>vbapg</command> kazim [,kelev] [, kspread] [, ilayout]</synopsis> |
| 26 | <synopsis>karray[] <command>vbapg</command> kazim [,kelev] [, kspread] [, ilayout]</synopsis> |
| 27 | </refsect1> |
| 28 | |
| 29 | <refsect1> |
| 30 | <title>Initialization</title> |
| 31 | <para> |
| 32 | <emphasis>ilayout</emphasis> -- index of the speaker layout in |
| 33 | the range 0-99, corresponding to a call to |
| 34 | <emphasis>vbaplsinit</emphasis>. The default value is 0. |
| 35 | </para> |
| 36 | </refsect1> |
| 37 | |
| 38 | <refsect1> |
| 39 | <title>Performance</title> |
| 40 | <para> |
| 41 | <emphasis>kazim</emphasis> -- azimuth angle of the virtual source |
| 42 | </para> |
| 43 | |
| 44 | <para> |
| 45 | <emphasis>kelev</emphasis> (optional) -- elevation angle of the virtual source |
| 46 | </para> |
| 47 | |
| 48 | <para> |
| 49 | <emphasis>kspread</emphasis> (optional) -- spreading of the |
| 50 | virtual source (range 0 - 100). If value is zero, conventional |
| 51 | amplitude panning is used. When <emphasis>kspread</emphasis> is |
| 52 | increased, the number of loudspeakers used in panning |
| 53 | increases. If value is 100, the sound is applied to all |
| 54 | loudspeakers. |
| 55 | </para> |
| 56 | |
| 57 | <para> |
| 58 | <emphasis>vbapg</emphasis> calculates the gains that an input |
| 59 | signal would have between multiple speakers |
| 60 | according to the controls <emphasis>kazim</emphasis> and |
| 61 | <emphasis>kelev</emphasis>, and the configured loudspeaker |
| 62 | placement <emphasis>ilayout</emphasis>. If <emphasis>idim</emphasis> = 2, |
| 63 | <emphasis>kelev</emphasis> is set to zero. The distribution is |
| 64 | performed using Vector Base Amplitude Panning (VBAP - See |
| 65 | reference). VBAP distributes the signal using loudspeaker data |
| 66 | configured with <emphasis>vbaplsinit</emphasis>. The signal is |
| 67 | applied to, at most, two loudspeakers in 2-D loudspeaker |
| 68 | configurations, and three loudspeakers in 3-D loudspeaker |
| 69 | configurations. If the virtual source is panned outside the |
| 70 | region spanned by loudspeakers, the nearest loudspeakers are |
| 71 | used in panning. |
| 72 | </para> |
| 73 | <warning> |
| 74 | <para>Please note that all <emphasis>vbap</emphasis> panning opcodes require the <emphasis>vbap</emphasis> system to be initialized using <link linkend="vbaplsinit"><citetitle>vbaplsinit</citetitle></link>.</para> |
| 75 | </warning> |
| 76 | </refsect1> |
| 77 | |
| 78 | <refsect1> |
| 79 | <title>Examples</title> |
| 80 | <para> |
| 81 | </para> |
| 82 | </refsect1> |
| 83 | |
| 84 | <refsect1> |
| 85 | <title>Reference</title> |
| 86 | <para> |
| 87 | 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. |
| 88 | </para> |
| 89 | </refsect1> |
| 90 | |
| 91 | <refsect1> |
| 92 | <title>Examples</title> |
| 93 | <para> |
| 94 | Here is an example of the vbapg opcode. It uses the file <ulink url="examples/vbapg.csd"><citetitle>vbapg.csd</citetitle></ulink>. |
| 95 | <example> |
| 96 | <title>Example of the vbapg opcode.</title> |
| 97 | <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para> |
| 98 | <xi:include href="examples-xml/vbapg.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 99 | </example> |
| 100 | Its output should include lines like these: |
| 101 | <screen> |
| 102 | spread of source = 0 |
| 103 | spread of source = 8 |
| 104 | spread of source = 17 |
| 105 | spread of source = 25 |
| 106 | spread of source = 33 |
| 107 | spread of source = 42 |
| 108 | spread of source = 50 |
| 109 | spread of source = 58 |
| 110 | spread of source = 67 |
| 111 | spread of source = 75 |
| 112 | spread of source = 83 |
| 113 | spread of source = 92 |
| 114 | spread of source = 100 |
| 115 | </screen> |
| 116 | </para> |
| 117 | </refsect1> |
| 118 | |
| 119 | <refsect1> |
| 120 | <title>See also</title> |
| 121 | <para><link linkend="SigmodPanspatl"><citetitle>Panning and Spatialization: Vector Base Amplitude Panning</citetitle></link></para> |
| 122 | </refsect1> |
| 123 | |
| 124 | <refsect1> |
| 125 | <title>Credits</title> |
| 126 | <para> |
| 127 | <simplelist> |
| 128 | <member>Author: Ville Pulkki</member> |
| 129 | <member>Sibelius Academy Computer Music Studio</member> |
| 130 | <member>Laboratory of Acoustics and Audio Signal Processing</member> |
| 131 | <member>Helsinki University of Technology</member> |
| 132 | <member>Helsinki, Finland</member> |
| 133 | <member>May 2000</member> |
| 134 | <member>Author: &namejohn;</member> |
| 135 | <member>July 2012, Sept 2013</member> |
| 136 | </simplelist> |
| 137 | </para> |
| 138 | |
| 139 | <para>New in Csound Version 5.17.13. </para> |
| 140 | <para>Array version new in Csound Version 6.01. </para> |
| 141 | </refsect1> |
| 142 | </refentry> |