On 07/05, Dario Sanfilippo wrote:
>
> https://dsp.stackexchange.com/questions/37411/iir-hilbert-transformer/59157#59157
Heh. Funny that. I too played with hiir library a long ago. I even found
the code I wrote
hiir_hilber(N, T) = hilbert with {
coef = FPP(=N, =T) eval {
FILE: #include <hiir/PolyphaseIir2Designer.cpp>
init:
hiir::PolyphaseIir2Designer::compute_coefs_spec_order_tbw($c, 2*$N, $T);
decl: double $c[2*$N];
exec: $c;
};
getc = FPP(i, n, =coef) { $coef[$i + 2*$n] };
hilbert = _ <: H(0), H(1)' with {
ap(a) = f ~ _ with { f(y, x) = a * (x + y') - x''; };
H(i) = seq(n, N, ap(getc(i,n)));
};
};
Both N and T (transition) must be compile-time constants, for example
process = 1-1' : hiir_hilber(4, 2*20.0/ma.SR);
This needs fpp, see
https://sourceforge.net/p/faudiostream/mailman/message/36437475/
Oleg.
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users