resonr

Description

Syntax

ares resonr asig, kcf, kbw [, iscl] [, iskip]

Initialization

The optional initialization variables for resonr are identical to the i-time variables for reson.

iscl (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 balance). The default value is 0.

iskip (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.

Performance

asig -- input signal to be filtered

kcf -- cutoff or resonant frequency of the filter, measured in Hz

kbw -- bandwidth of the filter (the Hz difference between the upper and lower half-power points)

resonr and resonz are variations of the classic two-pole bandpass resonator (reson). Both filters have two zeroes in their transfer functions, in addition to the two poles. resonz has its zeroes located at z = 1 and z = -1. resonr has its zeroes located at +sqrt(R) and -sqrt(R), where R is the radius of the poles in the complex z-plane. The addition of zeroes to resonr and resonz 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.

resonr and resonz 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 reson.

resonr and resonz produce a sound that is considerably different from reson, especially for lower center frequencies; trial and error is the best way of determining which resonator is best suited for a particular application.

Examples

Here is an example of the resonr and resonz opcodes. It uses the file resonr.csd.

Technical History

resonr and resonz were originally described in an article by Julius O. Smith and James B. Angell.1 Smith and Angell recommended the resonz form (zeros at +1 and -1) when computational efficiency was the main concern, as it has one less multiply per sample, while resonr (zeroes at + and - the square root of the pole radius R) was recommended for situations when a perfectly constant-gain center peak was required.

Ken Steiglitz, in a later article 2, demonstrated that resonz had constant gain at the true peak of the filter, as opposed to resonr, which displayed constant gain at the pole angle. Steiglitz also recommended resonz for its sharper notches in the gain curve at zero and Nyquist frequency. Steiglitz's recent book 3 features a thorough technical discussion of reson and resonz, while Dodge and Jerse's textbook 4 illustrates the differences in the response curves of reson and resonz.