In this post I want to share a Pure Data (Pd) patch that I recently created to explore filters of different orders. I used low-pass filter objects (lop~) connected together serially in parallel chains. Each chain contains a different number of filters, resulting in filter effects of different orders.
If you want to learn more about filter order then read the overview below the image of the Pd patch. This text is an excerpt from a previous entry that provides an overview about filters.
There are other ways to create filters with steep roll-off curves. Pd’s biquad~ object provides much more flexible and complex filter capabilities. However, at this point in time they are beyond my scope of knowledge.
This patch features several controls. The first set of controls is a row of toggle switches that serve as filter order selectors. They allow users to easily switch between filters of different orders by turning on and off each filter chain. The next control is a slider that sets the oscillator frequency. The last control sets the cut-off frequency of the low-pass filter.
Here is the link to download the patch.
Do a little test to see the effect of increasing the filter order. First, set the oscillating frequency to slightly above the filter cut-off frequency. Then increase the filter order, one by one (remember to turn off the lower order filter). You should be able to notice a clear decrease in the signal amplitude in the visual and audio representations.
Here is the link to download the patch above.
Here is an excerpt from a previous entry that provides an overview about the concept of filter order:
“The order of a filter determines the steepness of its roll-off curve. The higher the order the steeper the curve, and the faster the roll-off. Roll-off is usually a logarithmic value that is expressed in dB of attenuation per octave or decade of frequency (decade is a logarithmic quantity that represents a factor of 10 difference of between two numbers).
A first-order filter, for example, will reduce the signal amplitude by half (equivalent to a power reduction of 6 dB) every time the frequency doubles (equivalent to going up one octave). The Bode plot for a first-order low-pass filter (featured above) looks like a horizontal line to the left of the cut-off frequency, to the right of the cut-off frequency a diagonal line slopes downward. There is also a “knee curve” at the boundary between these two lines, which creates a smooth transition between the two straight line regions.
It is important to keep in mind that people will often use the terms “above” and “below” to refer to the areas on the right and left of the cut-off frequencyin a Bode plot. The reason being, higher frequencies are mapped to the right and lower frequencies are mapped to the left on this type of graph. Note that the filter on the Bode plot above is of the first order. The reason being roll-off of 20dB per decade is equivalent to one of 6dB per octave.
A second-order filter attenuates higher frequencies more steeply. The Bode plot for this type of filter resembles that of a first-order filter, except that it falls off more quickly. A second-order filter will usually reduce the signal amplitude twice as fast as a first-order filter. Resulting in a reduction of one fourth of the signal’s level every time the frequency doubles. In other words, the power decreases by 12 dB per octave or 40dB per decade.
Third- and higher-order filters are defined similarly. In general, the final rate of power rolloff for an order-n all-pole filter is 6n dB per octave, or 20n dB per decade.
To create second and third order filters using puredate, you need to connect multiple filter objects in a serial arrangement. This can be done with low-pass, high-pass, and band-pass filters.”