| 1 | <refentry id="svn"> |
| 2 | <indexterm id="IndexSvn"><primary>svn</primary></indexterm> |
| 3 | <refentryinfo><title>Signal Modifiers:Standard Filters:Resonant</title></refentryinfo> |
| 4 | <refmeta> |
| 5 | <refentrytitle>svn</refentrytitle> |
| 6 | </refmeta> |
| 7 | <refnamediv> |
| 8 | <refname>svn</refname> |
| 9 | <refpurpose> |
| 10 | Non-linear state variable filter |
| 11 | </refpurpose> |
| 12 | </refnamediv> |
| 13 | |
| 14 | <refsect1> |
| 15 | <title>Description</title> |
| 16 | <para> |
| 17 | This opcode implements a non-linear state variable filter with |
| 18 | overdrive control and optional user-defined non-linear transfer function. |
| 19 | </para> |
| 20 | </refsect1> |
| 21 | |
| 22 | <refsect1> |
| 23 | <title>Syntax</title> |
| 24 | <synopsis>ahp,alp,abp,abr <command>svn</command> asig, xcf, xQ, |
| 25 | kdrive[, ifn,inm,imx, istor]</synopsis> |
| 26 | </refsect1> |
| 27 | |
| 28 | <refsect1> |
| 29 | <title>Initialization</title> |
| 30 | <para> |
| 31 | <emphasis>ifn</emphasis> -- if non-zero, a function table number |
| 32 | containing the transfer function for the filter non-linearity. This |
| 33 | should be mid-point centered and defined in the interval -imx to |
| 34 | imx. If zero, the filter employs an internal non-linear map |
| 35 | based on a hyperbolic tangent. Defaults to 0. |
| 36 | </para> |
| 37 | <para> |
| 38 | <emphasis>inm</emphasis> -- if non-zero, a function table number |
| 39 | containing a normalising transfer function, generated from ifn |
| 40 | (using GEN 4). Defaults to 0. |
| 41 | </para> |
| 42 | <para> |
| 43 | <emphasis>imx</emphasis> -- The absolute max of the function |
| 44 | table domain, which is defined as -imx to imx. Defaults to 1. |
| 45 | </para> |
| 46 | <para> |
| 47 | <emphasis>istor</emphasis> --initial disposition of internal |
| 48 | data space. Since filtering incorporates a feedback loop of |
| 49 | previous output, the initial status of the storage space used is |
| 50 | significant. A zero value will clear the space; a non-zero |
| 51 | value will allow previous information to remain. The default |
| 52 | value is 0. |
| 53 | </para> |
| 54 | |
| 55 | </refsect1> |
| 56 | |
| 57 | <refsect1> |
| 58 | <title>Performance</title> |
| 59 | <para> |
| 60 | <emphasis>ahp,alp,abp,abr</emphasis> -- highpass, lowpass, |
| 61 | bandpass and bandreject ouputs. |
| 62 | </para> |
| 63 | <para> |
| 64 | <emphasis>asig</emphasis> -- input |
| 65 | </para> |
| 66 | <para> |
| 67 | <emphasis>xcf</emphasis> -- filter |
| 68 | cutoff frequency (a- or k-rate) |
| 69 | </para> |
| 70 | <para> |
| 71 | <emphasis>xQ</emphasis> -- filter Q (min 0.5) (a- or k-rate). |
| 72 | </para> |
| 73 | <para> |
| 74 | <emphasis>kdrive</emphasis> -- overdrive factor. With the |
| 75 | internal non-linear map, values above |
| 76 | 0.125 will introduce progressively more non-linearities in the |
| 77 | filter signal. When using a user-supplied transfer function, the |
| 78 | amount of distortion introduced by this parameter will depend on |
| 79 | the function employed. A value of 0 makes the filter completely linear. |
| 80 | The amount of drive is also dependent on the level of the input |
| 81 | signal. If this signal is significantly less than 0dBFS, then proportionally |
| 82 | more drive is needed to introduce non-linearities in the |
| 83 | signal. With a 0dBFS-level input, 100% drive is achieved with |
| 84 | kdrive=1. With hotter input levels, kdrive can be used to |
| 85 | moderate the non-linear distortion in the filter. |
| 86 | </para> |
| 87 | </refsect1> |
| 88 | <refsect1> |
| 89 | <title>Examples</title> |
| 90 | <para> |
| 91 | Here is an example of the svn opcode. It uses the file <ulink url="examples/svn.csd"><citetitle>svn.csd</citetitle></ulink>. |
| 92 | <example> |
| 93 | <title>Example of the svn opcode.</title> |
| 94 | <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> |
| 95 | <xi:include href="examples-xml/svn.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 96 | </example> |
| 97 | </para> |
| 98 | </refsect1> |
| 99 | |
| 100 | <refsect1> |
| 101 | <title>See also</title> |
| 102 | <para><link linkend="SigmodStandard"><citetitle>Standard Filters: Resonant Low-pass filters</citetitle></link></para> |
| 103 | </refsect1> |
| 104 | |
| 105 | <refsect1> |
| 106 | <title>Credits</title> |
| 107 | <para> |
| 108 | <simplelist> |
| 109 | <member>Author: &namevictor;</member> |
| 110 | <member>Feb 2021</member> |
| 111 | </simplelist> |
| 112 | </para> |
| 113 | </refsect1> |
| 114 | </refentry> |