Rename the new option, slightly reword the description, add changelog

This commit is contained in:
Andrzej Rybczak
2024-08-21 16:43:01 +02:00
parent f83428a665
commit f51968b98b
6 changed files with 16 additions and 10 deletions

View File

@@ -16,6 +16,9 @@
* Tag editor now only writes to files with modified tags. * Tag editor now only writes to files with modified tags.
* Column view can now display full filepaths. * Column view can now display full filepaths.
* Updated the list of working lyrics fetchers. * Updated the list of working lyrics fetchers.
* Add `visualizer_spectrum_smooth_look_legacy_chars` option (enabled by default)
for potentially improved bottom part of the spectrum visualizer in terminals
with transparent background.
# ncmpcpp-0.9.2 (2021-01-24) # ncmpcpp-0.9.2 (2021-01-24)
* Revert suppression of output of all external commands as that makes e.g album * Revert suppression of output of all external commands as that makes e.g album

View File

@@ -125,14 +125,13 @@
# #
#visualizer_spectrum_smooth_look = yes #visualizer_spectrum_smooth_look = yes
# #
## Use unicode block characters from "symbols for legacy computing", this ## Use unicode block characters from "symbols for legacy computing". This
## improves the smooth look on transparent terminals by using special unicode ## improves the smooth look on transparent terminals by using special unicode
## chars instead of reversing the background and foreground color on the bottom ## chars instead of reversing the background and foreground color on the bottom
## edge of the spectrum. This may lead to a glitchy mess on the bottom edge of ## edge of the spectrum. If it leads to a garbled output on the bottom edge of
## the spectrum, this can eighter be fixed by changing the font or disabeling ## the spectrum, you can either change the font or disable this option.
## this.
# #
#visualizer_spectrum_use_legacy_chars = yes #visualizer_spectrum_smooth_look_legacy_chars = yes
# #
## A value between 1 and 5 inclusive. Specifying a larger value makes the ## A value between 1 and 5 inclusive. Specifying a larger value makes the
## visualizer look at a larger slice of time, which results in less jumpy ## visualizer look at a larger slice of time, which results in less jumpy

View File

@@ -114,8 +114,12 @@ Automatically scale visualizer size.
.B visualizer_spectrum_smooth_look = yes/no .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. 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 .TP
.B visualizer_spectrum_use_legacy_chars = yes/no .B visualizer_spectrum_smooth_look_legacy_chars = yes/no
Use unicode block characters from "symbols for legacy computing", this improves the smooth look on transparent terminals by using special unicode chars instead of reversing the background and foreground color on the bottom edge of the spectrum. This may lead to a glitchy mess on the bottom edge of the spectrum, this can eighter be fixed by changing the font or disabeling this. Use unicode block characters from "symbols for legacy computing". This improves
the smooth look on transparent terminals by using special unicode chars instead
of reversing the background and foreground color on the bottom edge of the
spectrum. If it leads to a garbled output on the bottom edge of the spectrum,
you can either change the font or disable this option.
.TP .TP
.B visualizer_spectrum_dft_size = NUMBER .B visualizer_spectrum_dft_size = NUMBER
For spectrum visualizer, a value between 1 and 5 inclusive. Specifying a larger value makes the visualizer look at a larger slice of time, which results in less jumpy visualizer output. For spectrum visualizer, a value between 1 and 5 inclusive. Specifying a larger value makes the visualizer look at a larger slice of time, which results in less jumpy visualizer output.

View File

@@ -519,7 +519,7 @@ void Visualizer::DrawFrequencySpectrum(const int16_t *buf, ssize_t samples, size
} else { } else {
// fractional height // fractional height
if (flipped) { if (flipped) {
if (Config.visualizer_spectrum_use_legacy_chars) { if (Config.visualizer_spectrum_smooth_look_legacy_chars) {
ch = SMOOTH_CHARS_FLIPPED[idx]; ch = SMOOTH_CHARS_FLIPPED[idx];
} else { } else {
ch = SMOOTH_CHARS[size-idx-2]; ch = SMOOTH_CHARS[size-idx-2];

View File

@@ -253,7 +253,7 @@ bool Configuration::read(const std::vector<std::string> &config_paths, bool igno
}); });
p.add("visualizer_autoscale", &visualizer_autoscale, "no", yes_no); p.add("visualizer_autoscale", &visualizer_autoscale, "no", yes_no);
p.add("visualizer_spectrum_smooth_look", &visualizer_spectrum_smooth_look, "yes", yes_no); p.add("visualizer_spectrum_smooth_look", &visualizer_spectrum_smooth_look, "yes", yes_no);
p.add("visualizer_spectrum_use_legacy_chars", &visualizer_spectrum_use_legacy_chars, "yes", yes_no); p.add("visualizer_spectrum_smooth_look_legacy_chars", &visualizer_spectrum_smooth_look_legacy_chars, "yes", yes_no);
p.add("visualizer_spectrum_dft_size", &visualizer_spectrum_dft_size, p.add("visualizer_spectrum_dft_size", &visualizer_spectrum_dft_size,
"2", [](std::string v) { "2", [](std::string v) {
auto result = verbose_lexical_cast<size_t>(v); auto result = verbose_lexical_cast<size_t>(v);

View File

@@ -86,7 +86,7 @@ struct Configuration
size_t visualizer_fps; size_t visualizer_fps;
bool visualizer_autoscale; bool visualizer_autoscale;
bool visualizer_spectrum_smooth_look; bool visualizer_spectrum_smooth_look;
bool visualizer_spectrum_use_legacy_chars; bool visualizer_spectrum_smooth_look_legacy_chars;
uint32_t visualizer_spectrum_dft_size; uint32_t visualizer_spectrum_dft_size;
double visualizer_spectrum_gain; double visualizer_spectrum_gain;
double visualizer_spectrum_hz_min; double visualizer_spectrum_hz_min;