<-- Back to Previous Page | TOC | Next Section --> |
Chapter 4: The Synthesis of Sound by ComputerSection 4.3: Filters
|
||
The most common way to think about filters is as functions that take in a signal and give back some sort of transformed signal. Usually, what comes out is "less" than what goes in. Thats why the use of filters is sometimes referred to as subtractive synthesis. It probably wont surprise you to learn that subtractive synthesis is in many ways the opposite of additive synthesis. In additive synthesis, we start with simple sounds and add them together to form more complex ones. In subtractive synthesis, we start with a complex sound (like noise) and subtract, or filter out, parts of it. Subtractive synthesis can be thought of as sound sculptingyou start out with a thick chunk of sound containing many possibilities (frequencies), and then you carve out (filter) parts of it. Filters are one of the sound sculptors most versatile and valued tools. |
||
|
||
|
||
|
||
|
||
Four Basic Types of FiltersFigure 4.8 illustrates four basic types of filters: low-pass, high-pass, band-pass, and band-reject. Low-pass and high-pass filters should already be familiar to youthey are exactly like the "tone" knobs on a car stereo or boombox. A low-pass (also known as high-stop) filter stops, or attenuates, high frequencies while letting through low ones, while a high-pass (low-stop) filter does just the opposite. |
||
Band-Pass and Band-Reject FiltersBand-pass and band-reject filters are basically combinations of low-pass and high-pass filters. A band-pass filter lets through only frequencies above a certain point and below another, so there is a band of frequencies that get through. A band-reject filter is the opposite: it stops a band of frequencies. Band-reject filters are sometimes called notch filters, because they can notch out a particular part of a sound. |
||
Low-Pass and High-Pass FiltersLow-pass and high-pass filters have a value associated with them called the cutoff frequency, which is the frequency where they begin "doing their thing." So far we have been talking about ideal, or perfect, filters, which cut off instantly at their cutoff frequency. However, real filters are not perfect, and they can’t just stop all frequencies at a certain point. Instead, frequencies die out according to a sort of curve around the corner of their cutoff frequency. Thus, the filters in Figure 4.8 don’t have right angles at the cutoff frequenciesinstead they show general, more or less realistic response curves for low-pass and high-pass filters. Cutoff FrequencyThe cutoff frequency of a filter is defined as the point at which the signal is attenuated to 0.707 of its maximum value (which is 1.0). No, the number 0.707 was not just picked out of a hat! It turns out that the power of a signal is determined by squaring the amplitude: 0.7072 = 0.5. So when the amplitude of a signal is at 0.707 of its maximum value, it is at half-power. The cutoff frequency of a filter is sometimes called its half-power point. Transition BandThe area between where a filter "turns the corner" and where it "hits the bottom" is called the transition band. The steepness of the slope in the transition band is important in defining the sound of a particular filter. If the slope is very steep, the filter is said to be "sharp"; conversely, if the slope is more gradual, the filter is "soft" or "gentle." Things really get interesting when you start combining low-pass and high-pass filters to form band-pass and band-reject filters. Band-pass and band-reject filters also have transition bands and slopes, but they have two of them: one on each side. The area in the middle, where frequencies are either passed or stopped, is called the passband or the stopband. The frequency in the middle of the band is called the center frequency, and the width of the band is called the filters bandwidth. You can plainly see that filters can get pretty complicated, even these simple ones. By varying all these parameters (cutoff frequencies, slopes, bandwidths, etc.), we can create an enormous variety of subtractive synthetic timbres. A Little More Technical: IIR and FIR FiltersFilters are often talked about as being one of two types: finite impulse response (FIR) and infinite impulse response (IIR). This sounds complicated (and can be!), so well just try to give a simple explanation as to the general idea of these kinds of filters. Finite impulse response filters are those in which delays are used along with some sort of averaging. Delays mean that the sound that comes out at a given time uses some of the previous samples. Theyve been delayed before they get used. Weve talked about these filters in earlier chapters. What goes into an FIR is always less than what comes out (in terms of amplitude). Sounds reasonable, right? FIRs tend to be simpler, easier to use, and easier to design than IIRs, and they are very handy for a lot of simple situations. An averaging low-pass filter, in which some number of samples are averaged and output, is a good example of an FIR. Infinite impulse response filters are a little more complicated, because they have an added feature: feedback. Youve all probably seen how a microphone and speaker can have feedback: by placing the microphone in front of a speaker, you amplify what comes out and then stick it back into the system, which is amplifying what comes in, creating a sort of infinite amplification loop. Ouch! (If youre Jimi Hendrix, you can control this and make great music out of it.) Well, IIRs are similar. Because the feedback path of these filters consists of some number of delays and averages, they are not always what are called unity gain transforms. They can actually output a higher signal than that which is fed to them. But at the same time, they can be many times more complex and subtler than FIRs. Again, think of electric guitar feedbackIIRs are harder to control but are also very interesting. Designing filters is a difficult but key activity in the field of digital signal processing, a rich area of study that is well beyond the range of this book. It is interesting to point out that, surprisingly, even though filters change the frequency content of a signal, a lot of the mathematical work done in filter design is done in the time domain, not in the frequency domain. By using things like sample averaging, delays, and feedback, one can create an extraordinarily rich variety of digital filters. For example, the following is a simple equation for a low-pass filter. This equation just averages the last two samples of a signal (where x(n) is the current sample) to produce a new sample. This equation is said to have a one-sample delay. You can see easily that quickly changing (that is, high-frequency) time domain values will be "smoothed" (removed) by this equation. x(n) = (x(n) + x(n - 1))/2 In fact, although it may look simple, this kind of filter design can be quite difficult (although extremely important). How do you know which frequencies youre removing? Its not intuitive, unless youre well schooled in digital signal processing and filter theory, have some background in mathematics, and know how to move from the time domain (what you have) to the frequency domain (what you want) by averaging, delaying, and so on. |
<-- Back to Previous Page | Next Section --> |
©Burk/Polansky/Repetto/Roberts/Rockmore. All rights reserved.