Hi Dario ;)
On 06/03, Dario Sanfilippo wrote:
>
> with {
>
> k = 1/2*q;
I used
k = 4 * (Q - 0.5) / (25 - 0.5);
but only because the c++ code does this. this is minor...
> u = (in-((s1*(G^3/(1+g))+s2*(G^2/(1+g))+s3*(G/(1+g))+s4
>
> *(1/(1+g)))*k))*(1/(1+k*gamma));
Hmm, yes, I missed the additional /(1+g). So my implementation needs a fix:
moog(fc, Q) = tick ~ (_,_,_,_) : !,!,!,!, _ with {
tick(s1,s2,s3,s4) =
lp(s1, u) : _,(lp(s2) : _,(lp(s3) : _,lp(s4)))
with {
k = 4 * (Q - 0.5) / (25 - 0.5);
g = tan(ma.PI * fc / ma.SR);
G = g / (1 + g);
sigma = G^3*s1 + G^2*s2 + G*s3 + s4 : /(1 + g);
u = -(k * sigma) : /(1 + k * G^4);
lp(s,x) = y + v, y with {
v = (x - s) * G;
y = v + s;
};
};
};
otherwise I think your and my version should do the same, modulo q->k mapping.
(although I find my version more simple/readable but I am obviously biased ;)
> I'm curious, what's your background? Are you an electronic musician?
cough no ;)
I play with faust (because it is cool!) from time to time when I see something
interesting on this list. I have nothing to do with music or signal processing.
Oleg.
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users