Use log scale for visualizer (#397)

* Visualizer: use log scale

- log scale frequency and gain
- Hamming windowing
- improve reading from fifo

* Fix Visualizer memory leaks

* Visualizer: use Blackman window

* Visualizer: support DFT zero padding

* Visualizer: support fractional height bars, fix fifo read

* Revert "Fix Visualizer memory leaks"

This reverts commit 5c6509d2b8ed985a4928f681217dc8616d053ace.

* Visualizer: fix fifo read again

* Visualizer: add cubic interpolation option

* Visualizer: Expose more config options, add docs for config options

* Visualizer: Use reverse video text for stereo visualizer smooth look

* Visualizer: use FormattedColor to for reverse-video

* Visualizer: change some config options for spectrum

* Fix build fftw disabled

* Visualizer: use [0,5] interval for dft_size config option
This commit is contained in:
Evan Chang
2020-12-13 08:13:45 -05:00
committed by GitHub
parent 750e7ff59d
commit 47b3baf93c
6 changed files with 338 additions and 59 deletions

View File

@@ -94,6 +94,31 @@
##
#visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161
#
##
## Note: The next few visualization options apply to the spectrum visualizer
##
#
## Use unicode block characters for a smoother, more continuous look.
## This will override the visualizer_look option. With transparent terminals
## and visualizer_in_stereo set, artifacts may be visible on the bottom half of
## the visualization.
#
#visualizer_spectrum_smooth_look = yes
#
## A value between 0 and 5 inclusive. Specifying a larger value makes the
## visualizer look at a larger slice of time, which results less jumpy
## visualizer output.
#
#visualizer_spectrum_dft_size = 2
#
## Left-most frequency of visualizer in Hz, must be less than HZ MAX
#
#visualizer_spectrum_hz_min = 20
#
## Right-most frequency of visualizer in Hz, must be greater than HZ MIN
#
#visualizer_spectrum_hz_max = 20000
#
##### system encoding #####
##
## ncmpcpp should detect your charset encoding but if it failed to do so, you

View File

@@ -99,6 +99,21 @@ Defines visualizer's look (string has to be exactly 2 characters long: first one
.B visualizer_color = COLORS
Comma separated list of colors to be used in music visualization.
.TP
.B visualizer_autoscale = yes/no
Automatically scale visualizer size.
.TP
.B visualizer_spectrum_smooth_look = yes/no
For spectrum visualizer, use unicode block characters for a smoother, more continuous look. This will override the visualizer_look option. With transparent terminals and visualizer_in_stereo set, artifacts may be visible on the bottom half of the visualization.
.TP
.B visualizer_spectrum_dft_size = NUMBER
For spectrum visualizer, a value between 0 and 5 inclusive. Specifying a larger value makes the visualizer look at a larger slice of time, which results less jumpy visualizer output.
.TP
.B visualizer_spectrum_hz_min = Hz
For spectrum visualizer, left-most frequency of visualizer, must be less than HZ MAX.
.TP
.B visualizer_spectrum_hz_max = Hz
For spectrum visualizer, right-most frequency of visualizer, must be greater than HZ MIN.
.TP
.B system_encoding = ENCODING
If you use encoding other than utf8, set it in order to handle utf8 encoded strings properly.
.TP