Hey, thanks for posting.  I made a faust2octave test program
(attached).  Everything looks good to me, assuming I guessed all the
names right.

- Julius
On Tue, Aug 21, 2018 at 2:52 PM Oleg Nesterov <o...@redhat.com> wrote:
>
> On 07/19, Oliver Larkin via Faudiostream-users wrote:
> >
> > Based on the pseudo code in this paper:
> >
> > http://www.cytomic.com/files/dsp/SvfLinearTrapOptimised2.pdf 
> > <http://www.cytomic.com/files/dsp/SvfLinearTrapOptimised2.pdf>
>
> This pseudo code is very clear, so I think the faust implementation is very 
> simple ...
> See the untested code below.
>
> The only problem is that copy-and-paste doesn't work, perhaps I did some 
> mistakes.
>
> Oleg.
>
> -------------------------------------------------------------------------------
> import("stdfaust.lib");
>
> svf(T,F,Q,G) = tick ~ (_,_) : !,!,_,_,_ : si.dot(3, mix)
> with {
>         a1 = 1/(1 + g*(g + k));
>         a2 = g*a1;
>         a3 = g*a2;
>
>         tick(ic1eq, ic2eq, v0) =
>                 2*v1 - ic1eq,
>                 2*v2 - ic2eq,
>                 v0, v1, v2
>         with {
>                 v3 = v0 - ic2eq;
>                 v1 = a1*ic1eq + a2*v3;
>                 v2 = ic2eq + a2*ic1eq + a3*v3;
>         };
>
>         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);
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Faudiostream-users mailing list
> Faudiostream-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/faudiostream-users



-- 

Julius O. Smith III <j...@ccrma.stanford.edu>
Professor of Music and, by courtesy, Electrical Engineering
CCRMA, Stanford University
http://ccrma.stanford.edu/~jos/

Attachment: zdf.dsp
Description: Binary data

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to