ref: 9e04963740c0f4afb924bd7308b290f0745f1536
parent: c4cd4eac0aac666a84c07c5ffefb22cb2a4ce87c
author: Ulrich Klauer <ulrich@chirlu.de>
date: Mon Dec 26 07:35:46 EST 2011
Let hilbert use a Blackman window for even less ripple
--- a/src/hilbert.c
+++ b/src/hilbert.c
@@ -59,9 +59,9 @@
if (!f->num_taps) {
int i;
if (!p->taps) {
- p->taps = effp->in_signal.rate/100 + 2;
+ p->taps = effp->in_signal.rate/76.5 + 2;
p->taps += 1 - (p->taps%2);
- /* results in a cutoff frequency of about 75 Hz */
+ /* results in a cutoff frequency of about 75 Hz with a Blackman window */
lsx_debug("choosing number of taps = %d (override with -n)", p->taps);
}
lsx_valloc(p->h, p->taps);
@@ -74,7 +74,7 @@
p->h[i] = (1 - cos(pk))/pk;
}
}
- lsx_apply_hamming(p->h, p->taps);
+ lsx_apply_blackman(p->h, p->taps, .16);
if (effp->global_info->plot != sox_plot_off) {
char title[100];