<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="scans">
  <refmeta>
    <refentrytitle>scans</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>scans</refname>
    <refpurpose>
      Generate audio output using scanned synthesis.
      <indexterm id="IndexScans"><primary>scans</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Generate audio output using scanned synthesis.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>scans</command> kamp, kfreq, ifn, id [, iorder]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ifn</emphasis> -- ftable containing the scanning trajectory.  This is a series of numbers that contains addresses of masses.  The order of these addresses is used as the scan path.  It should not contain values greater than the number of masses, or negative numbers. See the <link linkend="SiggenScanTop"><citetitle>introduction to the scanned synthesis section</citetitle></link>.
    </para>

    <para>
      <emphasis>id</emphasis> -- ID number of the <link linkend="scanu"><citetitle>scanu</citetitle></link> opcode's waveform to use
    </para>

    <para>
      <emphasis>iorder</emphasis> (optional, default=0) -- order of interpolation used internally.  It can take any value in the range 1 to 4, and defaults to 4, which is quartic interpolation.  The setting of 2 is quadratic and 1 is linear.  The higher numbers are slower, but not necessarily better.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>kamp</emphasis> -- output amplitude.  Note that the resulting amplitude is also dependent on instantaneous value in the wavetable.  This number is effectively the scaling factor of the wavetable.
    </para>

    <para>
      <emphasis>kfreq</emphasis> -- frequency of the scan rate
    </para>
  </refsect1>
 
  <refsect1 id="scanexamp">
    <title>Examples</title> 
    <para>
      Here is an example of the scanned synthesis. It uses the files <ulink url="examples/scans.orc"><citetitle>scans.orc</citetitle></ulink>, <ulink url="examples/scans.sco"><citetitle>scans.sco</citetitle></ulink>, and <ulink url="examples/string-128.matrix"><citetitle>string-128.matrix</citetitle></ulink>.

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

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

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

    <para>
      The matrix file <quote>string-128.matrix</quote>, as well as several other matrices, is also available in a <ulink url="http://www.csounds.com/scanned/zip/scanmatrices.zip"><citetitle>zipped file</citetitle></ulink> from the <ulink url="http://www.csounds.com/scanned/"><citetitle>Scanned Synthesis page</citetitle></ulink> at cSounds.com.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &nameparis;</member>
        <member>MIT Media Lab</member>
        <member>Boston, Massachussetts USA</member>
      </simplelist>
    </para>

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