I don&#39;t really know how to test this and I don&#39;t really know tcl, but I tried looking at the code to see if I could make some sense of it anyway, because why the hell not. ;-) Anyway, the only part I really understood was the calculation of the coefficients, and I noticed something wrong. You are calculating alpha for bandwidth instead of Q. I&#39;m guessing you&#39;re just borrowing what is in the ggee externals (given the code&#39;s comments), because it&#39;s done the same way there, but it&#39;s not really conventional for a lowpass filter. That&#39;s really more for bandpass, notch, and peaking filters. Using Q is also a simpler calculation: alpha = sin(omega)/(2*Q). With Q set to .7071 (or -3 dBfs), you have a filter with no resonance, which makes sense because the cutoff frequency for a lowpass filter is defined as the frequency where the response falls be 3 dB. This is also how Max&#39;s [filtergraph~] works.<div>
<br></div><div>It&#39;s all defined here in Robert Bristow-Johnson&#39;s Cookbook:</div><div><br></div><div><a href="http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt">http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt</a></div>
<div><br></div><div>The ggee externals, as far as I can tell, are all based on this cookbook, though with mistakes like using BW instead of Q.</div><div><br></div><div>Hope that helps,</div><div>.mmb<br><br><div class="gmail_quote">
On Mon, Feb 7, 2011 at 10:03 PM, Hans-Christoph Steiner <span dir="ltr">&lt;<a href="mailto:hans@at.or.at">hans@at.or.at</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Feb 7, 2011, at 8:35 PM, Spencer Russell wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sun, Feb 6, 2011 at 11:15 PM, Mathieu Bouchard &lt;<a href="mailto:matju@artengine.ca" target="_blank">matju@artengine.ca</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sun, 6 Feb 2011, Spencer Russell wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[1] gives the magnitude frequency response given the biquad<br>
coefficents, and it linked to from several places around the net. Is<br>
this the sort of thing you&#39;re looking for?<br>
[1] <a href="http://bit.ly/eFck4j" target="_blank">http://bit.ly/eFck4j</a><br>
</blockquote>
<br>
This link got me directly to :<br>
<br>
 USB complete: everything you need to develop custom USB peripherals<br>
 Par Jan Axelson<br>
 Chapitre 12<br>
 Page 364<br>
<br>
and nothing else. (??)<br>
<br>
</blockquote>
<br>
Whoops, I meant to send this: <a href="http://bit.ly/gUCBu4" target="_blank">http://bit.ly/gUCBu4</a>. Sorry.<br>
<br>
Here he&#39;s basically just taken the transfer function of a biquad and<br>
made the z = exp(j*w/Fs) as Mike suggested, followed by taking the<br>
magnitude and log-scaling for dB, but he&#39;s done the algebraic legwork.<br>
Just note that w (lower-case omega) is 2*pi*f and you should be good<br>
to go. He&#39;s also done some trig-substitution for more numerical<br>
precision.<br>
</blockquote>
<br></div>
I&#39;m making good progress, but now am getting lost in the filter math meeting the pixel math.  Can someone mathy check my math?  Or even try it out?<div class="im"><br>
<br>
<a href="https://github.com/pd-projects/filterview" target="_blank">https://github.com/pd-projects/filterview</a><br>
<br>
.hc<br>
<br>
<br>
----------------------------------------------------------------------------<br>
<br></div>
                  ˇEl pueblo unido jamás será vencido!<div><div></div><div class="h5"><br>
<br>
<br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Mike Moser-Booth<br><a href="mailto:mmoserbooth@gmail.com">mmoserbooth@gmail.com</a><br>
</div>