spectroscope~

Biquad filter

The biquad~ object is a biquadratic filter. In technical terms, that’s a second-order IIR filter with two poles and two zeros; in practical terms, it’s a versatile filter that can have a wide variety of characteristics—lowpass, hipass, bandpass, notch, shelf, etc.—depending on the values of the coefficients in the filtering equation. But unless you’re a trained electrical engineer, you probably don’t know exactly how the coefficient values correspond to particular filtering characteristics.

Resonant bandpass filter

The reson~ object is a resonant bandpass filter; it passes frequencies in a specified region, and attenuates the other frequencies. It requires only three parameter values: input gain, center (resonated) frequency, and a resonance quality factor (Q). The Q determines the bandwidth of the passed region around the center frequency. Specifically, Q is defined as center frequency divided by bandwidth, where bandwidth is the extent, in Hertz, above and below the center frequency before the frequencies will be significantly attenuated.

Resonant lowpass filter

The lores~ object is a resonant lowpass filter. It requires only two parameter values: the cutoff frequency and a resonance factor from 0 to 1. Increasing the resonance will increase the steepness of the filter (increase the attenuation effect on frequencies above the cutoff) and also will accentuate the frequencies right around the cutoff. Experiment with different resonance values between 0 and 1 to hear the effect, and try sweeping the cutoff frequency through different registers.

The simplest lowpass filter

Almost all digital filters involve mixing a sound with one or more delayed versions of itself, usually to cause interference and thus change the amplitude at certain frequencies. The very simplest imaginable example is to delay a sound by exactly one sample, and then take the average of the current sample and the previous (delayed) sample. The result of this averaging process is that the signal is smoothed slightly, reducing the high frequencies: a lowpass filter.

Comb filter

When a sound is mixed with a delayed version of itself, each sinusoidal component of the delayed sound has a unique phase offset compared to the original, so each frequency is accentuated or attenuated differently. For example, if a 1000 Hz sinusoid is delayed by 1/1000 of a second (1 millisecond), the original and the delayed version will still be perfectly in phase, so that frequency will be increased in amplitude when the two versions are added together.

Variable-mode filter demo

This patch allows you to try out various filter settings of the biquad~ object, via the filtergraph~ object. For adjusting the parameters you can drag on filtergraph~ with the mouse, or you can send values in its three rightmost inlets for frequency, gain, and Q. The spectroscope~ object tries to draw the spectrum of the signal.