nausea

curses audio visualizer
git clone git://git.2f30.org/nausea.git
Log | Files | Refs | README | LICENSE

commit 940910547f8cb72b37d39d215dac9ac7b0ff0399
parent c74e5b3ed273b5f2b71602184eb50edb84bf605e
Author: lostd <lostd@2f30.org>
Date:   Tue Jun 16 01:57:06 +0100

Boost higher frequencies for a nicer display

Diffstat:
nausea.c | 4++++
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; }