<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="resonx">
  <refmeta>
    <refentrytitle>resonx</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>resonx</refname>
    <refpurpose>
      Emulates a stack of filters using the reson opcode.
      <indexterm id="IndexResonx"><primary>resonx</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      <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.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>resonx</command> asig, kcf, kbw [, inumlayer] [, iscl] [, iskip]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>inumlayer</emphasis> (optional) -- number of elements in the filter stack. Default value is 4.
    </para>

    <para>
      <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.
    </para>

    <para>
      <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.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>asig</emphasis> -- input signal
    </para>

    <para>
      <emphasis>kcf</emphasis> -- the center frequency of the filter, or frequency position of the peak response.
    </para>

    <para>
      <emphasis>kbw</emphasis> -- bandwidth of the filter (the Hz difference between the upper and lower half-power points)
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="atonex"><citetitle>atonex</citetitle></link>,
      <link linkend="tonex"><citetitle>tonex</citetitle></link>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namegabriel; (adapted by &namejohn;)</member>
        <member>Italy</member>
      </simplelist>
    </para>

    <para>New in Csound version 3.49</para>
  </refsect1>
</refentry>
