<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="fold">
  <refmeta>
    <refentrytitle>fold</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>fold</refname>
    <refpurpose>
      Adds artificial foldover to an audio signal.
      <indexterm id="IndexFold"><primary>fold</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Adds artificial foldover to an audio signal.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>fold</command> asig, kincr</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>asig</emphasis> -- input signal
    </para>

    <para>
      <emphasis>kincr</emphasis> -- amount of foldover expressed in multiple of sampling rate. Must be &gt;= 1
    </para>

    <para>
      <emphasis>fold</emphasis> is an opcode which creates artificial foldover.  For example, when <emphasis>kincr</emphasis> is equal to 1 with sr=44100, no foldover is added. When <emphasis>kincr</emphasis> is set to 2, the foldover is equivalent to a downsampling to 22050, when it is set to 4, to 11025 etc. Fractional values of <emphasis>kincr</emphasis> are possible, allowing a continuous variation of foldover amount. This can be used for a wide range of special effects.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the fold opcode. It uses the files <ulink url="examples/fold.orc"><citetitle>fold.orc</citetitle></ulink> and <ulink url="examples/fold.sco"><citetitle>fold.sco</citetitle></ulink>.

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

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

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/fold.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namegabriel;</member>
        <member>Italy</member>
        <member>1999</member>
      </simplelist>
    </para>

    <para>New in Csound version 3.56</para>
  </refsect1>
</refentry>
