<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>resonz</title> <link rel="stylesheet" href="csound.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /> <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" /> <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" /> <link rel="prev" href="resony.html" title="resony" /> <link rel="next" href="resyn.html" title="resyn" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">resonz</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="resony.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="resyn.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry" title="resonz"> <a id="resonz"></a> <div class="titlepage"></div> <a id="IndexResonz" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">resonz</span> </h2> <p>resonz — A bandpass filter with variable frequency response. </p> </div> <div class="refsect1" title="Description"> <a id="id3162882"></a> <h2>Description</h2> <p> Implementations of a second-order, two-pole two-zero bandpass filter with variable frequency response. </p> </div> <div class="refsect1" title="Syntax"> <a id="id3162894"></a> <h2>Syntax</h2> <pre class="synopsis">ares <span class="command"><strong>resonz</strong></span> asig, kcf, kbw [, iscl] [, iskip]</pre> </div> <div class="refsect1" title="Initialization"> <a id="id3163107"></a> <h2>Initialization</h2> <p> The optional initialization variables for <span class="emphasis"><em>resonr</em></span> and <span class="emphasis"><em>resonz</em></span> are identical to the i-time variables for <a class="link" href="reson.html" title="reson"><em class="citetitle">reson</em></a>. </p> <p> <span class="emphasis"><em>iskip</em></span> -- 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. </p> <p> <span class="emphasis"><em>iscl</em></span> -- coded scaling factor for resonators. A value of 1 signifies a peak response factor of 1, i.e. all frequencies other than <span class="emphasis"><em>kcf</em></span> 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 <a class="link" href="balance.html" title="balance"><em class="citetitle">balance</em></a>). The default value is 0. </p> </div> <div class="refsect1" title="Performance"> <a id="id3163793"></a> <h2>Performance</h2> <p> <span class="emphasis"><em>resonr</em></span> and <span class="emphasis"><em>resonz</em></span> are variations of the classic two-pole bandpass resonator (<a class="link" href="reson.html" title="reson"><em class="citetitle">reson</em></a>). Both filters have two zeroes in their transfer functions, in addition to the two poles. <span class="emphasis"><em>resonz</em></span> has its zeroes located at z = 1 and z = -1. <span class="emphasis"><em>resonr</em></span> has its zeroes located at +sqrt(<span class="emphasis"><em>R</em></span>) and -sqrt(<span class="emphasis"><em>R</em></span>), where <span class="emphasis"><em>R</em></span> is the radius of the poles in the complex z-plane. The addition of zeroes to <span class="emphasis"><em>resonr</em></span> and <span class="emphasis"><em>resonz</em></span> results in the improved selectivity of the magnitude response of these filters at cutoff frequencies close to 0, at the expense of less selectivity of frequencies above the cutoff peak. </p> <p> <span class="emphasis"><em>resonr</em></span> and <span class="emphasis"><em>resonz</em></span> are very close to constant-gain as the center frequency is swept, resulting in a more efficient control of the magnitude response than with traditional two-pole resonators such as <span class="emphasis"><em>reson</em></span>. </p> <p> <span class="emphasis"><em>resonr</em></span> and <span class="emphasis"><em>resonz</em></span> produce a sound that is considerably different from <span class="emphasis"><em>reson</em></span>, especially for lower center frequencies; trial and error is the best way of determining which resonator is best suited for a particular application. </p> <p> <span class="emphasis"><em>asig</em></span> -- input signal to be filtered </p> <p> <span class="emphasis"><em>kcf</em></span> -- cutoff or resonant frequency of the filter, measured in Hz </p> <p> <span class="emphasis"><em>kbw</em></span> -- bandwidth of the filter (the Hz difference between the upper and lower half-power points) </p> </div> <div class="refsect1" title="Technical History"> <a id="id3163909"></a> <h2>Technical History</h2> <p> <span class="emphasis"><em>resonr</em></span> and <span class="emphasis"><em>resonz</em></span> were originally described in an article by Julius O. Smith and James B. Angell.<sup>1</sup> Smith and Angell recommended the <span class="emphasis"><em>resonz</em></span> form (zeros at +1 and -1) when computational efficiency was the main concern, as it has one less multiply per sample, while <span class="emphasis"><em>resonr</em></span> (zeroes at + and - the square root of the pole radius R) was recommended for situations when a perfectly constant-gain center peak was required. </p> <p> Ken Steiglitz, in a later article <sup>2</sup>, demonstrated that <span class="emphasis"><em>resonz</em></span> had constant gain at the true peak of the filter, as opposed to <span class="emphasis"><em>resonr</em></span>, which displayed constant gain at the pole angle. Steiglitz also recommended <span class="emphasis"><em>resonz</em></span> for its sharper notches in the gain curve at zero and Nyquist frequency. Steiglitz's recent book <sup>3</sup> features a thorough technical discussion of <span class="emphasis"><em>reson</em></span> and <span class="emphasis"><em>resonz</em></span>, while Dodge and Jerse's textbook <sup>4</sup> illustrates the differences in the response curves of <span class="emphasis"><em>reson</em></span> and <span class="emphasis"><em>resonz</em></span>. </p> </div> <div class="refsect1" title="References"> <a id="id3163990"></a> <h2>References</h2> <p> </p> <div class="orderedlist"> <ol class="orderedlist" type="1"> <li class="listitem"> <p> Smith, Julius O. and Angell, James B., "A Constant-Gain Resonator Tuned by a Single Coefficient," <span class="emphasis"><em>Computer Music Journal</em></span>, vol. 6, no. 4, pp. 36-39, Winter 1982. </p> </li> <li class="listitem"> <p> Steiglitz, Ken, "A Note on Constant-Gain Digital Resonators," <span class="emphasis"><em>Computer Music Journal</em></span>, vol. 18, no. 4, pp. 8-10, Winter 1994. </p> </li> <li class="listitem"> <p> Ken Steiglitz, <span class="emphasis"><em>A Digital Signal Processing Primer, with Applications to Digital Audio and Computer Music</em></span>. Addison-Wesley Publishing Company, Menlo Park, CA, 1996. </p> </li> <li class="listitem"> <p> Dodge, Charles and Jerse, Thomas A., <span class="emphasis"><em>Computer Music: Synthesis, Composition, and Performance</em></span>. New York: Schirmer Books, 1997, 2nd edition, pp. 211-214. </p> </li> </ol> </div> <p> </p> </div> <div class="refsect1" title="See Also"> <a id="id3164065"></a> <h2>See Also</h2> <p> <a class="link" href="resonr.html" title="resonr"><em class="citetitle">resonr</em></a> </p> </div> <div class="refsect1" title="Credits"> <a id="id3164082"></a> <h2>Credits</h2> <p> </p> <table border="0" summary="Simple list" class="simplelist"> <tr> <td>Author: Sean Costello</td> </tr> <tr> <td>Seattle, Washington</td> </tr> <tr> <td>1999</td> </tr> </table> <p> </p> <p>New in Csound version 3.55</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="resony.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="OpcodesTop.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="resyn.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">resony </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> resyn</td> </tr> </table> </div> </body> </html>