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

  <refnamediv>
    <refname>clfilt</refname>
    <refpurpose>
      Implements low-pass and high-pass filters of different styles.
      <indexterm id="IndexClfilt"><primary>clfilt</primary></indexterm>
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
       Implements the classical standard analog filter types: low-pass and high-pass. They are implemented with the four classical kinds of filters: Butterworth, Chebyshev Type I, Chebyshev Type II, and Elliptical.  The number of poles may be any even number from 2 to 80.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>clfilt</command> asig, kfreq, itype, inpol [, ikind] [, ipbr] [, isba] [, iskip]</synopsis>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>itype</emphasis> -- 0 for low-pass, 1 for high-pass.
    </para>

    <para>
      <emphasis>inpol</emphasis> -- The number of poles in the filter. It must be an even number from 2 to 80.
    </para>

    <para>
      <emphasis>ikind</emphasis> (optional) -- 0 for Butterworth, 1 for Chebyshev Type I, 2 for Chebyshev Type II, 3 for Elliptical. Defaults to 0 (Butterworth)
    </para>

    <para>
      <emphasis>ipbr</emphasis> (optional) -- The pass-band ripple in dB. Must be greater than 0. It is ignored by Butterworth and Chebyshev Type II. The default is 1 dB.
    </para>

    <para>
      <emphasis>isba</emphasis> (optional) -- The stop-band attenuation in dB. Must be less than 0. It is ignored by Butterworth and Chebyshev Type I. The default is -60 dB.
    </para>

    <para>
      <emphasis>iskip</emphasis> (optional) --  0 initializes all filter internal states to 0. 1 skips initialization. The default is 0.
    </para>
  </refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>asig</emphasis> -- The input audio signal.
    </para>

    <para>
      <emphasis>kfreq</emphasis> -- The corner frequency for low-pass or high-pass.
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the clfilt opcode as a low-pass filter. It uses the files <ulink url="examples/clfilt_lowpass.orc"><citetitle>clfilt_lowpass.orc</citetitle></ulink> and <ulink url="examples/clfilt_lowpass.sco"><citetitle>clfilt_lowpass.sco</citetitle></ulink>.

      <example>
        <title>Example of the clfilt opcode as a low-pass filter.</title>

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

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

    <para>
      Here is an example of the clfilt opcode as a high-pass filter. It uses the files <ulink url="examples/clfilt_highpass.orc"><citetitle>clfilt_highpass.orc</citetitle></ulink> and <ulink url="examples/clfilt_highpass.sco"><citetitle>clfilt_highpass.sco</citetitle></ulink>.

      <example>
        <title>Example of the clfilt opcode as a high-pass filter.</title>

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

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

  <refsect1>
    <title>Credits</title>
    <para>Author: Erik Spjut</para>
    <para>New in version 4.20</para>
  </refsect1>
</refentry>
