On 05/30, Dario Sanfilippo wrote: > > > 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)), ^^^^^^
typo. please try fi.tf2s(0,0,1, 1/.707, 1, 2*ma.PI * 1000) > (au.dirac : fi.resonlp(1000, .707, 1)); btw, you could write process = au.dirac <: f2.lpbi(1000), fi.tf2s(0,0,1, 1/.707, 1, 2*ma.PI * 1000), i.resonlp(1000, .707, 1); this looks more simple. and au.dirac is os.impulse ;) > On the other hand, the impulse response of f2.lpbi and fi.resonlp are > identical: I think tf2s() should have the same response if you remove "/ma.SR"... > 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. If you want a second order zdf please consider the code below. I did some naive non-scientific tests and to me it really works better than even tf2snp when modulated. Oleg. ------------------------------------------------------------------------------- // http://www.cytomic.com/files/dsp/SvfLinearTrapOptimised2.pdf import("stdfaust.lib"); svf = environment { svf(T,F,Q,G) = tick ~ (_,_) : !,!,_,_,_ : si.dot(3, mix) with { tick(ic1eq, ic2eq, v0) = 2*v1 - ic1eq, 2*v2 - ic2eq, v0, v1, v2 with { v1 = ic1eq + g *(v0-ic2eq) : /(1 + g*(g+k)); v2 = ic2eq + g * v1; }; A = pow(10.0, G / 40.0); g = tan(F * ma.PI / ma.SR) : case { (7) => /(sqrt(A)); (8) => *(sqrt(A)); (t) => _; } (T); k = case { (6) => 1/(Q*A); (t) => 1/Q; } (T); mix = case { (0) => 0, 0, 1; (1) => 0, 1, 0; (2) => 1, -k, -1; (3) => 1, -k, 0; (4) => 1, -k, -2; (5) => 1, -2*k, 0; (6) => 1, k*(A*A-1), 0; (7) => 1, k*(A-1), A*A-1; (8) => A*A, k*(1-A)*A, 1-A*A; } (T); }; lp(f,q) = svf(0, f,q,0); bp(f,q) = svf(1, f,q,0); hp(f,q) = svf(2, f,q,0); notch(f,q) = svf(3, f,q,0); peak(f,q) = svf(4, f,q,0); ap(f,q) = svf(5, f,q,0); bell(f,q,g) = svf(6, f,q,g); ls(f,q,g) = svf(7, f,q,g); hs(f,q,g) = svf(8, f,q,g); }; _______________________________________________ Faudiostream-users mailing list Faudiostream-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/faudiostream-users