<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>That's awesome, thanks! &nbsp;I committed it under your name:</div><div><br></div><div><a href="https://github.com/pd-projects/filterview">https://github.com/pd-projects/filterview</a></div><div><br></div><div>I'd like to implement all of the relevant filters, which algorithms should I use? &nbsp;Or even better, perhaps you want to take a crack at it while I figure out how to display the x/frequency on a log scale :-D</div><div><br></div><div>.hc</div><br><div><div>On Feb 9, 2011, at 11:07 PM, Mike Moser-Booth wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hey Hans,<div><br></div><div>I had some time to go over this today, and I think I've got the response working. I didn't document my changes as I went along (sorry), but I think I remembered them all and wrote them at the top of the attached script. Also, I should take back what I said earlier about the bandwidth. Given this gui, it makes sense for it to be BW.</div> <div><br></div><div>.mmb<br><br><div class="gmail_quote">On Tue, Feb 8, 2011 at 12:08 AM, 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 style="word-wrap:break-word"><div><br></div><div>I'll check out the settings. &nbsp;As for running this, its a script, you can just run it on the Terminal. &nbsp;On GNU/Linux, it should just work. &nbsp;On Mac OS X, you'll probably need to have run it like this:</div> <div><br></div><div>/usr/bin/wish filterview.tcl</div><div><br></div><div>.hc</div><div><div></div><div class="h5"><br><div><div>On Feb 7, 2011, at 11:20 PM, Mike Moser-Booth wrote:</div><br><blockquote type="cite">I don't really know how to test this and I don'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'm guessing you're just borrowing what is in the ggee externals (given the code's comments), because it's done the same way there, but it's not really conventional for a lowpass filter. That'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's [filtergraph~] works.<div> <br></div><div>It's all defined here in Robert Bristow-Johnson's Cookbook:</div><div><br></div><div><a href="http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt" target="_blank">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" target="_blank">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><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'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> &nbsp;USB complete: everything you need to develop custom USB peripherals<br> &nbsp;Par Jan Axelson<br> &nbsp;Chapitre 12<br> &nbsp;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'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'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's also done some trig-substitution for more numerical<br> precision.<br> </blockquote> <br></div> I'm making good progress, but now am getting lost in the filter math meeting the pixel math. &nbsp;Can someone mathy check my math? &nbsp;Or even try it out?<div><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> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ˇEl pueblo unido jamás será vencido!<div><div></div><div><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" target="_blank">mmoserbooth@gmail.com</a><br> </div></blockquote></div><br></div></div><div> <span style="font-size:12px"><div> <br>----------------------------------------------------------------------------<br></div></span><div><br></div><div>"A cellphone to me is just an opportunity to be irritated wherever you are." - Linus Torvalds</div> </div><br></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> <span>&lt;filterview.mmb.tcl.zip&gt;</span></blockquote></div><br><div apple-content-edited="true"> <div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><br class="Apple-interchange-newline">----------------------------------------------------------------------------<br></div><div><br></div>I hate it when they say, "He gave his life for his country." &nbsp;Nobody&nbsp;gives their life for anything. &nbsp;We steal the lives of these kids. &nbsp;-Admiral Gene LeRocque<br></span></div> </div><br></body></html>