Our first example, “lowpass.sfs” does the job of making a CD sound like a telephone by using a low-pass filter. We require that the low-pass have no more than 3-dB of ripple up to 3 kHz, and at least 40-dB of attenuation above 10 kHz. This is a simple 10-tap low-pass filter. The Simple Specification Editor entries for it are shown below:
After opening the Project file or entering the band data, hit the “Design” button, which will bring up a plot of the frequency response:
The frequency response plot shows that the filter is slightly better than required, because its response is between the lines showing the specified passband ripple, and below the line showing the minimum stopband attenuation. Going back to the Specification Editor for a moment, we can read numerical values of the filter’s actual ripple and attenuation, which are “2.302” and “42.255”. So this one is definitely a keeper. Note that once you have a successful design, you might try reducing the number of taps a little to see if it still meets specifications. If you try “9” for the Number of Taps (NTaps), you will find that the filter no longer meets specifications. You can also enter a bigger number like “20” or “100”, and it will begin to substantially exceed specifications. However, if you specify a number which is very large compared to what is needed, for example 200, the algorithm from our friends Parks and McClellan begins to choke. (This is not dissimilar to the problem you have when you feed a little child too much candy.) Moral of the story: do not greatly over-specify NTaps; instead, start small and then systematically increase NTaps until you get what you asked for.
ScopeFIR provides a built-in ability to estimate NTaps, the “Estimate” button. This feature currently works for low-pass filters only. It is based on a well known formula. In this case, the estimation is perfect because it results in the minimum number (10) which will meet all specifications. Even when the estimates are not perfect, they are always a good starting point to help you iterate to the right number.
Our second example does the job of making a CD sound like a telephone (well, sort of) by using a high-pass filter.