nausea

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

commit 9878386865195ea70526e4caf5bb663ec332edcb
parent 95ca01783b914b1f72e5d976c801fd87aaeeec95
Author: lostd <lostd@2f30.org>
Date:   Mon, 18 Nov 2013 19:58:05 +0200

Change factors to get better looks

Diffstat:
Mspectrum.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/spectrum.c b/spectrum.c @@ -148,13 +148,17 @@ draw(struct frame *fr) fr->height = LINES; /* take most of the left part of the band */ - freqs_per_col = fr->nresult / fr->width * 6 / 10; +#define BANDCUT 0.9 + freqs_per_col = fr->nresult / fr->width * BANDCUT; +#undef BANDCUT /* scale each frequency to screen */ +#define BARSCALE 0.2 for (i = 0; i < fr->nresult; i++) fr->res[i] = sqrt(fr->out[i][0] * fr->out[i][0] + fr->out[i][1] * fr->out[i][1]) - / 100000 * fr->height / 4; + / 100000 * fr->height * BARSCALE; +#undef BARSCALE erase(); attron(A_BOLD);