Hi Charles, thanks, this is exactly the solution I was looking for. Thanks a lot for the detailed math explanation too. ciao
Libero
On Jan 22, 2008 9:12 PM, Charles Henry czhenry@gmail.com wrote:
It depends upon the order of the filter... by resonant filter, I assume you mean a two-pole bandpass filter. Here's the math for converting between bandwidth and exponential decay
Take a function, g(t)=1000^-(t/r) where r is the -60 dB ring time. I used a base of 1000, because a factor of 1000 = 60 dB
g(t)=e^-(t*ln(1000)/r)
Now we take a one-sided fourier transform of this function:
G(f)=integral(0, inf; e^(-2*pi*i*f*t)*e^-|t*ln(1000)/r|) G(f)=integral(0, inf; e^((-2*pi*i*f-ln(1000)/r)*t) G(f)=1/(-2*pi*i*f-ln(1000)/r) * e^((-2*pi*i*f-ln(1000)/r)*t), eval at t=0, t=inf
G(f)= - 1/(-2*pi*i*f-ln(1000)/r) G(f)=1/(2*pi*i*f+ln(1000)/r)
G(f)=r/ln(1000) / [2*pi*i*f*r/ln(1000) + 1]
now, it's just a simple matter of finding the -3 dB points to find bandwidth of this function and interpreting the result of this function...
|G(f)|^2=(r/ln(1000))^2 / [1 + (2*pi*f*r/ln(1000))^2]
0.5 = 1 / [1 + (2*pi*f*r/ln(1000))^2] (2*pi*f*r/ln(1000))^2 = 1
f = +/- ln(1000)/(2*pi*r) bandwidth bw= 2 * ln(1000)/(2*pi*r)
conversions: bw = ln(1000) / (pi*r) r = ln(1000) / (pi*bw) r is in seconds and bw is in Hz
Try out these relations and see if they work.
Chuck
On Jan 22, 2008 12:11 PM, Libero Mureddu libero.mureddu@gmail.com wrote:
Hi, I have a simple patch with a [click~] object connected to a [reson~] filter. I'd like to know how it is possible to convert the bandwith parameter of the filter to decay lenght (in milliseconds). In SuperCollider there is a particular version of the "resonz" filter called "ringz", here is the description: Ringz.ar(in, freq, decaytime, mul, add)
This is the same as Resonz, except that instead of a resonance parameter, the bandwidth is specified in a 60dB ring decay time.
My knowledge of filters is too little to be able to convert the between the two parameters by myself, any help appreciated!
thanks,
libero
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list