the AI says, we modify the Hilbert coefficients for band-pass functionality.
Well this can be done as a separate function, which applies the filter to the ideal Hilbert coefficients. This is really minimal.
This is the core of hilbert_init(). Variables might differ to my publication above. The principle is shown only.
Code:
// 1. Ideale Hilbert-Komponente
double h_ideal = (1.0 - cos(M_PI * k)) / (M_PI * k);
// 2. Bandpass-Komponente (Sinc-Differenz)
double h_bp = 2.0 * (f_max / fs) * sinc(2.0 * f_max * k / fs) -
2.0 * (f_min / fs) * sinc(2.0 * f_min * k / fs);
// 3. Hamming-Fenster
double window = 0.54 - 0.46 * cos(2.0 * M_PI * n / (N - 1));
coeffs[n] = h_ideal * h_bp * window;
There we have. Hilbert-Transform + band-pass.
I should have asked this AI before. Well, I have to do it by hand now.


And I am bug fixing too (according to the todo list). 
Leave a comment: