update visualizer-related documentation
This commit is contained in:
@@ -90,12 +90,14 @@
|
|||||||
## you need to compile ncmpcpp with fftw3 support.
|
## you need to compile ncmpcpp with fftw3 support.
|
||||||
##
|
##
|
||||||
#
|
#
|
||||||
## Available values: spectrum, wave.
|
## Available values: spectrum, wave, wave_filled, ellipse.
|
||||||
##
|
##
|
||||||
#visualizer_type = wave
|
#visualizer_type = wave
|
||||||
#
|
#
|
||||||
#visualizer_look = ●▮
|
#visualizer_look = ●▮
|
||||||
#
|
#
|
||||||
|
#visualizer_color = blue, cyan, green, yellow, magenta, red
|
||||||
|
#
|
||||||
##### system encoding #####
|
##### system encoding #####
|
||||||
##
|
##
|
||||||
## ncmpcpp should detect your charset encoding
|
## ncmpcpp should detect your charset encoding
|
||||||
@@ -503,8 +505,6 @@
|
|||||||
#
|
#
|
||||||
#active_column_color = red
|
#active_column_color = red
|
||||||
#
|
#
|
||||||
#visualizer_color = yellow
|
|
||||||
#
|
|
||||||
#window_border_color = green
|
#window_border_color = green
|
||||||
#
|
#
|
||||||
#active_window_border = red
|
#active_window_border = red
|
||||||
|
|||||||
@@ -82,6 +82,9 @@ Defines default visualizer type (spectrum is available only if ncmpcpp was compi
|
|||||||
.B visualizer_look = STRING
|
.B visualizer_look = STRING
|
||||||
Defines visualizer's look (string has to be exactly 2 characters long: first one is for wave whereas second for frequency spectrum).
|
Defines visualizer's look (string has to be exactly 2 characters long: first one is for wave whereas second for frequency spectrum).
|
||||||
.TP
|
.TP
|
||||||
|
.B visualizer_color = COLORS
|
||||||
|
Comma separated list of colors to be used in music visualization.
|
||||||
|
.TP
|
||||||
.B system_encoding = ENCODING
|
.B system_encoding = ENCODING
|
||||||
If you use encoding other than utf8, set it in order to handle utf8 encoded strings properly.
|
If you use encoding other than utf8, set it in order to handle utf8 encoded strings properly.
|
||||||
.TP
|
.TP
|
||||||
@@ -361,9 +364,6 @@ Color of separators used in alternative user interface.
|
|||||||
.B active_column_color = COLOR
|
.B active_column_color = COLOR
|
||||||
Color of active column's highlight.
|
Color of active column's highlight.
|
||||||
.TP
|
.TP
|
||||||
.B visualizer_color = COLOR
|
|
||||||
Color of visualization.
|
|
||||||
.TP
|
|
||||||
.B active_window_border = COLOR
|
.B active_window_border = COLOR
|
||||||
Color of active window's border.
|
Color of active window's border.
|
||||||
.TP
|
.TP
|
||||||
|
|||||||
@@ -241,6 +241,16 @@ bool Configuration::read(const std::string &config_path)
|
|||||||
boundsCheck(result.size(), size_type(2), size_type(2));
|
boundsCheck(result.size(), size_type(2), size_type(2));
|
||||||
return result;
|
return result;
|
||||||
}));
|
}));
|
||||||
|
p.add("visualizer_color", option_parser::worker([this](std::string &&v) {
|
||||||
|
boost::sregex_token_iterator i(v.begin(), v.end(), boost::regex("\\w+")), j;
|
||||||
|
for (; i != j; ++i)
|
||||||
|
{
|
||||||
|
auto color = stringToColor(*i);
|
||||||
|
visualizer_colors.push_back(color);
|
||||||
|
}
|
||||||
|
}, [this] {
|
||||||
|
visualizer_colors = { NC::Color::Blue, NC::Color::Cyan, NC::Color::Green, NC::Color::Yellow, NC::Color::Magenta, NC::Color::Red };
|
||||||
|
}));
|
||||||
p.add("system_encoding", assign_default<std::string>(
|
p.add("system_encoding", assign_default<std::string>(
|
||||||
system_encoding, "", [](std::string &&enc) {
|
system_encoding, "", [](std::string &&enc) {
|
||||||
# ifdef HAVE_LANGINFO_H
|
# ifdef HAVE_LANGINFO_H
|
||||||
@@ -624,16 +634,6 @@ bool Configuration::read(const std::string &config_path)
|
|||||||
p.add("active_column_color", assign_default(
|
p.add("active_column_color", assign_default(
|
||||||
active_column_color, NC::Color::Red
|
active_column_color, NC::Color::Red
|
||||||
));
|
));
|
||||||
p.add("visualizer_colors", option_parser::worker([this](std::string &&v) {
|
|
||||||
boost::sregex_token_iterator i(v.begin(), v.end(), boost::regex("\\w+")), j;
|
|
||||||
for (; i != j; ++i)
|
|
||||||
{
|
|
||||||
auto color = stringToColor(*i);
|
|
||||||
visualizer_colors.push_back(color);
|
|
||||||
}
|
|
||||||
}, [this] {
|
|
||||||
visualizer_colors = { NC::Color::Blue, NC::Color::Cyan, NC::Color::Green, NC::Color::Yellow, NC::Color::Red };
|
|
||||||
}));
|
|
||||||
p.add("window_border_color", assign_default(
|
p.add("window_border_color", assign_default(
|
||||||
window_border, NC::Border::Green
|
window_border, NC::Border::Green
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ void Visualizer::DrawSoundEllipseStereo(int16_t *buf_left, int16_t *buf_right, s
|
|||||||
|
|
||||||
// The arguments to the toColor function roughly follow a circle equation where
|
// The arguments to the toColor function roughly follow a circle equation where
|
||||||
// the center is not centered around (0,0). For example (x - w)^2 + (y-h)+2 = r^2
|
// the center is not centered around (0,0). For example (x - w)^2 + (y-h)+2 = r^2
|
||||||
// centers the circle around the point (w,h) Because fonts are not all the same
|
// centers the circle around the point (w,h). Because fonts are not all the same
|
||||||
// size, this will not always generate a perfect circle.
|
// size, this will not always generate a perfect circle.
|
||||||
w << toColor(pow((x - width)*1, 2) + pow((y - ((long)height)) * 2,2), scaledRadius)
|
w << toColor(pow((x - width)*1, 2) + pow((y - ((long)height)) * 2,2), scaledRadius)
|
||||||
<< NC::XY(x, y)
|
<< NC::XY(x, y)
|
||||||
|
|||||||
Reference in New Issue
Block a user