[PD] algorithms for drawing filter response curves
Hans-Christoph Steiner
hans at at.or.at
Mon Feb 7 18:49:55 CET 2011
On Feb 7, 2011, at 12:43 PM, Hans-Christoph Steiner wrote:
>
> On Feb 7, 2011, at 6:12 AM, volker böhm wrote:
>
>>
>> On 07.02.2011, at 00:12, Hans-Christoph Steiner wrote:
>>
>>>
>>> I've started to write a GUI for generating biquad coefficients
>>> (something like Max/MSP's [filtergraph~]). I've gotten the GUI
>>> interaction working well, now I'm looking for the algorithms for
>>> generating a plot of the frequency response of a given set of
>>> biquad coefficents? It'll end up being Tcl, but I can easily read
>>> C, Csound, Java, Perl, Python, etc.
>>>
>>> .hc
>>
>> i've been using the attached js file to query amplitude and phase
>> response of biquad coeffs,
>> where the coeffs are expected to be of the form: y[n] = a0 * x[n] +
>> a1 * x[n-1] + a2 * x[n-2] - b1 * y[n-1] - b2 * y[n-2] (like in
>> maxmsp).
>> so, you'd have to rearrage the coeffs and turn the sign of the fb
>> coeffs to make it work with the pd biquad~.
>>
>> vb
>>
>> <queryBiquad.js>
>
> Thanks, that helped. Here's what I have so far: I got the mouse
> interaction almost completed, now I'm just starting the plotting
> part, which has a ways to go.
>
> .hc
> <filterview.tcl>
I also just pushed my git to a public repo:
https://github.com/pd-projects/filterview
.hc
----------------------------------------------------------------------------
If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an
idea, which an individual may exclusively possess as long as he keeps
it to himself; but the moment it is divulged, it forces itself into
the possession of everyone, and the receiver cannot dispossess himself
of it. - Thomas Jefferson
More information about the Pd-list
mailing list