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

  <refnamediv>
    <refname>waveset</refname>
    <refpurpose>
      A simple time stretch by repeating cycles.
      <indexterm id="IndexWaveset"><primary>waveset</primary></indexterm>
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>

    <para>
      A simple time stretch by repeating cycles.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>waveset</command> ain, krep [, ilen]</synopsis>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ilen</emphasis> (optional, default=0) -- the length (in samples) of the audio signal. If <emphasis>ilen</emphasis> is set to 0, it defaults to half the given note length (p3).
    </para>
  </refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>ain</emphasis> -- the input audio signal.
    </para>

    <para>
      <emphasis>krep</emphasis> -- the number of times the cycle is repeated.
    </para>

    <para>
      The input is read and each complete cycle (two zero-crossings) is repeated krep times.
    </para>

    <para>
      There is an internal buffer as the output is clearly slower that the input.  Some care is taken if the buffer is too short, but there may be strange effects.
    </para>
  </refsect1>

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

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

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

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

  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namejohn;</member>
        <member>February 2001</member>
      </simplelist>
    </para>
    <para>Example written by &namekevin;.</para>

    <para>New in version 4.11</para>
  </refsect1>
</refentry>
