Trying to make a band filter

Eric Fabrizi's icon

Hi all,

I am trying to create a kind of band filter; I simply want to take a signal and filter everything above and below set frequencies. One slider is controlling the frequency of a onepole~; another slider controls the 'bandwidth' by taking the new slider's value from the first slider's value and feeding that result to another onepole~ (with 'subtract~' to create a high pass filter).

It is sort of working. But, for example, when the 'bandwidth' value on the slider is zero no signal should come through; however, there is still signal.

Many thanks

Here's the patch;

Max Patch
Copy patch and select New From Clipboard in Max.