| 1 | |
| 2 | <refentry id="lowpass2"> |
| 3 | <indexterm id="IndexLowpass2"><primary>lowpass2</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Modifiers:Standard Filters:Resonant</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>lowpass2</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>lowpass2</refname> |
| 13 | <refpurpose> |
| 14 | A resonant lowpass filter. |
| 15 | </refpurpose> |
| 16 | </refnamediv> |
| 17 | |
| 18 | <refsect1> |
| 19 | <title>Description</title> |
| 20 | <para> |
| 21 | Implementation of a resonant second-order lowpass filter. |
| 22 | </para> |
| 23 | </refsect1> |
| 24 | |
| 25 | <refsect1> |
| 26 | <title>Syntax</title> |
| 27 | <synopsis>ares <command>lowpass2</command> asig, kcf, kq [, iskip]</synopsis> |
| 28 | </refsect1> |
| 29 | |
| 30 | <refsect1> |
| 31 | <title>Initialization</title> |
| 32 | <para> |
| 33 | <emphasis>iskip</emphasis> -- initial disposition of internal data space. A zero value will clear the space; a non-zero value will allow previous information to remain. The default value is 0. |
| 34 | </para> |
| 35 | </refsect1> |
| 36 | |
| 37 | <refsect1> |
| 38 | <title>Performance</title> |
| 39 | <para> |
| 40 | <emphasis>asig</emphasis> -- input signal to be filtered |
| 41 | </para> |
| 42 | |
| 43 | <para> |
| 44 | <emphasis>kcf</emphasis> -- cutoff or resonant frequency of the filter, measured in Hz |
| 45 | </para> |
| 46 | |
| 47 | <para> |
| 48 | <emphasis>kq</emphasis> -- Q of the filter, defined, for bandpass filters, as bandwidth/cutoff. <emphasis>kq</emphasis> should be between 1 and 500 |
| 49 | </para> |
| 50 | |
| 51 | <para> |
| 52 | <emphasis>lowpass2</emphasis> is a second order IIR lowpass filter, with k-rate controls for cutoff frequency (<emphasis>kcf</emphasis>) and Q (<emphasis>kq</emphasis>). As <emphasis>kq</emphasis> is increased, a resonant peak forms around the cutoff frequency, transforming the lowpass filter response into a response that is similar to a bandpass filter, but with more low frequency energy. This corresponds to an increase in the magnitude and "sharpness" of the resonant peak. For high values of <emphasis>kq</emphasis>, a scaling function such as <emphasis>balance</emphasis> may be required. In practice, this allows for the simulation of the voltage-controlled filters of analog synthesizers, or for the creation of a pitch of constant amplitude while filtering white noise. |
| 53 | </para> |
| 54 | </refsect1> |
| 55 | |
| 56 | <refsect1> |
| 57 | <title>Examples</title> |
| 58 | <para> |
| 59 | Here is an example of the lowpass2 opcode. It uses the file <ulink url="examples/lowpass2.csd"><citetitle>lowpass2.csd</citetitle></ulink>. |
| 60 | |
| 61 | <example> |
| 62 | <title>Example of the lowpass2 opcode.</title> |
| 63 | |
| 64 | |
| 65 | |
| 66 | <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para> |
| 67 | <xi:include href="examples-xml/lowpass2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 68 | </example> |
| 69 | </para> |
| 70 | </refsect1> |
| 71 | |
| 72 | <refsect1> |
| 73 | <title>See also</title> |
| 74 | <para><link linkend="SigmodStandard"><citetitle>Standard Filters: Resonant Low-pass filters</citetitle></link></para> |
| 75 | </refsect1> |
| 76 | |
| 77 | <refsect1> |
| 78 | <title>Credits</title> |
| 79 | <para> |
| 80 | <simplelist> |
| 81 | <member>Author: &namesean;</member> |
| 82 | <member>Seattle, Washington</member> |
| 83 | <member>August 1999</member> |
| 84 | </simplelist> |
| 85 | </para> |
| 86 | |
| 87 | <para>New in Csound version 4.0</para> |
| 88 | </refsect1> |
| 89 | </refentry> |