<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="comb">
  <refmeta>
    <refentrytitle>comb</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>comb</refname>
    <refpurpose>
      Reverberates an input signal with a <quote>colored</quote> frequency response.
      <indexterm id="IndexComb"><primary>comb</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Reverberates an input signal with a <quote>colored</quote> frequency response.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>comb</command> asig, krvt, ilpt [, iskip] [, insmps]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ilpt</emphasis> -- loop time in seconds, which determines the <quote>echo density</quote> of the reverberation. This in turn characterizes the <quote>color</quote> of the <emphasis>comb</emphasis> filter whose frequency response curve will contain <emphasis>ilpt</emphasis> * <emphasis>sr</emphasis>/2 peaks spaced evenly between 0 and <emphasis>sr</emphasis>/2 (the Nyquist frequency). Loop time can be as large as available memory will permit. The space required for an <emphasis>n</emphasis> second loop is 4<emphasis>n</emphasis>*<emphasis>sr</emphasis> bytes. Delay space is allocated and returned as in <link linkend="delay"><citetitle>delay</citetitle></link>.
    </para>

    <para>
      <emphasis>iskip</emphasis> (optional, default=0) -- initial disposition of delay-loop data space (cf. <link linkend="reson"><citetitle>reson</citetitle></link>). The default value is 0.
    </para>

    <para>
      <emphasis>insmps</emphasis> (optional, default=0) -- delay amount, as a number of samples.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>krvt</emphasis> -- the reverberation time (defined as the time in seconds for a signal to decay to 1/1000, or 60dB down from its original amplitude).
    </para>

    <para>
      This filter reiterates input with an echo density determined by loop time <emphasis>ilpt</emphasis>. The attenuation rate is independent and is determined by <emphasis>krvt</emphasis>, the reverberation time (defined as the time in seconds for a signal to decay to 1/1000, or 60dB down from its original amplitude). Output from a comb filter will appear only after <emphasis>ilpt</emphasis> seconds.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the comb opcode. It uses the files <ulink url="examples/comb.orc"><citetitle>comb.orc</citetitle></ulink> and <ulink url="examples/comb.sco"><citetitle>comb.sco</citetitle></ulink>.

      <example>
        <title>Example of the comb opcode.</title>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/comb.orc" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/comb.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="alpass"><citetitle>alpass</citetitle></link>,
      <link linkend="reverb"><citetitle>reverb</citetitle></link>,
      <link linkend="valpass"><citetitle>valpass</citetitle></link>,
      <link linkend="vcomb"><citetitle>vcomb</citetitle></link>
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: William <quote>Pete</quote> Moss (<emphasis>vcomb</emphasis> and <emphasis>valpass</emphasis>)</member>
        <member>University of Texas at Austin</member>
        <member>Austin, Texas USA</member>
        <member>January 2002</member>
      </simplelist>
    </para>
    <para>Example written by &namekevin;.</para>
  </refsect1>
</refentry>
