Ok, big update, this should work a lot better.
http://puredata.info/downloads/filterview
I changed the formula below to be a fixed resolution of 5 pixels. I was thinking that this should be generalized into a general biquad~ library, so with objects like [bandpass] to calculate biquad coefficients. The calculations could all be written in C as a shared library, then the Tcl code could use those C functions also, which I think would allow for 1 pixel resolution. My guess is that doing the math in C would make things noticeably faster.
.hc
On Apr 4, 2012, at 3:47 PM, Mike Moser-Booth wrote:
That actually can be fixed (or at least improved) in line 75:
for {set x [expr int($framex1)]} {$x <= $framex2} {incr x [expr $framewidth/40]} {
It's only calculating 40 points within however many pixels the width is. It should probably be incrementing by a constant, with 1 being every pixel.
.mmb
On Wed, Apr 4, 2012 at 10:06 AM, Hans-Christoph Steiner hans@at.or.at wrote:
Yeah, I've seen that. That's really a matter of getting the math right for the calculations to draw the lines. I suck at math so I'll leave that up to someone who doesn't. The math is all in the filterview.tcl file.
.hc
On Apr 4, 2012, at 9:21 AM, batinste wrote:
I built it for pd-ext 64bits on ubuntu current, it works well (some crashes at exit, as you said) ! Is there an easy way to make the magnitude response polygon less "polygoney" ? If you move a strong notch filter along the spectrum, you can actually see the line acting like a bike chain, thus changing the visually perceived response of the filter.
On 03/04/2012 21:31, Marco Donnarumma wrote:
Looks lovely! Thanks guys,
M
On Tue, Apr 3, 2012 at 8:03 PM, Hans-Christoph Steiner hans@at.or.at wrote:
Announcing [filterview], a new GUI object for generating and visualizing biquad coefficients. It allows to you manipulate the filter band, frequency, and gain using your mouse. The magnatude and phase are then graphed in realtime as the parameters changed, and the list of biquad coefficients are output. It is inspired by the [filtergraph~] object in Max/MSP. Thanks to Mike Moser-Booth for doing all of the math behind the scenes.
It requires Pd-extended 0.43 to run. I just got to a beta state, it works well for me, but it does crash Pd sometimes when you close a patch with [filterview] in it. Try it out and let me know how it works for you.
http://puredata.info/downloads/filterview
Also, as a side note, this object is an experiment with a new way of writing GUI objects. It started out as a pure Tcl program, and the GUI part still runs as a standalone Tcl program (try running ./filterview.tcl from the Terminal). This makes development and debugging vastly easier. Additionally, I tried to move more of the GUI code to the Tcl side, so you'll see that it uses fewer widgetbehaviors, and uses Tk's bind feature quite a bit.
.hc
kill your television
Pd-announce mailing list Pd-announce@iem.at http://lists.puredata.info/listinfo/pd-announce
-- Marco Donnarumma New Media + Sonic Arts Practitioner, Performer, Teacher, Director. ACE, Sound Design MSc by Research (ongoing) The University of Edinburgh, UK
Portfolio: http://marcodonnarumma.com Research: http://res.marcodonnarumma.com | http://www.thesaddj.com | http://www.flxer.net Director: http://www.liveperformersmeeting.net _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list ---------------------------------------------------------------------------- If you are not part of the solution, you are part of the problem. _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- Mike Moser-Booth - mmoserbooth@gmail.com Master's Student in Music Technology Schulich School of Music, McGill University Centre for Interdisciplinary Research in Music Media and Technology
"Words that make questions may not be questions at all." -- Neil deGrasse Tyson
Man has survived hitherto because he was too ignorant to know how to realize his wishes. Now that he can realize them, he must either change them, or perish. -William Carlos Williams