<div dir="ltr">Hey Mike,<div><br></div><div>I usually assume that mathematically Q = f / <span style="font-family:arial,sans-serif;line-height:15.6000003814697px">Δf and this hasn&#39;t gotten me in trouble yet, but I am not a real audio engineering guy so maybe this could be false in some cases. </span></div><div><span style="font-family:arial,sans-serif;line-height:15.6000003814697px"><br></span></div><div><span style="font-family:arial,sans-serif;line-height:15.6000003814697px">In ChucK&#39;s case, for brf, the code looks like this:</span></div><div><span style="font-family:arial,sans-serif;line-height:15.6000003814697px">[...]</span></div><div><div><font face="arial, sans-serif"><span style="line-height:15.6000003814697px">    // set_brf</span></font></div><div><font face="arial, sans-serif"><span style="line-height:15.6000003814697px">    inline void set_brf( t_CKFLOAT freq, t_CKFLOAT Q )</span></font></div><div><font face="arial, sans-serif"><span style="line-height:15.6000003814697px">    {</span></font></div><div><font face="arial, sans-serif"><span style="line-height:15.6000003814697px">        t_CKFLOAT pfreq = freq * g_radians_per_sample;</span></font></div><div><font face="arial, sans-serif"><span style="line-height:15.6000003814697px">        t_CKFLOAT pbw = 1.0 / Q * pfreq * .5;</span></font></div><div style="font-family:arial,sans-serif;line-height:15.6000003814697px">[...]</div></div><div><br></div><div>so in that last line, <span style="font-family:arial,sans-serif;line-height:15.6000003814697px">Δ</span><span style="color:rgb(84,84,84);font-family:arial,sans-serif;line-height:18.2000007629395px">ω</span> = <span style="color:rgb(84,84,84);font-family:arial,sans-serif;line-height:18.2000007629395px">ω</span>/(2Q), so Q = <span style="color:rgb(84,84,84);font-family:arial,sans-serif;line-height:18.2000007629395px">ω</span>/(2<span style="font-family:arial,sans-serif;line-height:15.6000003814697px">Δ</span><span style="color:rgb(84,84,84);font-family:arial,sans-serif;line-height:18.2000007629395px">ω) = f/(2</span><span style="font-family:arial,sans-serif;line-height:15.6000003814697px">Δf). I don&#39;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 &quot;standard&quot; definition of Q one sees, given above. </span></div><div><span style="font-family:arial,sans-serif;line-height:15.6000003814697px"><br></span></div><div><font face="arial, sans-serif"><span style="line-height:15.6000003814697px">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 </span></font>f/<span style="font-family:arial,sans-serif;line-height:15.6000003814697px">Δf relation is not correct or even applicable. </span></div><div><font face="arial, sans-serif"><span style="line-height:15.6000003814697px"><br></span></font></div><div>spencer</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 27, 2014 at 12:34 PM, Michael Heuer <span dir="ltr">&lt;<a href="mailto:heuermh@gmail.com" target="_blank">heuermh@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I&#39;m currently using the C*APS Eq10 10-band equalizer<br>
<br>
<a href="http://quitte.de/dsp/caps.html#CAPS_for_Electric_Guitar" target="_blank">http://quitte.de/dsp/caps.html#CAPS_for_Electric_Guitar</a><br>
<br>
via the LADSPA ChuGin<br>
<br>
<a href="https://github.com/jwmatthys/chugins" target="_blank">https://github.com/jwmatthys/chugins</a><br>
<br>
as part of an effect but all I really need is something to scoop the<br>
mids.  I thought I might use the BRF band reject filter<br>
<br>
<a href="http://chuck.cs.princeton.edu/doc/program/ugen_full.html#BRF" target="_blank">http://chuck.cs.princeton.edu/doc/program/ugen_full.html#BRF</a><br>
<br>
I can&#39;t tell how to set the bandwidth (or described another way, the<br>
range of frequencies around the center frequency that are rejected by<br>
the filter).  I went off into reading Miller Puckette&#39;s book Theory<br>
and Techniques of Electronic Music<br>
<br>
<a href="http://msp.ucsd.edu/techniques.htm" target="_blank">http://msp.ucsd.edu/techniques.htm</a><br>
<br>
and am now lost somewhere in the imaginary plane.<br>
<br>
The definition of the Q parameter seems to vary among the different<br>
ChucK filters (resonance vs quality vs Q) and I suppose I should<br>
understand what that means.  Feel free to tell me to go back to my<br>
reading.  :)<br>
<br>
   michael<br>
_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
<br>
<br>
</blockquote></div><br></div>