<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="downsamp">
  <refmeta>
    <refentrytitle>downsamp</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>downsamp</refname>
    <refpurpose>
      Modify a signal by down-sampling.
      <indexterm id="IndexDownsamp"><primary>downsamp</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Modify a signal by down-sampling.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>kr <command>downsamp</command> asig [, iwlen]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>iwlen</emphasis> (optional) -- window length in samples over which the audio signal is averaged to determine a downsampled value. Maximum length is <emphasis>ksmps</emphasis>; 0 and 1 imply no window averaging. The default value is 0.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>downsamp</emphasis> converts an audio signal to a control signal by downsampling. It produces one kval for each audio control period. The optional window invokes a simple averaging process to suppress foldover.
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the downsamp opcode. It uses the files <ulink url="examples/downsamp.orc"><citetitle>downsamp.orc</citetitle></ulink> and <ulink url="examples/downsamp.sco"><citetitle>downsamp.sco</citetitle></ulink>.

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

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

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

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="diff"><citetitle>diff</citetitle></link>,
      <link linkend="integ"><citetitle>integ</citetitle></link>,
      <link linkend="interp"><citetitle>interp</citetitle></link>,
      <link linkend="samphold"><citetitle>samphold</citetitle></link>,
      <link linkend="upsamp"><citetitle>upsamp</citetitle></link>
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>Example written by &namekevin;.</para>
  </refsect1>
</refentry>
