Page 1 of 1

Looking for a bandpass filter design with bandwidth control.

Posted: Wed Oct 08, 2014 9:29 pm
by zoobooboozoo
Hi all.

I'm looking for a bandpass filter design with frequency & bandwidth controls/inputs.

Ruby/DSP are preferable. a general design or green will also do :)

Re: Looking for a bandpass filter design with bandwidth cont

Posted: Thu Oct 09, 2014 7:42 am
by martinvicanek
Search for RBJ biquads.

Re: Looking for a bandpass filter design with bandwidth cont

Posted: Thu Oct 09, 2014 9:57 am
by zoobooboozoo
I found this:
http://flowstone.guru/downloads/rbj-biquad-filters/

But the bandpasses doesn't have a BW control. Am I missing something?

Re: Looking for a bandpass filter design with bandwidth cont

Posted: Thu Oct 09, 2014 10:06 pm
by martinvicanek
You're almost there!

Bandwidth = Center_Frequency/Q

Note:
Center_Frequency is sometimes labeled "Cutoff Frequency".
Q is sometimes labeled "Resonance".

Re: Looking for a bandpass filter design with bandwidth cont

Posted: Thu Oct 09, 2014 10:28 pm
by tulamide
martinvicanek wrote:You're almost there!

Bandwidth = Center_Frequency/Q

Note:
Center_Frequency is sometimes labeled "Cutoff Frequency".
Q is sometimes labeled "Resonance".

Thank you for this info! While it may seem easy, I always wondered about it. That helps a lot to get in touch with the very abstract filter language/design/math, etc.
If there are more such tips, that make it easier to understand the relations of all the parameters, please share them :)

Re: Looking for a bandpass filter design with bandwidth cont

Posted: Sat Oct 11, 2014 12:53 pm
by zoobooboozoo
Thx martin!

Now I have a different problem. I want to control the cutoff with numinal frequency in hz(like 270, 440 1850 etc...) but I can't seem to make the proper conversions so that the float frequency provides the RBJ Biquad with what it needs...

Re: Looking for a bandpass filter design with bandwidth cont

Posted: Sat Oct 11, 2014 1:40 pm
by KG_is_back
There is a stock module called "hz to 0-1" or something like that. Basically you have to divide the frequency in Hz with half the samplerate.

Re: Looking for a bandpass filter design with bandwidth cont

Posted: Sat Oct 11, 2014 2:43 pm
by zoobooboozoo
Yeah for some reason I cannot connect the "hz to 0-1" module to either directly the cutoff input or the "scale cutoff" module...

Re: Looking for a bandpass filter design with bandwidth cont

Posted: Mon Oct 13, 2014 9:44 pm
by zoobooboozoo
Could anyone help?

I'm really trinyg different methods but can't get to where I input into a bandpass filter:
1)frequency somewhere between ~200-5000
2)Q/res based on the above frequency and bandwidth value of ~50-140

For some reason the values gets lost in translation with both the stock bandpass filter and the RBJ biquads...

Re: Looking for a bandpass filter design with bandwidth cont

Posted: Tue Oct 14, 2014 1:38 am
by martinvicanek
Here you go. (That's a very narrow bandpass filter.)