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

  <refnamediv>
    <refname>bqrez</refname>
    <refpurpose>
      A second-order multi-mode filter.
      <indexterm id="IndexBqrez"><primary>bqrez</primary></indexterm>
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
      A second-order multi-mode filter.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>bqrez</command> asig, xfco, xres [, imode]</synopsis>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>imode</emphasis> (optional, default=0) -- The mode of the filter. Choose from one of the following:
      <itemizedlist>
        <listitem><para>0 = low-pass (default)</para></listitem>
        <listitem><para>1 = high-pass</para></listitem>
        <listitem><para>2 = band-pass</para></listitem>
        <listitem><para>3 = band-reject</para></listitem>
        <listitem><para>4 = all-pass</para></listitem>
      </itemizedlist>
    </para>
  </refsect1>

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

    <para>
      <emphasis>asig</emphasis> -- input audio signal.
    </para>

    <para>
      <emphasis>xfco</emphasis> -- filter cut-off frequency in Hz. May be i-time, k-rate, a-rate.
    </para>

    <para>
      <emphasis>xres</emphasis> -- amount of resonance. Values of 1 to 100 are typical. Resonance should be one or greater. A value of 100 gives a 20dB gain at the cutoff frequency. May be i-time, k-rate, a-rate.
    </para>

    <para>
      All filter modes can be frequency modulated as well as the resonance can also be frequency modulated.
    </para>

    <para>
      <emphasis>bqrez</emphasis> is a resonant low-pass filter created using the Laplace s-domain equations for low-pass, high-pass, and band-pass filters normalized to a frequency. The bi-linear transform was used which contains a frequency transform constant from s-domain to z-domain to exactly match the frequencies together. Alot of trigonometric identities where used to simplify the calculation. It is very stable across the working frequency range up to the Nyquist frequency.
    </para>
  </refsect1>

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

      <example>
        <title>Example of the bqrez opcode borrowed from the <quote>rezzy</quote> opcode in Kevin Conder's manual.</title>

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

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

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="biquad"><citetitle>biquad</citetitle></link>, 
      <link linkend="moogvcf"><citetitle>moogvcf</citetitle></link>, 
      <link linkend="rezzy"><citetitle>rezzy</citetitle></link>
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: Matt Gerassimoff</member>
        <member>New in version 4.32</member>
        <member>Written in November 2002.</member>
      </simplelist>
    </para>
  </refsect1>
</refentry>
