commit 940910547f8cb72b37d39d215dac9ac7b0ff0399
parent c74e5b3ed273b5f2b71602184eb50edb84bf605e
Author: lostd <lostd@2f30.org>
Date: Tue, 16 Jun 2015 01:57:06 +0100
Boost higher frequencies for a nicer display
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/nausea.c b/nausea.c
@@ -233,6 +233,10 @@ draw_spectrum(struct frame *fr)
fr->res[i] = cabs(fr->out[i]);
/* normalize it */
fr->res[i] /= (nsamples / 2);
+ /* boost higher freqs */
+ fr->res[i] *= log2(i);
+ fr->res[i] *= 0.00005 * i;
+ fr->res[i] = pow(fr->res[i], 0.5);
/* scale it */
fr->res[i] *= fr->height * BARSCALE;
}