<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="oscil3">
  <refmeta>
    <refentrytitle>oscil3</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>oscil3</refname>
    <refpurpose>
      A simple oscillator with cubic interpolation.
      <indexterm id="IndexOscil3"><primary>oscil3</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Table <emphasis>ifn</emphasis> is incrementally sampled modulo the table length and the value obtained is multiplied by <emphasis>amp</emphasis>.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>oscil3</command> xamp, xcps, ifn [, iphs]</synopsis>

    <synopsis>kr <command>oscil3</command> kamp, kcps, 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) -- initial phase of sampling, 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>kamp, xamp</emphasis> -- amplitude
    </para>

    <para>
      <emphasis>kcps, xcps</emphasis> -- frequency in cycles per second.
    </para>

    <para>
      <emphasis>oscil3</emphasis> is experimental, and is identical to <link linkend="oscili"><citetitle>oscili</citetitle></link>, except that it uses cubic interpolation. (New in Csound version 3.50.)
    </para>
 </refsect1>
 
  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the oscil3 opcode. It uses the files <ulink url="examples/oscil3.orc"><citetitle>oscil3.orc</citetitle></ulink> and <ulink url="examples/oscil3.sco"><citetitle>oscil3.sco</citetitle></ulink>.

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

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

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

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="oscil"><citetitle>oscil</citetitle></link>,
      <link linkend="oscili"><citetitle>oscili</citetitle></link>
    </para>
  </refsect1>

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