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

  <refnamediv>
    <refname>osciliktp</refname>
    <refpurpose>
      A linearly interpolated oscillator that allows allows phase modulation.
      <indexterm id="IndexOsciliktp"><primary>osciliktp</primary></indexterm>
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
      <emphasis>osciliktp</emphasis> allows phase modulation (which is actually implemented as k-rate frequency modulation, by differentiating phase input). The disadvantage is that there is no amplitude control, and frequency can be varied only at the control-rate. This opcode can be faster or slower than <link linkend="oscilikt"><citetitle>oscilikt</citetitle></link>, depending on the control-rate.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>osciliktp</command> kcps, kfn, kphs [, istor]</synopsis>
  </refsect1>

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

  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>ar</emphasis> -- audio-rate ouptut signal.
    </para>

    <para>
      <emphasis>kcps</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>
    <para>
      <emphasis>kphs</emphasis> -- phase (k-rate), the expected range is 0 to 1. The absolute value of the difference of the current and previous value of <emphasis>kphs</emphasis> must be less than <link linkend="ksmps"><citetitle>ksmps</citetitle></link>.
    </para>
  </refsect1>

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

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

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

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

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

  <refsect1>
    <title>Credits</title>
    <para>Author: &nameistvan;</para>
    <para>New in version 4.22</para>
  </refsect1>
</refentry>
