| 1 | |
| 2 | <refentry id="skf"> |
| 3 | <indexterm id="IndexSkf"><primary>skf</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Modifiers:Standard Filters:Resonant</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>skf</refentrytitle> |
| 7 | </refmeta> |
| 8 | <refnamediv> |
| 9 | <refname>skf</refname> |
| 10 | <refpurpose> |
| 11 | Sallen-Key filter. |
| 12 | </refpurpose> |
| 13 | </refnamediv> |
| 14 | |
| 15 | <refsect1> |
| 16 | <title>Description</title> |
| 17 | <para> |
| 18 | Skf is an digital implementation of a linear Sallen-Key |
| 19 | analogue filter, which is a second-order filter with either |
| 20 | lowpass or highpass responses. |
| 21 | </para> |
| 22 | </refsect1> |
| 23 | |
| 24 | <refsect1> |
| 25 | <title>Syntax</title> |
| 26 | <synopsis>asig <command>skf</command> asig, xcf, xK[, ihp, istor]</synopsis> |
| 27 | </refsect1> |
| 28 | |
| 29 | <refsect1> |
| 30 | <title>Initialization</title> |
| 31 | <para> |
| 32 | <emphasis>ihp</emphasis> -- if non-zero, select highpass |
| 33 | response. Defaults to 0 (lowpass). |
| 34 | </para> |
| 35 | <para> |
| 36 | <emphasis>istor</emphasis> --initial disposition of internal |
| 37 | data space. Since filtering incorporates a feedback loop of |
| 38 | previous output, the initial status of the storage space used is |
| 39 | significant. A zero value will clear the space; a non-zero |
| 40 | value will allow previous information to remain. The default |
| 41 | value is 0. |
| 42 | </para> |
| 43 | |
| 44 | </refsect1> |
| 45 | |
| 46 | <refsect1> |
| 47 | <title>Performance</title> |
| 48 | <para> |
| 49 | <emphasis>asig</emphasis> -- input |
| 50 | </para> |
| 51 | <para> |
| 52 | <emphasis>xcf</emphasis> -- filter |
| 53 | cutoff frequency (a- or k-rate) |
| 54 | </para> |
| 55 | |
| 56 | <para> |
| 57 | <emphasis>xK</emphasis> -- Sallen-Key opamp gain, in the range 1 |
| 58 | to 3. At 3 the filter self-oscillates. K=1.586 gives a |
| 59 | Butterworth response, higher values are equivalent to Chebyshev |
| 60 | responses (with peaking). At K=1 the filter is critically damped |
| 61 | and the poles are real-valued. |
| 62 | </para> |
| 63 | </refsect1> |
| 64 | <refsect1> |
| 65 | <title>Examples</title> |
| 66 | <para> |
| 67 | Here is an example of the skf opcode. It uses the file <ulink url="examples/skf.csd"><citetitle>skf.csd</citetitle></ulink>. |
| 68 | <example> |
| 69 | <title>Example of the skf opcode.</title> |
| 70 | <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> |
| 71 | <xi:include href="examples-xml/skf.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 72 | </example> |
| 73 | </para> |
| 74 | </refsect1> |
| 75 | |
| 76 | <refsect1> |
| 77 | <title>See also</title> |
| 78 | <para><link linkend="SigmodStandard"><citetitle>Standard Filters: Resonant Low-pass filters</citetitle></link></para> |
| 79 | </refsect1> |
| 80 | |
| 81 | <refsect1> |
| 82 | <title>Credits</title> |
| 83 | <para> |
| 84 | <simplelist> |
| 85 | <member>Author: &namevictor;</member> |
| 86 | <member>Feb 2021</member> |
| 87 | </simplelist> |
| 88 | </para> |
| 89 | </refsect1> |
| 90 | </refentry> |