<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="GEN10">
  <refmeta>
    <refentrytitle>GEN10</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>GEN10</refname>
    <refpurpose>
      Generate composite waveforms made up of weighted sums of simple sinusoids.
      <indexterm id="IndexGEN10"><primary>GEN10</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      These subroutines generate composite waveforms made up of weighted sums of simple sinusoids. The specification of each contributing partial requires 1 pfield using <emphasis>GEN10</emphasis>.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis><command>f</command> # time size 10 str1 str2 str3 str4 ...</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>size</emphasis> -- number of points in the table. Must be a power of 2 or power-of-2 plus 1 (see <link linkend="f"><citetitle>f statement</citetitle></link>).
    </para>

    <para>
      <emphasis>str1, str2, str3, etc.</emphasis> -- relative strengths of the fixed harmonic partial numbers 1,2,3, etc., beginning in p5. Partials not required should be given a strength of zero.
    </para>

    <note>
      <title>Note</title>
      <para>
        <itemizedlist>
          <listitem>
            <para>
              These subroutines generate stored functions as sums of sinusoids of different frequencies. The two major restrictions on <emphasis>GEN10</emphasis> that the partials be harmonic and in phase do not apply to <emphasis>GEN09</emphasis> or <emphasis>GEN19</emphasis>.
            </para>

            <para>
              In each case the composite wave, once drawn, is then rescaled to unity if p4 was positive. A negative p4 will cause rescaling to be skipped.
            </para>
          </listitem>
        </itemizedlist>
      </para>
    </note>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is a simple example of the GEN10 routine. It uses the files <ulink url="examples/gen10.orc"><citetitle>gen10.orc</citetitle></ulink> and <ulink url="examples/gen10.sco"><citetitle>gen10.sco</citetitle></ulink>.  It will generate a simple sine wave. Here is its diagram:
      <mediaobject>
        <imageobject>
          <imagedata fileref="images/gen10.png" format="PNG">
        </imageobject>

        <textobject>
          <phrase>Diagram of the waveform generated by GEN10.</phrase>
        </textobject>

        <caption>
          <para>Diagram of the waveform generated by GEN10.</para>
        </caption>
      </mediaobject>

      <example>
        <title>A simple example of the GEN10 routine.</title>

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

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

  <refsect1>
     <title>See Also</title>
     <para>
       <link linkend="GEN09"><citetitle>GEN09</citetitle></link>,
       <link linkend="GEN11"><citetitle>GEN11</citetitle></link>, and
       <link linkend="GEN19"><citetitle>GEN19</citetitle></link>.
     </para>
  </refsect1>

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