Hi Julius,
I didn't mention it to simplify my point, but it's absolutely right:
float2fix(n) = *(2^n) : int;
fix2float(n) = float : /(2^n);
rms3(n) = _ <: _, (^(2) : float2fix(16) <: _,@(n) : - : +~_ : fix2float(16)
: /(n) : sqrt : vbargraph("rms3", 0, 1.42)) : attach;
Cheers
Yann
Le mar. 13
Hi Yann,
That looks much better!
However, I think the roundoff error will still grow in the integrator,
unless the shifted delayed value (which is subtracted) is exactly the same
bit pattern as its undelayed counterpart. This can be arranged by
converting to fixed-point and leaving enough guard
Hi Julius and Dario,
Sliding sums written as:
sliding_sum(n) = (+ ~ _) <: _, @(n) : -;
accumulate errors (because the integral value is ever-growing, its
precision decrease with time).
This is why it is better to first subtract then integrate as in :
sliding_sum(n) = _ <: _,@(n) : - : +~_ ;
Hi!
Faustservice, the remote Faust compiler (https://faustservice.grame.fr/)
has been updated to the latest version: 2.33.1.
Cheers
Yann
*Yann Orlarey*
Directeur scientifique/Scientific director
orla...@grame.fr T : +33 (0) 4 72 07 37 00
GRAME - Centre national de création musicale
11 cours