<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="dcblock">
  <refmeta>
    <refentrytitle>dcblock</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>dcblock</refname>
    <refpurpose>
      A DC blocking filter.
      <indexterm id="IndexDcblock"><primary>dcblock</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Implements the DC blocking filter
      <literallayout>
Y[i] = X[i] - X[i-1] + (igain * Y[i-1])
      </literallayout>
    </para>

    <para>
      Based on work by &nameperry;.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>dcblock</command> ain [, igain]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>igain</emphasis> -- the gain of the filter, which defaults to 0.99
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>ain</emphasis> -- audio signal input
    </para>
  </refsect1>

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

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

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

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/dcblock.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>
      </simplelist>
    </para>
    <para>Example written by &namekevin;.</para>

    <para>New in Csound version 3.49</para>
    <para>February 2003: Thanks to a note from Anders Andersson, corrected the formula.</para>
  </refsect1>
</refentry>
