On Thu, 30 May 2019 at 11:06, Oleg Nesterov <o...@redhat.com> wrote: > On 05/29, Dario Sanfilippo wrote: > > > > Dear list, > > > > it's only been a couple of months into working with Faust but I've > written > > some stuff and they are now available on Github: > > https://github.com/dariosanfilippo/faust. > > interesting... Thanks for sharing! >
Thanks for your interest, Oleg. > > So far I quickly glanced at filters2.lib, and I am not sure I understand > the > purpose of biquad filters... Lets look at biquad lowpass: > > lpbi(cf, in) = biquad(a0, a1, a2, b1, b2, in) > with { > cf1 = st.clip(5, m2.ny-5, cf); > q1 = .707; > alpha = sin(m2.w(cf1))/(2*q1); > norm = 1+alpha; > a0 = ((1-cos(m2.w(cf1)))/2)/norm; > a1 = 1-cos(m2.w(cf1))/norm; > a2 = ((1-cos(m2.w(cf1)))/2)/norm; > b1 = cos(m2.w(cf1))*-2/norm; > b2 = (1-alpha)/norm; > }; > > Firstly, "a1" doesn't look right. It should be > > a1 = (1 - cos(...)) / norm; > not > a1 = 1 - cos(...) / norm; > You're certainly right: that's a mistake that I just fixed. Thanks for that. > > > And. It seems that the implementation above is "equal" to > > lpbi(cf) = fi.tf2s(0,0,1, 1/.707, 1, 2*ma.PI/ma.SR * cf); > > ? > > or simply > > lpbi(cf) = resonlp(cf, .707, 1); > > no ? > I must be doing something wrong with fi.tf2f but I get no response when testing it like this: process = f2.lpbi(1000, au.dirac), (au.dirac : fi.tf2s(0,0,1, 1/.707, 1, 2*ma.PI/ma.SR * 1000)), (au.dirac : fi.resonlp(1000, .707, 1)); On the other hand, the impulse response of f2.lpbi and fi.resonlp are identical: channel 1, channel 2, channel 3 0.004604, 0.000000, 0.004604 0.017491, 0.000000, 0.017491 0.032307, 0.000000, 0.032307 0.043825, 0.000000, 0.043825 0.052433, 0.000000, 0.052433 0.058504, 0.000000, 0.058504 0.062391, 0.000000, 0.062391 0.064418, 0.000000, 0.064418 0.064890, 0.000000, 0.064890 0.064080, 0.000000, 0.064080 0.062238, 0.000000, 0.062238 0.059586, 0.000000, 0.059586 0.056321, 0.000000, 0.056321 0.052614, 0.000000, 0.052614 0.048616, 0.000000, 0.048616 0.044451, 0.000000, 0.044451 0.040228, 0.000000, 0.040228 0.036035, 0.000000, 0.036035 0.031944, 0.000000, 0.031944 0.028011, 0.000000, 0.028011 In general, there's probably some redundancy here and there in my libraries. I didn't have a proper look at all the filters in Faust and I just ported that from my PD patches as I needed to replicate a behaviour. Perhaps the zero-delay feedback design in Zavalishin is not in the Faust filters and it could be integrated. He claims that such filters, even at orders higher than 1 or 2, are more stable in time-variant configurations than the others. Cheers, Dario > > Oleg. > >
_______________________________________________ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users