Coder Social home page Coder Social logo

cli-visualizer's People

Contributors

blshkv avatar camotubi avatar chargingbulle avatar dawe35 avatar dnalor avatar dpayne avatar duckthom avatar erikboesen avatar fes0j avatar greenbigfrog avatar hackerb9 avatar jensenr30 avatar jgkamat avatar juliosueiras avatar kaligule avatar levisnoot avatar m4cs avatar matthewarmand avatar maxice8 avatar noriah avatar sbussetti avatar snuggle avatar teeuwen avatar tsweet64 avatar xanarin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cli-visualizer's Issues

MacOS example config

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

Tearing/Corruption occurs with non standard tab sizes on xterm

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!)

2017-03-04-011335_1909x1056_scrot

$ tabs -4

2017-03-04-011400_1901x1051_scrot

$ tabs -0

2017-03-04-011430_1910x1054_scrot

xterm: XTerm(325)
ncurses: 6

Let me know if you cannot reproduce or if you want additional information!

Keybinding to toggle stereo on/off

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 enabled
screen shot 2017-01-22 at 2 09 26 pm

limited space, stereo disabled
screen shot 2017-01-22 at 2 09 03 pm

ample space, stereo enabled
screen shot 2017-01-22 at 2 09 33 pm

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.

Error in `g++': double free or corruption

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.

Some bars get stuck at a certain level

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

AUR PKGBUILD fails

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.

CMUS support

Hello, I'm interested in working on porting this to work with CMUS if you haven't already.

Instruction for Fedora 25/26

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.

Naming conflict

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.

Unable to set visualizer.spectrum.bar.spacing=0 after recent commits

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

Error:

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

Spectrum inverted?

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.

Compilation errors on Debian Jessie

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

Visualizer fails to work if started at 30fps in mono mode.

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.

Non-functional in tmux and/or st

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.

16 color terminal

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?)

Bars invisible (when not marked)

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

(OS X) Visualizing Stereo Output (from all applications)

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 :)

readme lacks explaination

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!

OSX audio output

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.

Support for floating sample format in mpd fifo audio source

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...

ALSA configuration breaks sound system

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

Lower Visualizer Tolerance

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
2017-08-03-190637_631x570_scrot
In order to see this
2017-08-03-190833_545x620_scrot
2017-08-03-190927_695x726_scrot
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.

vis clears the screen when exiting

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.

Q: Can I get the raw spectrum totals out via fifo

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

Unable to launch with terminator -e or --command

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.

Install fails on OSX

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?

Cannot compile on FreeBSD 11 with clang or gcc

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?

Visualizer Lag/Delay

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! ^_^

illegal hardware instruction thrown

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!

(OS X) does not output anything onto screen, just a blank terminal

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

PulseAudio pulls from sources instead of sinks

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.

[MacOS] Spectrum not appearing, can't update config.

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"
playlist_directory "
/.mpd/playlists"
db_file "/.mpd/mpd.db"
log_file "
/.mpd/mpd.log"
pid_file "/.mpd/mpd.pid"
state_file "
/.mpd/mpdstate"
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

Compilation error in Alpine

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

Nothing happens on OS X

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?

DESTDIR is not respected

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

visualizer not working

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?

Build fails with Pulse-Audio on Ubuntu 16.04

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.

Visualizer is all black (no colors)

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:
2015-12-27-173525_6720x1080_scrot

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:
2015-12-27-173556_6720x1080_scrot

For what it's worth, the ncmpcpp visualizer works as intended with the correct color.

System info:

  • Arch
  • i3 WM
  • XTerm

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?

Mopidy + MPD blank screen

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

Blank Screen when running vis

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 =)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.