<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="vdelayxq">
  <refmeta>
    <refentrytitle>vdelayxq</refentrytitle>
  </refmeta>

  <refnamediv>
    <refname>vdelayxq</refname>
    <refpurpose>
      A 4-channel variable delay opcode with high quality interpolation.
      <indexterm id="IndexVdelayxq"><primary>vdelayxq</primary></indexterm>
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
      A 4-channel variable delay opcode with high quality interpolation.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>aout1, aout2, aout3, aout4 <command>vdelayxq</command> ain1, ain2, ain3, ain4, adl, imd, iws [, ist]</synopsis>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>aout1, aout2, aout3, aout4</emphasis> -- output audio signals.
    </para>

    <para>
      <emphasis>ain1, ain2, ain3, ain4</emphasis> -- input audio signals.
    </para>

    <para>
      <emphasis>adl</emphasis> -- delay time in seconds
    </para>

    <para>
      <emphasis>imd</emphasis> -- max. delay time (seconds)
    </para>

    <para>
      <emphasis>iws</emphasis> -- interpolation window size (see below)
    </para>

    <para>
      <emphasis>ist</emphasis> (optional) -- skip initialization if not zero
    </para>
  </refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      This opcode uses high quality (and slow) interpolation, that is much more accurate than the currently available linear and cubic interpolation. The <emphasis>iws</emphasis> parameter sets the number of input samples used for calculating one output sample (allowed values are any integer multiply of 4 in the range 4 - 1024); higher values mean better quality and slower speed.
    </para>

    <para>
      The multichannel opcodes (eg. <emphasis>vdelayxq</emphasis>) allow delaying 2 or 4 variables at once (stereo or quad signals); this is much more efficient than using separate opcodes for each channel.
    </para>

    <note>
      <title>Notes</title>
      <para>
        <itemizedlist>
          <listitem><para>Delay time is measured in seconds (unlike in vdelay and vdelay3), and must be a-rate.</para></listitem>
          <listitem><para>The minimum allowed delay is iws/2 samples.</para></listitem>
          <listitem><para>Using the same variables as input and output is allowed in these opcodes.</para></listitem>
          <listitem><para>In vdelayxw*, changing the delay time has some effects on output volume: <literallayout>a = 1 / (1 + dt)</literallayout> where a is the output gain, and dt is the change of delay time per seconds.</para></listitem>
          <listitem><para>These opcodes are best used in the double-precision version of Csound.</para></listitem>
        </itemizedlist>
      </para>
    </note>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="vdelayx"><citetitle>vdelayx</citetitle></link>,
      <link linkend="vdelayxs"><citetitle>vdelayxs</citetitle></link>,
      <link linkend="vdelayxw"><citetitle>vdelayxw</citetitle></link>,
      <link linkend="vdelayxwq"><citetitle>vdelayxwq</citetitle></link>,
      <link linkend="vdelayxws"><citetitle>vdelayxws</citetitle></link>
    </para>
  </refsect1>
</refentry>
