<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="foscili">
  <refmeta>
    <refentrytitle>foscili</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>foscili</refname>
    <refpurpose>
      Basic frequency modulated oscillator with linear interpolation.
      <indexterm id="Indexfoscili"><primary>foscili</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Basic frequency modulated oscillator with linear interpolation.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>foscili</command> xamp, kcps, xcar, xmod, kndx, ifn [, iphs]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ifn</emphasis> -- function table number. Requires a wrap-around guard point.
    </para>

    <para>
      <emphasis>iphs</emphasis> (optional, default=0) -- initial phase of waveform in table <emphasis>ifn</emphasis>, expressed as a fraction of a cycle (0 to 1). A negative value will cause phase initialization to be skipped. The default value is 0.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>xamp</emphasis> -- the amplitude of the output signal.
    </para>

    <para>
      <emphasis>kcps</emphasis> -- the frequency of the output signal measured in cycles per second.
    </para>

    <para>
      <emphasis>xcar</emphasis> -- the carrier frequency.
    </para>

    <para>
      <emphasis>xmod</emphasis> -- the modulating frequency.
    </para>

    <para>
      <emphasis>kndx</emphasis> -- the modulation index.
    </para>

    <para>
      <emphasis>foscili</emphasis> differs from <link linkend="foscil"><citetitle>foscil</citetitle></link> in that the standard procedure of using a truncated phase as a sampling index is here replaced by a process that interpolates between two successive lookups. Interpolating generators will produce a noticeably cleaner output signal, but they may take as much as twice as long to run. Adequate accuracy can also be gained without the time cost of interpolation by using large stored function tables of 2K, 4K or 8K points if the space is available.
    </para>
  </refsect1>

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

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

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

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

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