<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="lfo">
  <refmeta>
    <refentrytitle>lfo</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>lfo</refname>
    <refpurpose>
      A low frequency oscillator of various shapes.
      <indexterm id="Indexlfo"><primary>lfo</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      A low frequency oscillator of various shapes.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>kr <command>lfo</command> kamp, kcps [, itype]</synopsis>

    <synopsis>ar <command>lfo</command> kamp, kcps [, itype]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>itype</emphasis> (optional, default=0) -- determine the waveform of the oscillator. Default is 0.
      <itemizedlist>
        <listitem>
          <para><emphasis>itype</emphasis> = 0 - sine</para>
        </listitem>

        <listitem>
          <para><emphasis>itype</emphasis> = 1 - triangles</para>
        </listitem>

        <listitem>
          <para><emphasis>itype</emphasis> = 2 - square (bipolar)</para>
        </listitem>

        <listitem>
          <para><emphasis>itype</emphasis> = 3 - square (unipolar)</para>
        </listitem>

        <listitem>
          <para><emphasis>itype</emphasis> = 4 - saw-tooth</para>
        </listitem>

        <listitem>
          <para><emphasis>itype</emphasis> = 5 - saw-tooth(down)</para>
        </listitem>
      </itemizedlist>
    </para>

    <para>
      The sine wave is implemented as a 4096 table and linear interpolation. The others are calculated.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>kamp</emphasis> -- amplitude of output
    </para>

    <para>
      <emphasis>kcps</emphasis> -- frequency of oscillator
    </para>
  </refsect1>
 
  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the lfo opcode. It uses the files <ulink url="examples/lfo.orc"><citetitle>lfo.orc</citetitle></ulink> and <ulink url="examples/lfo.sco"><citetitle>lfo.sco</citetitle></ulink>.

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

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

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/lfo.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namejohn;</member>
        <member>University of Bath/Codemist Ltd.</member>
        <member>Bath, UK</member>
        <member>November 1998</member>
      </simplelist>
    </para>

    <para>New in Csound version 3.491</para>
  </refsect1>
</refentry>
