<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="adsynt">
  <refmeta>
    <refentrytitle>adsynt</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>adsynt</refname>
    <refpurpose>
      Performs additive synthesis with an arbitrary number of partials, not necessarily harmonic.
      <indexterm id="IndexAdsynt"><primary>adsynt</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Performs additive synthesis with an arbitrary number of partials, not necessarily harmonic.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>adsynt</command> kamp, kcps, iwfn, ifreqfn, iampfn, icnt [, iphs]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>iwfn</emphasis> -- table containing a waveform, usually a sine. Table values are not interpolated for performance reasons, so larger tables provide better quality.
    </para>

    <para>
      <emphasis>ifreqfn</emphasis> -- table containing frequency values for each partial. <emphasis>ifreqfn</emphasis> may contain beginning frequency values for each partial, but is usually used for generating parameters at runtime with <emphasis>tablew</emphasis>. Frequencies must be relative to <emphasis>kcps</emphasis>. Size must be at least <emphasis>icnt</emphasis>.
    </para>

    <para>
      <emphasis>iampfn</emphasis> -- table containing amplitude values for each partial. <emphasis>iampfn</emphasis> may contain beginning amplitude values for each partial, but is usually used for generating parameters at runtime with <emphasis>tablew</emphasis>. Amplitudes must be relative to <emphasis>kamp</emphasis>. Size must be at least <emphasis>icnt</emphasis>.
    </para>

    <para>
      <emphasis>icnt</emphasis> -- number of partials to be generated
    </para>

    <para>
      <emphasis>iphs</emphasis> -- initial phase of each oscillator, if <emphasis>iphs</emphasis> = -1, initialization is skipped. If <emphasis>iphs</emphasis> &gt; 1, all phases will be initialized with a random value.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>kamp</emphasis> -- amplitude of note
    </para>

    <para>
      <emphasis>kcps</emphasis> -- base frequency of note. Partial frequencies will be relative to <emphasis>kcps</emphasis>.
    </para>

    <para>
       Frequency and amplitude of each partial is given in the two tables provided. The purpose of this opcode is to have an instrument generate synthesis parameters at k-rate and write them to global parameter tables with the <emphasis>tablew</emphasis> opcode.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the adsynt opcode. It uses the files <ulink url="examples/adsynt.orc"><citetitle>adsynt.orc</citetitle></ulink> and <ulink url="examples/adsynt.sco"><citetitle>adsynt.sco</citetitle></ulink>. These two instruments perform additive synthesis. The output of each sounds like a Tibetan bowl. The first one is static, as parameters are only generated at init-time. In the second one, parameters are continuously changed.

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

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

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/adsynt.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: Peter Neub&auml;cker</member>
        <member>Munich, Germany</member>
        <member>August, 1999</member>
      </simplelist>
    </para>

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