[chuck-users] bandwidth in band reject filter

Spencer Salazar spencer at ccrma.stanford.edu
Mon Oct 27 18:24:46 EDT 2014


Hey Mike,

I usually assume that mathematically Q = f / Δf and this hasn't gotten me
in trouble yet, but I am not a real audio engineering guy so maybe this
could be false in some cases.

In ChucK's case, for brf, the code looks like this:
[...]
    // set_brf
    inline void set_brf( t_CKFLOAT freq, t_CKFLOAT Q )
    {
        t_CKFLOAT pfreq = freq * g_radians_per_sample;
        t_CKFLOAT pbw = 1.0 / Q * pfreq * .5;
[...]

so in that last line, Δω = ω/(2Q), so Q = ω/(2Δω) = f/(2Δf). I don't know
for sure if the extra 2 in the denominator is a scaling factor or actually
part of the Q-bandwidth relationship for this filter. I would be surprised
if it was the latter though given the "standard" definition of Q one sees,
given above.

I can see how it would be confusing because the term Q is also used for the
LPF and HPF filters as resonance, which is the gain of the peak at the
cutoff frequency, in which case the f/Δf relation is not correct or even
applicable.

spencer


On Mon, Oct 27, 2014 at 12:34 PM, Michael Heuer <heuermh at gmail.com> wrote:

> Hello,
>
> I'm currently using the C*APS Eq10 10-band equalizer
>
> http://quitte.de/dsp/caps.html#CAPS_for_Electric_Guitar
>
> via the LADSPA ChuGin
>
> https://github.com/jwmatthys/chugins
>
> as part of an effect but all I really need is something to scoop the
> mids.  I thought I might use the BRF band reject filter
>
> http://chuck.cs.princeton.edu/doc/program/ugen_full.html#BRF
>
> I can't tell how to set the bandwidth (or described another way, the
> range of frequencies around the center frequency that are rejected by
> the filter).  I went off into reading Miller Puckette's book Theory
> and Techniques of Electronic Music
>
> http://msp.ucsd.edu/techniques.htm
>
> and am now lost somewhere in the imaginary plane.
>
> The definition of the Q parameter seems to vary among the different
> ChucK filters (resonance vs quality vs Q) and I suppose I should
> understand what that means.  Feel free to tell me to go back to my
> reading.  :)
>
>    michael
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20141027/fff3420f/attachment.html>


More information about the chuck-users mailing list