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

    <refpurpose>
      Another controllable envelope extractor.
      <indexterm id="IndexFollow2"><primary>follow2</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      A controllable envelope extractor using the algorithm attributed to Jean-Marc Jot.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>follow2</command> asig, katt, krel</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>asig</emphasis> -- the input signal whose envelope is followed
    </para>
    <para>
      <emphasis>katt</emphasis> -- the attack rate (60dB attack time in seconds)
    </para>
    <para>
      <emphasis>krel</emphasis> -- the decay rate (60dB decay time in seconds)
    </para>
    <para>
      The output tracks the amplitude envelope of the input signal. The rate at which the output grows to follow the signal is controlled by the <emphasis>katt</emphasis>, and the rate at which it decreases in response to a lower amplitude, is controlled by the <emphasis>krel</emphasis>. This gives a smoother envelope than <emphasis>follow</emphasis>.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the follow2 opcode. It uses the files <ulink url="examples/follow2.orc"><citetitle>follow2.orc</citetitle></ulink>, <ulink url="examples/follow2.sco"><citetitle>follow2.sco</citetitle></ulink>, and <ulink url="examples/beats.wav"><citetitle>beats.wav</citetitle></ulink>.

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

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

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/follow2.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namejohn;</member>
        <member>The algorithm for the <emphasis>follow2</emphasis> is attributed to Jean-Marc Jot.</member>
        <member>University of Bath, Codemist Ltd.</member>
        <member>Bath, UK</member>
        <member>February 2000</member>
      </simplelist>
    </para>
    <para>Example written by &namekevin;.</para>

    <para>New in Csound version 4.03</para>
    <para>Added notes by &namerasmus; on September 2002.</para>
  </refsect1>
</refentry>
