>
> looks like tf2np() limits the reflection-coefficients too much...
> The patch below seems to make the things better.
>
> Forgot to mention, I ran these tests with -double.
>
> Oleg.
>
>
> diff --git a/filters.lib b/filters.lib
> index 5b276e3..b530a52 100644
> --- a/filters.lib
> +++ b/filters.lib
> @@ -1004,7 +1004,7 @@ declare tf2np copyright "Copyright (C) 2003-2019 by
> Julius O. Smith III <jos@ccr
>  declare tf2np license "MIT-style STK-4.3 license";
>  tf2np(b0,b1,b2,a1,a2) = allpassnnlt(M,sv) : sum(i,M+1,*(tghr(i)))
>  with {
> -  smax = 0.9999; // maximum reflection-coefficient magnitude allowed
> +  smax = 0.999999999; // maximum reflection-coefficient magnitude allowed
>    s2 = max(-smax, min(smax,a2)); // Project both reflection-coefficients
>    s1 = max(-smax, min(smax,a1/(1+a2))); // into the defined
> stability-region.
>    sv = (s1,s2); // vector of sin(theta) reflection coefficients
>
>
If I'm not wrong, anything above 0.9999999 would be rounded to 1 in single
precision, right?

Would it be possible to choose different constants based on different
options given to the compiler?

If not, a philosophical question (not really) for these situations might
be: should we prioritise single precision or double precision
performance/stability?

As far as I'm concerned, Faust should be double precision by default. :-)

Ciao,
Dario
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to