<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="GEN15">
  <refmeta>
    <refentrytitle>GEN15</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>GEN15</refname>
    <refpurpose>
      Creates two tables of stored polynomial functions.
      <indexterm id="IndexGEN15"><primary>GEN15</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      This subroutine creates two tables of stored polynomial functions, suitable for use in phase quadrature operations.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis><command>f</command> # time size 15 xint xamp h0 phs0 h1 phs1 h2 phs2 ...</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>size</emphasis> -- number of points in the table. Must be a power of 2 or a power-of-2 plus 1 (see <link linkend="f"><citetitle>f statement</citetitle></link>). The normal value is power-of-2 plus 1.
    </para>

    <para>
      <emphasis>xint</emphasis> -- provides the left and right values [<emphasis>-xint</emphasis>, <emphasis>+xint</emphasis>] of the <emphasis>x</emphasis> interval over which the polynomial is to be drawn. This subroutine will eventually call <link linkend="GEN03"><citetitle>GEN03</citetitle></link> to draw both functions; this p5 value is therefor expanded to a negative-positive p5, p6 pair before <emphasis>GEN03</emphasis> is actually called. The normal value is 1.
    </para>

    <para>
      <emphasis>xamp </emphasis> -- amplitude scaling factor of the sinusoid input that is expected to produce the following spectrum.
    </para>

    <para>
      <emphasis>h0, h1, h2, ... hn</emphasis> -- relative strength of partials 0 (DC), 1 (fundamental), 2 ... that will result when a sinusoid of amplitude 

      <literallayout>
xamp * int(size/2)/xint
      </literallayout>

      is waveshaped using this function table. These values thus describe a frequency spectrum associated with a particular factor <emphasis>xamp</emphasis> of the input signal.
    </para>

    <para>
      <emphasis>phs0, phs1, ... </emphasis> -- phase in degrees of desired harmonics <emphasis>h0, h1, ...</emphasis> when the two functions of <emphasis>GEN15</emphasis> are used with phase quadrature.
    </para>

    <note>
      <title>Note</title>
      <para>
        <emphasis>GEN15</emphasis> creates two tables of equal size, labeled <emphasis>f </emphasis># and <emphasis>f</emphasis> # + 1. Table # will contain a Chebyshev function of the first kind, drawn using <link linkend="GEN03"><citetitle>GEN03</citetitle></link> with partial strengths <emphasis>h0cos(phs0), h1cos(phs1), ...</emphasis> Table #+1 will contain a Chebyshev function of the 2nd kind by calling <link linkend="GEN14"><citetitle>GEN14</citetitle></link> with partials <emphasis>h1sin(phs1), h2sin(phs2),...</emphasis> (note the harmonic displacement). The two tables can be used in conjunction in a waveshaping network that exploits phase quadrature.
      </para>
    </note>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="GEN03"><citetitle>GEN03</citetitle></link>,
      <link linkend="GEN13"><citetitle>GEN13</citetitle></link>, and
      <link linkend="GEN14"><citetitle>GEN14</citetitle></link>.
    </para>
  </refsect1>
</refentry>
