| 1 | |
| 2 | <refentry id="resonx"> |
| 3 | <indexterm id="IndexResonx"><primary>resonx</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Modifiers:Standard Filters:Resonant</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>resonx</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>resonx</refname> |
| 11 | <refpurpose> |
| 12 | Emulates a stack of filters using the reson opcode. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | <emphasis>resonx</emphasis> is equivalent to a filters consisting of more layers of <link linkend="reson"><citetitle>reson</citetitle></link> with the same arguments, serially connected. Using a stack of a larger number of filters allows a sharper cutoff. They are faster than using a larger number instances in a Csound orchestra of the old opcodes, because only one initialization and k- cycle are needed at time and the audio loop falls entirely inside the cache memory of processor. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis>ares <command>resonx</command> asig, xcf, xbw [, inumlayer] [, iscl] [, iskip]</synopsis> |
| 26 | </refsect1> |
| 27 | |
| 28 | <refsect1> |
| 29 | <title>Initialization</title> |
| 30 | <para> |
| 31 | <emphasis>inumlayer</emphasis> (optional) -- number of elements in the filter stack. Default value is 4. |
| 32 | </para> |
| 33 | |
| 34 | <para> |
| 35 | <emphasis>iscl</emphasis> (optional, default=0) -- coded scaling factor for resonators. A value of 1 signifies a peak response factor of 1, i.e. all frequencies other than kcf are attenuated in accordance with the (normalized) response curve. A value of 2 raises the response factor so that its overall RMS value equals 1. (This intended equalization of input and output power assumes all frequencies are physically present; hence it is most applicable to white noise.) A zero value signifies no scaling of the signal, leaving that to some later adjustment (see <link linkend="balance"><citetitle>balance</citetitle></link>). The default value is 0. |
| 36 | </para> |
| 37 | |
| 38 | <para> |
| 39 | <emphasis>iskip</emphasis> (optional, default=0) -- initial disposition of internal data space. Since filtering incorporates a feedback loop of previous output, the initial status of the storage space used is significant. A zero value will clear the space; a non-zero value will allow previous information to remain. The default value is 0. |
| 40 | </para> |
| 41 | </refsect1> |
| 42 | |
| 43 | <refsect1> |
| 44 | <title>Performance</title> |
| 45 | <para> |
| 46 | <emphasis>asig</emphasis> -- input signal |
| 47 | </para> |
| 48 | |
| 49 | <para> |
| 50 | <emphasis>xcf</emphasis> -- the center frequency of the filter, or frequency position of the peak response. |
| 51 | </para> |
| 52 | |
| 53 | <para> |
| 54 | <emphasis>xbw</emphasis> -- bandwidth of the filter (the Hz difference between the upper and lower half-power points) |
| 55 | </para> |
| 56 | </refsect1> |
| 57 | |
| 58 | <refsect1> |
| 59 | <title>Examples</title> |
| 60 | <para> |
| 61 | Here is an example of the resonx opcodes. It uses the file <ulink url="examples/resonx.csd"><citetitle>resonx.csd</citetitle></ulink>. |
| 62 | <example> |
| 63 | <title>Example of the resonx opcodes.</title> |
| 64 | <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> |
| 65 | <xi:include href="examples-xml/resonx.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 66 | </example> |
| 67 | </para> |
| 68 | </refsect1> |
| 69 | |
| 70 | <refsect1> |
| 71 | <title>See also</title> |
| 72 | <para><link linkend="SigmodStandard"><citetitle>Standard Filters: Resonant Low-pass filters</citetitle></link></para> |
| 73 | </refsect1> |
| 74 | |
| 75 | <refsect1> |
| 76 | <title>Credits</title> |
| 77 | <para> |
| 78 | <simplelist> |
| 79 | <member>Author: &namegabriel; (adapted by &namejohn;)</member> |
| 80 | <member>Italy</member> |
| 81 | </simplelist> |
| 82 | </para> |
| 83 | |
| 84 | <para>New in Csound version 3.49</para> |
| 85 | <para>Audio rate parameters introduced in version 6.02</para> |
| 86 | <para>November 2013.</para> |
| 87 | </refsect1> |
| 88 | </refentry> |