<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="oscilikt">
  <refmeta>
    <refentrytitle>oscilikt</refentrytitle>
  </refmeta>

  <refnamediv>
    <refname>oscilikt</refname>
    <refpurpose>
      A linearly interpolated oscillator that allows changing the table number at k-rate.
      <indexterm id="IndexOscilikt"><primary>oscilikt</primary></indexterm>
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
      <emphasis>oscilikt</emphasis> is very similar to <link linkend="oscili"><citetitle>oscili</citetitle></link>, but allows changing the table number at k-rate. It is slightly slower than <emphasis>oscili</emphasis> (especially with high control rate), although also more accurate as it uses a 31-bit phase accumulator, as opposed to the 24-bit one used by oscili.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>oscilikt</command> xamp, xcps, kfn [, iphs] [, istor]</synopsis>

    <synopsis>kr <command>oscilikt</command> kamp, kcps, kfn [, iphs] [, istor]</synopsis>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>iphs</emphasis> (optional, defaults to 0) -- initial phase in the range 0 to 1. Other values are wrapped to the allowed range.
    </para>

    <para>
      <emphasis>istor</emphasis> (optional, defaults to 0) -- skip initialization.
    </para>
  </refsect1>

  <refsect1>
    <title>Performance</title>

    <para>
      <emphasis>kamp</emphasis>, <emphasis>xamp</emphasis> -- amplitude.
    </para>

    <para>
      <emphasis>kcps</emphasis>, <emphasis>xcps</emphasis> -- frequency in Hz. Zero and negative values are allowed. However, the absolute value must be less than <link linkend="sr"><citetitle>sr</citetitle></link> (and recommended to be less than sr/2).
    </para>

    <para>
      <emphasis>kfn</emphasis> -- function table number. Can be varied at control rate (useful to <quote>morph</quote> waveforms, or select from a set of band-limited tables generated by <link linkend="GEN30"><citetitle>GEN30</citetitle></link>).
    </para>
  </refsect1>

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

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

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

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

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="osciliktp"><citetitle>osciliktp</citetitle></link> and
      <link linkend="oscilikts"><citetitle>oscilikts</citetitle></link>.
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>Author: &nameistvan;</para>
    <para>Example written by &namekevin;.</para>
    <para>New in version 4.22</para>
  </refsect1>
</refentry>
