dpayne / cli-visualizer Goto Github PK
View Code? Open in Web Editor NEWCLI based audio visualizer
License: MIT License
CLI based audio visualizer
License: MIT License
Would be super handy to have a default macOS config in the examples folder as it deviates quite a bit from the given example config.
Thanks
Hi... maybe a missed something, but it seems it isn't possible to use any UTF-8 char with visualizer.[spectrum|ellipse|lorenz].character
options
...should be nice have this. :-)
thanks in advance
Andrea
This is probably a bug in xterm or ncurses, but I thought I would report it here, to see if anyone else can reproduce it (and let you know).
When setting the tabs sizes in your terminal to a non stanard size (eg: 4), corruption occurs.
This problem is most pronounced in xterm, but it seems to affect other terminals too. When on non standard tab sizes in urxvt, there is corruption, but it is much less (I'm getting this sort of corruption when the screen is very large in urxvt, but that's probably unrelated).
$ tabs -8
(this is good!)
$ tabs -4
$ tabs -0
xterm: XTerm(325)
ncurses: 6
Let me know if you cannot reproduce or if you want additional information!
Everything seems to be working, except the right-most bar (associated with the highest frequency) does not appear to move at all.
I am using mpd + ncmpcpp. Below is a link to my vis config file.
I think this has something to do with ncurses, I'm not sure. It looks like this screenshot: http://i.imgur.com/CJ5QWYj.jpg
Any idea why I'm seeing this?
First off, thanks for this awesome software!
I have the following feature request to add a keybinding to toggle between stereo enabled and disabled. Perhaps s
.
With limited vertical space, stereo not enabled looks nicer than enabled.
limited space, stereo disabled
I'd like to be able to quickly switch between these as I may be using the visualization either as a split pane in tmux alongside ncmpcpp or standalone in its own window. My current solution is to edit the config and reload in only one of my running vis instances.
I owe a Raspberry Pi 3.
After extracting I run make.
When I run "make" I got the following error:
mkdir -p /home/ikem/Downloads/cli-visualizer_1.1/cli-visualizer-1.1/build
rm -f /home/ikem/Downloads/cli-visualizer_1.1/cli-visualizer-1.1/build/vis
g++ -std=c++14 -O3 -march=native -ffast-math -fno-omit-frame-pointer -D__extern_always_inline=inline -D_LINUX -DNCURSESW -fno-omit-frame-pointer -DNCURSESW -I/usr/local/include -I/home/ikem/Downloads/cli-visualizer_1.1/cli-visualizer-1.1/include -I/home/ikem/Downloads/cli-visualizer_1.1/cli-visualizer-1.1/src -c src/vis.cpp -o /home/ikem/Downloads/cli-visualizer_1.1/cli-visualizer-1.1/build/vis.o
*** Error in `g++': double free or corruption (top): 0x0083acc0 ***
Makefile:214: recipe for target '/home/ikem/Downloads/cli-visualizer_1.1/cli-visualizer-1.1/build/vis.o' failed
make: *** [/home/ikem/Downloads/cli-visualizer_1.1/cli-visualizer-1.1/build/vis.o] Aborted
According to this site, gcc has trouble to detect the right architecture.
I fixed it by editing the "Makefile" and changing the lines:
CXX_FLAGS += -march=native
PERF_TEST_CXX_FLAGS += -march=native
To this lines:
CXX_FLAGS += -march=armv6
PERF_TEST_CXX_FLAGS += -march=armv6
And it compiled without an error.
I love the program, just got a strange problem where, after a while of playing, the music the bars can get 'stuck' at a point, and not go below that point, but they can go above that point, after going above the stuck level, it returns back to the stuck point.
The same thing happens with ellipse mode too, can't really tell with lorenz
It sometimes goes away after changing to a song, possibly with a blank part at the start of the song.
Photo of it when no audio is being played. https://i.imgur.com/Q0O7q2V.png
Video of music playing, and the bug happening
https://youtu.be/rteCqFnHmPA
Tested on the latest commit.
Config: https://gist.github.com/AConsolePeasant/5fdb31de56e0662b3ed5
I'm trying to install this project from the AUR. I didn't touch the PKGBUILD or the .install file, and it spat out a compiler error.
g++ -std=c++14 -O3 -march=native -ffast-math -fno-omit-frame-pointer -D__extern_always_inline=inline -D_LINUX -D_ENABLE_PULSE -Wl,-O1,--sort-common,--as-needed,-z,relro -fno-omit-frame-pointer -D_ENABLE_PULSE -I/usr/local/include -I/tmp/yaourt-tmp-fredo/aur-cli-visualizer/src/cli-visualizer-1.1/include -I/tmp/yaourt-tmp-fredo/aur-cli-visualizer/src/cli-visualizer-1.1/src -c src/Transformer/SpectrumCircleTransformer.cpp -o /tmp/yaourt-tmp-fredo/aur-cli-visualizer/src/cli-visualizer-1.1/build/SpectrumCircleTransformer.o
src/Transformer/SpectrumCircleTransformer.cpp: In member function ‘virtual void vis::SpectrumCircleTransformer::draw_bars(const std::vector&, const std::vector&, int32_t, bool, const wstring&, vis::NcursesWriter_)’:
src/Transformer/SpectrumCircleTransformer.cpp:38:9: error: ‘sqrt’ is not a member of ‘std’
std::sqrt(std::pow(half_height, 2) + std::pow(half_height, 2));
^~~
src/Transformer/SpectrumCircleTransformer.cpp:38:19: error: ‘pow’ is not a member of ‘std’
std::sqrt(std::pow(half_height, 2) + std::pow(half_height, 2));
^~~
src/Transformer/SpectrumCircleTransformer.cpp:38:46: error: ‘pow’ is not a member of ‘std’
std::sqrt(std::pow(half_height, 2) + std::pow(half_height, 2));
^~~
src/Transformer/SpectrumCircleTransformer.cpp:48:43: error: ‘cos’ is not a member of ‘std’
auto x = static_cast<int32_t>(std::cos(rad) * row_index);
^~~
src/Transformer/SpectrumCircleTransformer.cpp:50:43: error: ‘sin’ is not a member of ‘std’
auto y = static_cast<int32_t>(std::sin(rad) * row_index);
^~~
src/Transformer/SpectrumCircleTransformer.cpp:52:35: error: ‘sqrt’ is not a member of ‘std’
const auto distance = std::sqrt(std::pow(x, 2) + std::pow(y, 2));
^~~
src/Transformer/SpectrumCircleTransformer.cpp:52:45: error: ‘pow’ is not a member of ‘std’
const auto distance = std::sqrt(std::pow(x, 2) + std::pow(y, 2));
^~~
src/Transformer/SpectrumCircleTransformer.cpp:52:62: error: ‘pow’ is not a member of ‘std’
const auto distance = std::sqrt(std::pow(x, 2) + std::pow(y, 2));
^~~
Makefile:214: recipe for target '/tmp/yaourt-tmp-fredo/aur-cli-visualizer/src/cli-visualizer-1.1/build/SpectrumCircleTransformer.o' failed
make: *_* [/tmp/yaourt-tmp-fredo/aur-cli-visualizer/src/cli-visualizer-1.1/build/SpectrumCircleTransformer.o] Error 1
Sorry if this is difficult to parse through, I'm not sure how to make it pretty.
Hello, I'm interested in working on porting this to work with CMUS if you haven't already.
I wanted to play around with this and get it set up, but the config doesn't exist where you say it does and I'm not sure where else to look. I installed it from the AUR.
Hi again, I think that the documentation can be improved. Unfortunately the names of the dependencies on fedora has a completely different name. Last week I spent like an hours looking for the dependencies. If you could add these to the readme it would be awesome
sudo dnf install fftw-devel fftw-doc <---- (I'm not sure if the docs are needed)
sudo dnf install ncurses-devel
sudo dnf install pulseaudio-libs-devel.
I have only tested this on fedora 25 and 26.
PD. The scaling multiplier is working great.
I am using mac os x I have done everything and whenever i run vis
in terminal nothing happens is there a way of checking what is going wrong
While working on proper OS X support, I discovered that the vis
name has apparently been claimed in BSD-land for over two decades. It hasn't caused me any trouble, but I'm honestly not sure how important the real vis
is. Locally I've just changed my makefile to use TARGET=viz
instead, and that doesn't seem to conflict with anything else as far as I can tell. Just thought I'd throw this out there.
Compiling from git with recent commits (403), cli-visualizer show this error at lauch
Invalid settings visualizer.spectrum.bar.spacing=0
and it doesn't run; with e.g. value = 1 it works fine.
previous version (at least commit 376) works fine also setting 0 as value
Regards
When installing i get this error:
andromeda@AndyPC:~/cli-visualizer-master$ ./install.sh
mkdir -p /home/andromeda/cli-visualizer-master/build
rm -f /home/andromeda/cli-visualizer-master/build/vis
g++ -std=c++14 -O3 -march=native -ffast-math -fno-omit-frame-pointer -D__extern_always_inline=inline -D_LINUX -DNCURSESW -fno-omit-frame-pointer -DNCURSESW -I/usr/local/include -I/home/andromeda/cli-visualizer-master/include -I/home/andromeda/cli-visualizer-master/src -c src/vis.cpp -o /home/andromeda/cli-visualizer-master/build/vis.o
make: g++: Command not found
make: *** [/home/andromeda/cli-visualizer-master/build/vis.o] Error 127
cp /home/andromeda/cli-visualizer-master/build/vis /bin/
cp: cannot stat ‘/home/andromeda/cli-visualizer-master/build/vis’: No such file or directory
make: *** [install] Error 1
I recently upgraded my hardware which involved recompiling my kernel. After I got my system up and running again vis was no longer working so I recompiled it from source and now it does weird things. The other two visuallizers work but I only ever used spectrum. Spectrum for some reason is like inverted. I say like because I'm not sure what to call it. When I launch vis it basically just clears my terminal. If I then drag my mouse to highlight the visualizer that's when I can see it but the second I stop highlighting it disappears. I've played around with the config but haven't been able to figure it out and the log doesn't say anything.
Getting some compilation errors when running on Debian Jessie:
src/Writer/NcursesWriter.cpp: In member function ‘void vis::NcursesWriter::write_background(int32_t, int32_t, vis::ColorIndex, const wstring&)’:
src/Writer/NcursesWriter.cpp:54:41: error: ‘mvaddwstr’ was not declared in this scope
mvaddwstr(height, width, msg.c_str());
^
src/Writer/NcursesWriter.cpp: In member function ‘void vis::NcursesWriter::write_foreground(int32_t, int32_t, vis::ColorIndex, const wstring&)’:
src/Writer/NcursesWriter.cpp:65:41: error: ‘mvaddwstr’ was not declared in this scope
mvaddwstr(height, width, msg.c_str());
^
Makefile:218: recipe for target '/home/pi/cli-visualizer/build/NcursesWriter.o' failed
make: *** [/home/pi/cli-visualizer/build/NcursesWriter.o] Error 1
For some reason, setting the fps to 30(only value I tested) and setting mono mode to false:
visualizer.fps = 30
audio.stereo.enabled = false
makes the visualizer fail to work on startup.
I can use it at 30fps if I start it at another value(or at 30fps in stereo mode), change the configuration file, then reload with r
, however.
Running vis
in st
or in any of several terminals under tmux
results in a blank screen with nothing being painted.
There are no errors to report as far as I can tell, simply no function. Note, this was tested using the pulse backend, but since the same configuration was functional under other terminals, I assume this is immaterial.
Is it possible to add support for non 256 color terminals? For example $TERM=screen-16color
.
(Out of curiosity: Why is 256 color required in the first place?)
I have a weird issue with the bar vizualization. I cannot see it. When toggling through the the other options (ellipse and lorentz), they appear just fine. Just the bars are missing. When I "select" (click and drag the cursor across the terminal window) I can see the bars for the length of the frame.
Here two screenshots.
I am running Manjaro, installed the AUR build. TERM outputs rxvt-unicode-256color
vis gets fft-information via mpd
Related: #41
Is it possible to visualize sound output (e.g. Spotify, Youtube running on Chrome, games, etc) on OS X? Currently stuck with the blank screen because I literally have no music on my laptop (mpd only plays local music and I stream all music).
Thanks :)
I might simply be blind, but how do i place the bars in the button of the screen, instead of in the middle?
Thank you!
Hello. I got a bit confused at the setup section. I'm running MacOS and I don't know which audio output should I choose.
Thanks for your answers.
Piping floating point samples through a fifo and having cli-visualizer visualize it results in a very choppy and inaccurate visualization. The same file converted to signed 16-bit little endian samples works just fine.
EDIT: I can confirm the issue by piping floating point audio output through sox and converting it to s16le, which results in normal visualization.
Relevant part of my .asoundrc for reference:
pcm.!default {
type file
slave.pcm "plug:plugequal"
file "| sox -t raw -b 32 -e float -r 44100 - -b 16 -e signed -c 2 -r 44100 -t raw - | safe_fifo /tmp/alsa.fifo"
format raw
perm 0666
}
This is, of course, insanely slow and not ideal because you'd have to change the sox line all the time.
EDIT2:
Actually, yes, you can detect what sample format you're getting according to this.
.asoundrc is now:
pcm.!default {
type file
slave.pcm "plug:plugequal"
file "| /home/[user]/alsafifo.sh %r %c %b %f | safe_fifo /tmp/alsa.fifo"
format raw
perm 0666
}
alsafifo.sh:
#!/bin/sh
echo "r= $1" 1>&2
echo "c= $2" 1>&2
echo "b= $3" 1>&2
echo "f= $4" 1>&2
case $4 in
FLOAT_LE)
sox -t raw -b $3 -e float -c $2 -r $1 - -b 16 -e signed -c 2 -r 44100 -t raw - <&0
;;
S16_LE)
cat <&0
;;
default)
# There's a lot more, but this is just an example
exit 1
;;
esac
Not sure how you'd detect what kind of input your getting in cli-visualizer though. It wouldn't be a nice solution...
Using ALSA and adding the following code to /etc/asound.conf breaks the sound system:
pcm.!default {
type file # File PCM
slave.pcm "hw:0,0" # This should match the playback device at /proc/asound/devices
file "|safe_fifo /tmp/audio" #safe_fifo will be in the cli-visualizer/bin/safe_fifo directory
format raw # File format ("raw" or "wav")
perm 0666 # Output file permission (octal, def. 0600)
}
sound no longer plays and audio program deadbeef crashes when attempting to play an mp3.
speaker-test -t sine -f 2600 results in:
Playback open error: -16,Device or resource busy
System information:
cat /proc/asound/modules
0 snd_ca0106
1 snd_intel8x0
I'm using the Creative Labs ca0106 card
uname -a
Linux dimension 4.1.23-1-MANJARO #1 SMP PREEMPT Sun Apr 24 10:46:46 UTC 2016 i686 GNU/Linux
Hi, i would like the visualizer to respond more to the audio. I dont know how to explain it, or what terms to use but ( atleast with lorenze and ellipse, spectrum its ok) my audio output has to be very loud to see something "meaningfull" in the visualizer.
This is what it looks like at a acceptable volume
In order to see this
The volume has to be at ear-bleeding levels ( very load)
I have read the readme and the examples but I havent found anything to "lower the tolerance".
I'm on fedora 25 and pulse audio.
Anyway thanks for sharing this awesome software.
Demonstration: https://asciinema.org/a/oC6jCraGE32OBSfzb1rgG7EOa
tl;dw: ncmpcpp (and less, and mutt, and vim) don't clear the whole screen when they exit – they remove their content from the terminal, but nothing more, as if they exited with no output. vis clears the entire screen (like pressing ^L), which is disconcerting when you're expecting your previous commands to still be visible. It would be nice if vis behaved like other applications and didn't remove output that it didn't create.
A question:
In the same way cli can pull the PCM from MPD fifo, can cli dump analyzed band amplitudes out to a fifo (along with displaying it)?
I'd like to pick up the spectrum and send it to another device to display in an alternate manner.
Cheers!
T
I have script which is intended to launch vis when I bring up my music player. Unfortunately, the following commands result in an empty or blank Terminator screen.
terminator -e vis
terminator --command vis
I've also tried this with i3-sensible-terminal.
Furthermore, I have tried launching vis via a specific Terminator profile but this produced the same result. It's possible I'm missing something but any feedback would be greatly appreciated. Thank you.
Beyond this, I am able to launch vis just fine by itself.
When I run ./install.sh
on OSX (after installing the deps) I get this error
mkdir -p /Users/Damien/Desktop/Stuff/cli-visualizer/build
rm -f /Users/Damien/Desktop/Stuff/cli-visualizer/build/vis
c++ -std=c++14 -O3 -march=native -ffast-math -fno-omit-frame-pointer -D__extern_always_inline=inline -dynamic -D_OS_OSX -D_XOPEN_SOURCE_EXTENDED -D_ENABLE_PULSE -fno-omit-frame-pointer -D_XOPEN_SOURCE_EXTENDED -D_ENABLE_PULSE -I/usr/local/include -I/Users/Damien/Desktop/Stuff/cli-visualizer/include -I/Users/Damien/Desktop/Stuff/cli-visualizer/src -c src/Source/MpdAudioSource.cpp -o /Users/Damien/Desktop/Stuff/cli-visualizer/build/MpdAudioSource.o
src/Source/MpdAudioSource.cpp:80:36: error: no member named 'read' in the global namespace
int64_t bytes_read = ::read(m_mpd_fifo_fd, buffer, bytes_left);
~~^
src/Source/MpdAudioSource.cpp:109:27: error: no type named 'close' in the global namespace
::close(m_mpd_fifo_fd);
~~^
src/Source/MpdAudioSource.cpp:141:11: error: no type named 'close' in the global namespace
::close(m_mpd_fifo_fd);
~~^
3 errors generated.
make: *** [/Users/Damien/Desktop/Stuff/cli-visualizer/build/MpdAudioSource.o] Error 1
What am I missing?
I've tried using clang38, clang39, g++49, and g++6. Each different one gets an error, though not all the same one.
With g++6 I get an error in NcursesWriter.cpp:54:41 about mvaddwstr
With g++49, I get Utils.h:156:20: error: 'stod' is not a member of 'std' return std::stod(wstring_to_string(iter->second));
With clang++38 and clang++39 I get src/Visualizer.cpp:139:28: error: cannot initialize a parameter of type 'int64_t *' (aka 'long *') with an rvalue of type 'long long *' &last_rotation_timestamp);
Have you encountered any of these?
Now-a-days, majority of the terminal have support for true colors. To name few, below link will suffice:
https://gist.github.com/XVilka/8346728
It would be nice if we have true color support, as the color spectrum of the bars can be made to appear continous!
Hi, thanks for the awesome visualizer. It's simple to use and one of the prettiest I've seen so far.
However, I couldn't help but notice an odd little delay between the notes actually playing in my ears and the movement/spikes of the visualizer (e.g. bass drum would come in for the first time but the visualizer would take a split second to actually react).
I'd really appreciate any thoughts on this! ^_^
I'm getting an illegal hardware instruction
when executing vis
with or without a config file.
If you can let me know what you'd need for debugging purposes, I'd appreciate it. ;)
Thank you!
I followed the instructions from this issue as well: #24
Still no output.
Here is my config:
##Refresh rate of the visualizers. A really high refresh rate may cause screen tearing. Default is 20.
#visualizer.fps=20
##Sets the audio sources to use. Currently available ones are "mpd" and "alsa"Sets the audio sources to use.
##Currently available ones are "mpd", "pulse" and "alsa". Defaults to "mpd".
audio.sources=mpd
##vis tries to find the correct pulseaudio sink, however this will not work on all systems.
##If pulse audio is not working with vis try switching the audio source. A list can be found by running the
##command pacmd list-sinks | grep -e 'name:' -e 'index'
#audio.pulse.source=0
##Defaults to "/tmp/mpd.fifo"
mpd.fifo.path=/tmp/mpd.fifo
##If set to false the visualizers will use mono mode instead of stereo. Some visualizers will
##behave differently when mono is enabled. For example, spectrum show two sets of bars.
#audio.stereo.enabled=false
##Specifies how often the visualizer will change in seconds. 0 means do not rotate. Default is 0.
#visualizer.rotation.secs=10
##Configures the samples rate and the cutoff frequencies.
#audio.sampling.frequency=44100
#audio.low.cutoff.frequency=22050
#audio.high.cutoff.frequency=30
##Configures the visualizers and the order they are in. Available visualizers are spectrum,lorenz,ellipse.
##Defaults to spectrum,ellipse,lorenz
#visualizers=spectrum,ellipse,lorenz
##Configures what character the spectrum visualizer will use. Specifying a space (e.g " ") means the
##background will be colored instead of the character. Defaults to " ".
#visualizer.spectrum.character=#
##Spectrum bar width. Defaults to 2.
#visualizer.spectrum.bar.width=2
##The amount of space between each bar in the spectrum visualizer. Defaults to 1. It's possible to set this to
##zero to have no space between bars
#visualizer.spectrum.bar.spacing=1
##Available smoothing options are monstercat, sgs, none.
#visualizer.spectrum.smoothing.mode=monstercat
##This configures the falloff effect on the spectrum visualizer. Available falloff options are fill,top,none.
##Defaults to "fill"
#visualizer.spectrum.falloff.mode=fill
##Configures how fast the falloff character falls. This is an exponential falloff so values usually look
##best 0.9+ and small changes in this value can have a large effect. Defaults to 0.95
#visualizer.spectrum.falloff.weight=0.95
##Margins in percent of total screen for spectrum visualizer. All margins default to 0
#visualizer.spectrum.top.margin=0.30
#visualizer.spectrum.bottom.margin=0.10
#visualizer.spectrum.right.margin=0.10
#visualizer.spectrum.left.margin=0.10
##Reverses the direction of the spectrum so that high freqs are first and low freqs last. Defaults to false.
#visualizer.spectrum.reversed=false
##This configures the sgs smoothing effect on the spectrum visualizer. More points spreads out the smoothing
##effect and increasing passes runs the smoother multiple times on reach run. Defaults are points=3 and passes=1
#visualizer.sgs.smoothing.points=3
#visualizer.sgs.smoothing.passes=1
##Configures what character the ellipse visualizer will use. Specifying a space (e.g " ") means the
##background will be colored instead of the character. Defaults to "█".
#visualizer.ellipse.character=#
##The radius of each color ring in the ellipse visualizer. Defaults to 2.
#visualizer.ellipse.radius=2
##Configures what character the lorenz visualizer will use. Specifying a space (e.g " ") means the
##background will be colored instead of the character. Defaults to "█".
#visualizer.lorenz.character=#
##Specifies the color scheme. The color scheme must be in ~/.config/vis/colors/ directory. The default scheme is "colors".
#colors.scheme=rainbow
Hello,
First, I apologize if it turns out this doesn't have to do with your program. However, as far as I can tell, vis is listening to my input sources rather than my output sinks.
For example, when I run pacmd list-sinks | grep -e 'name:' -e 'index'
, it spits this out:
index: 0
name: <alsa_output.pci-0000_01_00.1.hdmi-stereo>
index: 1
name: <alsa_output.pci-0000_00_1b.0.analog-stereo>`
So I type in 1 for the audio.pulse.source=
field. The spectrum, however responds to all audio input, so when i checked the sources output (pacmd list-sources | grep -e device.string -e 'name:'
), it came up with this:
name: <alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor>
device.string = "1"
name: <alsa_input.usb-OmniVision_Technologies__Inc.-S2640-07.05.28.1_Monitor_Integrated_Webcam-02.analog-stereo>
device.string = "front:2"
name: <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
device.string = "0"
name: <alsa_input.pci-0000_00_1b.0.analog-stereo>
device.string = "front:0"
Here, 1 is also my default source for PulseAudio. What's more is that audio.pulse.source=
displays a valid spectrum for all inputs up to 3, which is my number of PulseAudio sources.
Is there a way for me to modify this to pull from my PulseAudio sinks? Thank you for any input.
I'm not sure what is going on. I setup everything like intended but for some reason the spectrum isn't appearing, the second visualizer works perfectly and the third one appears but it looks glitchy.
I've changed things about my config but it doesn't seem to have an effect on the visualizer. I've changed the characters for all the visualizers from "#" but they still keep using "#". Tapping R doesn't seem to do anything either. I'm using iTerm and although there isn't anything appearing for the spectrum there is a CPU usage bump when I switch to it with space.
MPD config
music_directory "/Music/iTunes/iTunes Media/Music"/.mpd/playlists"
playlist_directory "
db_file "/.mpd/mpd.db"/.mpd/mpd.log"
log_file "
pid_file "/.mpd/mpd.pid"/.mpd/mpdstate"
state_file "
auto_update "yes"
audio_output {
type "ao"
name "My Mac Device"
mixer_type "software"
options "buffer_time=400"
}
audio_output {
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
bind_to_address "127.0.0.1"
port "6600"
Vis config
##Refresh rate of the visualizers. A really high refresh rate may cause screen tearing. Default is 20.
#visualizer.fps=20
##Sets the audio sources to use. Currently available ones are "mpd" and "alsa"Sets the audio sources to use.
##Currently available ones are "mpd", "pulse" and "alsa". Defaults to "mpd".
#audio.sources=mpd
##vis tries to find the correct pulseaudio sink, however this will not work on all systems.
##If pulse audio is not working with vis try switching the audio source. A list can be found by running the
##command pacmd list-sinks | grep -e 'name:' -e 'index'
#audio.pulse.source=0
##Defaults to "/tmp/mpd.fifo"
#mpd.fifo.path=/tmp/mpd.fifo
##If set to false the visualizers will use mono mode instead of stereo. Some visualizers will
##behave differently when mono is enabled. For example, spectrum show two sets of bars.
#audio.stereo.enabled=false
##Specifies how often the visualizer will change in seconds. 0 means do not rotate. Default is 0.
#visualizer.rotation.secs=10
##Configures the samples rate and the cutoff frequencies.
#audio.sampling.frequency=44100
#audio.low.cutoff.frequency=22050
#audio.high.cutoff.frequency=30
##Configures the visualizers and the order they are in. Available visualizers are spectrum,lorenz,ellipse.
##Defaults to spectrum,ellipse,lorenz
#visualizers=spectrum,ellipse,lorenz
##Configures what character the spectrum visualizer will use. Specifying a space (e.g " ") means the
##background will be colored instead of the character. Defaults to " ".
#visualizer.spectrum.character=#
##Spectrum bar width. Defaults to 2.
#visualizer.spectrum.bar.width=2
##The amount of space between each bar in the spectrum visualizer. Defaults to 1. It's possible to set this to
##zero to have no space between bars
#visualizer.spectrum.bar.spacing=1
##Available smoothing options are monstercat, sgs, none.
#visualizer.spectrum.smoothing.mode=monstercat
##This configures the falloff effect on the spectrum visualizer. Available falloff options are fill,top,none.
##Defaults to "fill"
#visualizer.spectrum.falloff.mode=fill
##Configures how fast the falloff character falls. This is an exponential falloff so values usually look
##best 0.9+ and small changes in this value can have a large effect. Defaults to 0.95
#visualizer.spectrum.falloff.weight=0.95
##Margins in percent of total screen for spectrum visualizer. All margins default to 0
#visualizer.spectrum.top.margin=0.30
#visualizer.spectrum.bottom.margin=0.10
#visualizer.spectrum.right.margin=0.10
#visualizer.spectrum.left.margin=0.10
##Reverses the direction of the spectrum so that high freqs are first and low freqs last. Defaults to false.
#visualizer.spectrum.reversed=false
##This configures the sgs smoothing effect on the spectrum visualizer. More points spreads out the smoothing
##effect and increasing passes runs the smoother multiple times on reach run. Defaults are points=3 and passes=1
#visualizer.sgs.smoothing.points=3
#visualizer.sgs.smoothing.passes=1
##Configures what character the ellipse visualizer will use. Specifying a space (e.g " ") means the
##background will be colored instead of the character. Defaults to "█".
#visualizer.ellipse.character=#
##The radius of each color ring in the ellipse visualizer. Defaults to 2.
#visualizer.ellipse.radius=2
##Configures what character the lorenz visualizer will use. Specifying a space (e.g " ") means the
##background will be colored instead of the character. Defaults to "█".
#visualizer.lorenz.character=#
##Specifies the color scheme. The color scheme must be in ~/.config/vis/colors/ directory. The default scheme is "colors".
#colors.scheme=rainbow
Getting the following errors
(the ncurses-dev
package for Alpine is installed)
src/Writer/NcursesWriter.cpp: In member function 'void vis::NcursesWriter::write_background(int32_t, int32_t, vis::ColorIndex, const wstring&)':
src/Writer/NcursesWriter.cpp:62:41: error: 'mvaddwstr' was not declared in this scope
mvaddwstr(height, width, msg.c_str());
^
src/Writer/NcursesWriter.cpp: In member function 'void vis::NcursesWriter::write_foreground(int32_t, int32_t, vis::ColorIndex, const wstring&)':
src/Writer/NcursesWriter.cpp:73:41: error: 'mvaddwstr' was not declared in this scope
mvaddwstr(height, width, msg.c_str());
^
make: *** [Makefile:233: /cli-visualizer/build/NcursesWriter.o] Error 1
brew install fftw
Warning: fftw-3.3.4_1 already installed
brew tap homebrew/dupes
brew install ncurses
Warning: homebrew/dupes/ncurses-6.0_1 already installed
Seemed to install fine after cloning the repo and entering "./install.sh" and the config file is in the right place. I have mpd+ncmpcpp working fine, and my mpd.conf contains the fifo output lines.
Any idea?
I'm building the tool in a sandbox env is getting the following message:
>>> Install cli-visualizer-1.6 into /var/tmp/portage/media-sound/cli-visualizer-1.6/image/ category media-sound
make -j4 DESTDIR=/var/tmp/portage/media-sound/cli-visualizer-1.6/image/ install
which: no ccache in (/usr/lib/portage/python2.7/ebuild-helpers/xattr:/usr/lib/portage/python2.7/ebuild-helpers:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0:/usr/x86_64-pc-linux-gnu/aarch64-unknown-linux-gnu/gcc-bin/6.3.0)
Found libpulse-simple, enabling pulseaudio support
cp /var/tmp/portage/media-sound/cli-visualizer-1.6/work/cli-visualizer-1.6/build/vis /bin/
* ACCESS DENIED: open_wr: /bin/vis
cp: cannot create regular file '/bin/vis': Permission denied
make: *** [Makefile:225: install] Error 1
* ERROR: media-sound/cli-visualizer-1.6::local-overlay failed (install phase):
Please fix installation by adding a DESTDIR variable:
install:
cp $(BUILD_DIR)/$(TARGET) $(DESTDIR)/$(PREFIX)
For more details, see the following doc:
https://www.gnu.org/prep/standards/html_node/DESTDIR.html
Right now it's not possible to install cli-visualuzer from the AUR. Please take a look at the comments at https://aur.archlinux.org/packages/cli-visualizer
I am using Arch.
I installed vis both form aur and from github.
the only one that works is the spectrum. the other 2 doesnot work, it is just a blank screen.
how do i fix it?
so, I've been trying to build with Pulse audio support. Now, I haven't compiled C in a while, so I'm not entirely certain how I need to use make ENABLE_PULSE=1
. my first thought was to add it to the makefile (as in replace make
with make ENABLE_PULSE=1
), but it fails like so:
drake@NeonBlack:~/github/cli-visualizer-master$ sudo ./install.sh
mkdir -p /home/drake/github/cli-visualizer-master/build
rm -f /home/drake/github/cli-visualizer-master/build/vis
g++ -std=c++14 -O3 -march=native -ffast-math -fno-omit-frame-pointer -D__extern_always_inline=inline -D_LINUX -D_ENABLE_PULSE -DNCURSESW -fno-omit-frame-pointer -D_ENABLE_PULSE -DNCURSESW -I/usr/local/include -I/home/drake/github/cli-visualizer-master/include -I/home/drake/github/cli-visualizer-master/src -c src/vis.cpp -o /home/drake/github/cli-visualizer-master/build/vis.o
src/vis.cpp: In function ‘int main(int, char**)’:
src/vis.cpp:96:32: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
system("setterm -blank 10");
^
src/vis.cpp:97:20: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
system("clear");
^
g++ -std=c++14 -O3 -march=native -ffast-math -fno-omit-frame-pointer -D__extern_always_inline=inline -D_LINUX -D_ENABLE_PULSE -DNCURSESW -fno-omit-frame-pointer -D_ENABLE_PULSE -DNCURSESW -I/usr/local/include -I/home/drake/github/cli-visualizer-master/include -I/home/drake/github/cli-visualizer-master/src -c src/Visualizer.cpp -o /home/drake/github/cli-visualizer-master/build/Visualizer.o
In file included from src/Visualizer.cpp:10:0:
src/Source/PulseAudioSource.h:14:30: fatal error: pulse/pulseaudio.h: No such file or directory
compilation terminated.
Makefile:214: recipe for target '/home/drake/github/cli-visualizer-master/build/Visualizer.o' failed
make: *** [/home/drake/github/cli-visualizer-master/build/Visualizer.o] Error 1
cp /home/drake/github/cli-visualizer-master/build/vis /bin/
cp: cannot stat '/home/drake/github/cli-visualizer-master/build/vis': No such file or directory
Makefile:206: recipe for target 'install' failed
make: *** [install] Error 1
I've tried on its own, and if fails like below:
drake@NeonBlack:~/github/cli-visualizer-master$ sudo make ENABLE_PULSE=1
mkdir -p /home/drake/github/cli-visualizer-master/build
rm -f /home/drake/github/cli-visualizer-master/build/vis
g++ -std=c++14 -O3 -march=native -ffast-math -fno-omit-frame-pointer -D__extern_always_inline=inline -D_LINUX -D_ENABLE_PULSE -DNCURSESW -I/usr/local/include -I/home/drake/github/cli-visualizer-master/include -I/home/drake/github/cli-visualizer-master/src -L/usr/local/lib -o /home/drake/github/cli-visualizer-master/build/vis /home/drake/github/cli-visualizer-master/build/vis.o /home/drake/github/cli-visualizer-master/build/Visualizer.o /home/drake/github/cli-visualizer-master/build/NcursesWriter.o /home/drake/github/cli-visualizer-master/build/VisException.o /home/drake/github/cli-visualizer-master/build/ColorDefinition.o /home/drake/github/cli-visualizer-master/build/Settings.o /home/drake/github/cli-visualizer-master/build/SpectrumCircleTransformer.o /home/drake/github/cli-visualizer-master/build/LorenzTransformer.o /home/drake/github/cli-visualizer-master/build/EllipseTransformer.o /home/drake/github/cli-visualizer-master/build/SpectrumTransformer.o /home/drake/github/cli-visualizer-master/build/GenericTransformer.o /home/drake/github/cli-visualizer-master/build/NcursesUtils.o /home/drake/github/cli-visualizer-master/build/Utils.o /home/drake/github/cli-visualizer-master/build/ConfigurationUtils.o /home/drake/github/cli-visualizer-master/build/Logger.o /home/drake/github/cli-visualizer-master/build/MpdAudioSource.o /home/drake/github/cli-visualizer-master/build/PulseAudioSource.o /home/drake/github/cli-visualizer-master/build/AudioSource.o /home/drake/github/cli-visualizer-master/build/MacOsXAudioSource.o -lfftw3 -lm -lstdc++ -lpulse -lpulse-simple -lncursesw
/usr/bin/ld: cannot find -lpulse
/usr/bin/ld: cannot find -lpulse-simple
collect2: error: ld returned 1 exit status
Makefile:217: recipe for target 'vis' failed
make: *** [vis] Error 1
is there something I'm doing wrong here? it builds fine when i don't try with Pulse audio support.
First off, thank ypu for putting this project together. The screenshots look incredible and I'm excited to get it working as I've always wished that ncmpcpp's visualizer was more colorful.
I cloned this repo, compiled, and installed the program, but when running vis
the visualizer is all black bars as shown here:
My config files is the default with the colors option set to rainbow
. Note that the off-black background color is coming from my XTerm settings. If I remove the .Xresources
file, the background correctly reverts back to white.
Interestingly enough, when I comment out the colors option in the config file, the bars don't seem to max out, but are still black. Here's another screenshot showing this:
For what it's worth, the ncmpcpp visualizer works as intended with the correct color.
System info:
Any ideas why this may be happening? It could very well be something specific to my terminal environment. Any debugging steps I can take to determine the problem?
I know you're probably sick of blank screen complaints! I implemented someone's suggestion to output to /tmp/mpd.fifo and i can tail that and it seems to be working, but I'm not seeing any visuals when vis runs. It's not the naming conflict, and with activity in mpd.fifo, i'm not sure where to do.
my ~/.config/vis/config
audio.sources=mpd
mpd.fifo.path=/tmp/mpd.fifo
So... I am an idiot. Please have patience.
I am on Ubuntu 16.04, fresh install.
list of what I did:
export TERM=xterm-256color
sudo apt-get install libfftw3-dev libncursesw5-dev
sudo apt-get install libpulse-dev
make ENABLE_PULSE=1
./install.sh
pacmd list-sinks | grep -e 'name:' -e 'index' <-- to find audio source
vim ~/.config/vis/config
^ added 'audio.sources=pulse' and 'audio.pulse.source=0'
sudo apt-get install pulseaudio
but i cant help but notice that running pulseaudio gives me the following:
This message was edited
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.
but i have sound
What should I do/have not done?
If say, I have a music video playing in a different screen coming out of headphones, is there more I should be doing?
Thank you very much. Whatever your response is, I'll give this a star =)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.