Giter Site home page Giter Site logo

xava's Introduction

X.A.V.A.

Build status

X11 Audio Visualizer for ALSA

also supports audio input from WASAPI (Windows), PortAudio, Pulseaudio, SHMEM, FIFO (MPD) and sndio.

Demo video

a fork of Karl Stavestrand's C.A.V.A. by Nikola Pavlica

What it is

X.A.V.A. is a bar spectrum audio visualizer in a graphical window (X11, Wayland (wlroots and xdg shell), Windows, SDL2).

This program is not intended for scientific use. It's written to look responsive and aesthetic when used to visualize music.

Getting started

Windows

There should be an installer in the Releases page of this repository. Just download, install and run it. Non-release builds are unstable, so expect breakage.

You can get them at the Releases page (labeled as "Development build").

The configuration file is located in %appdata%\xava\config.cfg

Technical notes:

It is NOT possible to compile under Windows nor do I recommend doing it.

Windows version lacks features compared to Linux version as that's my target. If you want the "full" experience, consider using this on a Linux machine.

macOS

VERY likely that it's broken. I don't recommend trying this unless you are completely sure that you know what you're doing.

You have to compile this yourself, get the dependencies installed via brew (look below) and compile it using the method described above.

Once you've done that, install Background Music and get it running on your Mac machine. Then, install the latest XQuartz build. Now what you need to do is add the following into the [input] section of the config file:

method = portaudio
source = "Background Music"

And now, within "Background Music" change the audio source of XAVA to the speaker output that you want recorded.

You are free to use either ncurses or x11_cairo output methods.

No OpenGL, because Apple likes to be Apple.

Linux

I recommend grabbing the AppImage, as it deals with all dependency issues upfront and all you really need to to is just download and run it.

You can get it at the Releases page (labeled as "Development build").

Installing manually

NOTE: I strongly advise you use the AppImage as it'll sort out everything. But if you want to build this, you're going to be on your own when it comes to build errors and messages.

However, issues related to AUR packages are to be forwarded here (since I maintain them).

After grabbing your basic build tools such as CMake, GCC and others you're supposed to follow this sequence of commands:

git clone https://github.com/nikp123/xava
cd xava
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install

And uninstalling with:

cat install_manifest.txt | xargs sudo rm -

Updating

If you happen to be updating this program, just keep in mind that breaking changes DO occur sometimes.

In most cases, errors that show up might look like issue #43 which (likely) can be fixed with a simple config reset.

In order to fix it I recommend just resetting your config by deleting:

  • %APPDATA%\xava on Windows
  • $HOME/.config/xava on Linux

You will lose your modifications if you do this, so I'd recommend making a backup first.

Usage

After you've installed it, to use this visualizer you'll have to be playing something on your system (be it a movie, voice chat or song, doesn't matter) and launch it. If everything succeeded, you'll see an audio visualization of whatever audio is going through your system. If not, please refer to Capturing audio section of this README.

In order to launch the application (in most cases), you'll be able to start it via a start menu entry or a desktop shortcut. If not, you can still choose to start it as a command-line executable:

Usage : xava [options]
Visualize audio input in terminal. 

Options:
	-p	path to config file
	-v	print version

Exit by pressing Q, ESC or by closing the window ;)

Controls

Key Description
up / down increase/decrease sensitivity
left / right increase/decrease bar width
a / s increase/decrease bar spacing
f toggle fullscreen
c / b change forground/background color
r restart visualizer
q or ESC quit the program

Troubleshooting

Latency notes

If you see latency issues, ie. visualizer not reacting on time, try turning off demanding graphical effects and/or shrinking the window, or just lower the fft_size and size (within [input]), as increasing capture time creates a delay.

If your audio device has a huge buffer, you might experience that xava is actually ahead than the audio you hear. This reduces the experience of the visualization. To fix this, try decreasing the buffer settings in your audio playing software. Or in case of MPD, just quickly pause and resume playback (yes, this is a bug with MPD's pulse implementation).

The visualizer isn't opening

There's something seriously wrong with the visualizers configuration, please check that the configuration is okay first and then file a bug if it's still not working.

The visualizer does nothing

The audio configuration might be incorrect, please refer to the Capturing audio section of this README.

How do I start the visualizer on system startup

On Windows create a shortcut of the xava.exe (which is in the install directory) and copy it to C:\Users\you\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\

To-do Linux instructions: But basically just make sure that the xava executable or the AppImage one runs at startup.

Configuration

Important note:

Starting from 0.7.0.0, the configuration layout has been SIGNIFICANTLY CHANGED. Please check examples_files/config before filing a bug. This has been done to ease further development.

If you're running Windows and you used the installer, you'll find a Configure XAVA shortcut in your Start Menu. Use it to open the XAVA configuration.

By default a configuration file is located in $XDG_CONFIG_HOME/xava/config, $HOME/.config/xava/config or on Windows %APPDATA%\xava\config

The configurations are seperated into different categories such as [general] or [window] which are used to configure how certain parts of the visualizer should function.

For example: [filter] refers to options that control the behavior of the audio filtering/conversion to bars system, whilst [output] controls how the output result should be drawn.

By default the configurations are commented by a semi-colon ; in front of the option. You'll need to remove this semi-colon for the configuration changes to be effective.

Equalizer

To change the amplitude of certain frequency ranges, XAVA features an equalizer in the [eq] section of the config file to do so.

The equalizer works by setting an amplitude value to a incremental which refers to the part of the frequency spectrum.

Examples on how the equalizer works:

[eq]
1=0
2=1
3=0
4=1
5=0

3_138

In this example the frequency spectrum is divided in 5 parts. You may be able to see that the 1st, 3rd and 5th parts have been totally disabled and you can see the result of it on the screenshot above.

[eq]
1=2
2=2
3=1
4=1
5=0.5

3_139

And in this example you can see that the lower parts (1 and 2) have been amplified while 5 is being lowered.

Capturing audio

The idea is that on most systems this should "just work" out of the box. If not, keep reading.

The [input] section of the config file controls where and how XAVA captures it's "audio input".

The method option describes which system should be used to capture the audio samples for the visualizer to process and source tells that "capture source" where to capture that audio information from. FXP. your microphone or seperate audio input source.

From WASAPI (Windows only, super easy)

If you are on Windows, just use this. Don't even bother dealing with other options.

It's enabled by default if it detects compilation for Windows and if it's disabled go and set method to wasapi in the [input]section of the config file.

If you want to record loopback audio (that is "what you hear") (default) set source = loopback in the [input] section of the config file. Otherwise you can set anything else for it to record from the default microphone.

From Pulseaudio monitor source (Easy as well, unsupported on macOS and Windows)

First make sure you have installed pulseaudio dev files and that xava has been built with pulseaudio support (it should be automatically if the dev files are found).

If you're lucky all you have to do is to set this line in the config file under the [input] section method = pulseaudio.

If nothing happens you might have to use a different source than the default. The default might also be your microphone. Look at the config file for help.

From portaudio

First make sure you have portaudio dev files and that xava was built with portaudio support. Since portaudio combines the functionality of all audio systems, it should be the most compatible. However, it is NOT "out of the box" because it requires some configuring.

  1. To enable just set method to portaudio in the [input] section of your config. Afterwards change the portaudio input device, by setting source to list temporarily and by running xava again.
  • It should list all of the available audio devices on your system (even that aren't input devices, watch out for that).
  1. Once you find the device you want to record from, take it's number and set soruce to equal that number.

From ALSA-loopback device (Tricky, unsupported on macOS and Windows)

Set method to alsa in [output] section the config file.

ALSA can be difficult because there is no native way to grab audio from an output. If you want to capture audio straight fom the output (not just mic or line-in), you must create an ALSA loopback interface, then output the audio simultaneously to both the loopback and your normal interface.

To create a loopback interface simply run:

sudo modprobe snd_aloop

Hopefully your aplay -l should now contain a loopback interface.

To make it presistent across boot add the line snd-aloop to "/etc/modules". To keep it form beeing loaded as the first soundcard add the line options snd-aloop index=1to "/etc/modprobe.d/alsa-base.conf", this will load it at '1'. You can replace '1' with whatever makes most sense in your audio setup.

Playing the audio through your Loopback interface makes it possible for xava to to capture it, but there will be no sound in your speakers. In order to play audio on the loopback interface and your actual interface you must make use of the ALSA multi channel.

Look at the included example file example_files/etc/asound.conf on how to use the multi channel. I was able to make this work on my laptop (an Asus UX31 running Ubuntu), but I had no luck with the ALSA method on my Rasberry PI (Rasbian) with an USB DAC. The PulseAudio method however works perfectly on my PI.

Read more about the ALSA method here.

If you are having problems with the alsa method on Rasberry PI, try enabling mmap by adding the following line to /boot/config.txt and reboot:

dtoverlay=i2s-mmap

From mpd's fifo output

Add these lines in mpd:

audio_output {
    type                    "fifo"
    name                    "my_fifo"
    path                    "/tmp/mpd.fifo"
    format                  "44100:16:2"
}

Uncomment and change input method to fifo in the config file.

The path of the fifo can be specified with the source parameter.

I had some trouble with sync (the visualizer was ahead of the sound). Reducing the ALSA buffer in mpd fixed it:

audio_output {
        type            "alsa"
        name            "My ALSA"
        buffer_time     "50000"   # (50ms); default is 500000 microseconds (0.5s)
}

sndio

sndio is the audio framework used on OpenBSD, but it's also available on FreeBSD and Linux. So far this is only tested on FreeBSD.

To test it

# Start sndiod with a monitor sub-device
$ sndiod -dd -s default -m mon -s monitor

# Set the AUDIODEVICE environment variable to override the default
# sndio device and run xava
$ AUDIODEVICE=snd/0.monitor xava

squeezelite

squeezelite is one of several software clients available for the Logitech Media Server. Squeezelite can export it's audio data as shared memory, which is what this input module uses. Configure XAVA with the -DSHMEM=ON (cmake) option, then adapt your config:

method = shmem
source = /squeezelite-AA:BB:CC:DD:EE:FF

where AA:BB:CC:DD:EE:FF is squeezelite's MAC address (check the LMS Web GUI (Settings>Information) if unsure).

Note: squeezelite must be started with the -v flag to enable visualizer support.

Output modes

Since 0.7.1.1 the output methods have been sorted into three categories:

  • OpenGL output methods
  • Cairo output methods
  • Unsupported output methods (basically those that don't have good support)

In the [output] section of the config there's an parameter named method. This "method" determines what drawing system you will like XAVA to use for it's visualizations. That can be either cairo or opengl.

  • opengl uses your GPU for accelerated graphics (but can be demanding on the system)
  • cairo doesn't use your GPU, but can be CPU-heavy if too many options/effects are used

Selecting any of those would automatically load the appropriate window backend for you. But in case you don't like that, you can specify the backend manually:

For example:

  • Windows uses win
  • Linux uses either x11 or wayland
  • Any other operating system is going to use sdl2
  • And unsupported modes such as ncurses (which is a terminal display)

To select whether you'd use opengl or cairo with any of the aforementioned window backends, you just type _thing after the backend name. Like so: win_cairo or x11_opengl

Both Cairo and OpenGL use what I call "modules" that you can mix and match to display whatever you want in the visualizer. These can be adjusted by going into their respective categories within the config file:

  • For OpenGL there's the [gl] category
  • For Cairo there's the [cairo] category

Configuring OpenGL

Same as Cairo, you could set up OpenGL so that it uses "modules" which are just seperate plugins that allow further customization. They are enabled by adding options from module_1 to module_(however many you need) and are drawn in that order. That means that the module_1's pixels could get overwritten by module_2.

Modules currently included in XAVA are:

  • bars (default) - draws the usual horizontal bar layout
  • stars - a pre-2016 Monstercat inspired star effect
  • bars_circle - same as bars but drawn in a circle

Each of these modules has it's seperate config file which can be found under: xava config directory > gl > module > module's name > config.ini

If it's not there, it's most that configuration is likely NOT supported by said module.

Additionally, you can (optionally) apply a single post-processing shader effect to the entire screen via the post_shader option. Currently, packed-in shaders are:

  • default - does nothing special basically
  • shadow - adds simple 2D shadows
  • kinetic - changes background opacity based on the intensity of music

Programming OpenGL shaders

You are free to add more if you'd like, though it requires programming knowledge. The files are located in your config's directory > gl > shaders > the shader's name. There you must add three files:

  • config.ini - This configures the engine properties about which resources it should generate for said shader. For users, no touchy this part (it will be bad).
  • fragment.glsl
  • vertex.glsl

And optionally:

  • geometry.glsl

NOTE: Variables are non-standard, so you'll HAVE to look into the code itself to figure those out (am sorry about this).

Configuring Cairo

Cairo, as opposed to OpenGL, is much simpler, but that comes with graphical effects limitations (and sometimes) bad performance. But unlike OpenGL, it is more flexible. One example of its flexibility is its ability to add as many modules as you'd like in any order that you'd like.

By going into the [cairo] section of the config you can add modules by appending (or changing) the line/option: module_$indexnumber = module's name Where $indexnumber represents the order at which something is drawn and it must start from 1 and increment accordingly 2, 3 and so forth.

Currently, there are 4 available modules you can choose from:

  • bars - draws horizontal bars as it regularely would
  • stars - draws stars on the screen that move based on the intensity of music
  • kinetic - changes the background opacity based on the intensity of must, be absolutely sure that it's at the lowest "layer" (aka 0) otherwise it WILL overwrite everything on the screen
  • media_info (Linux-only) - Displays song artist, title and artwork in the top left part of the screen.

Mix and match these for optimum effect, however, be sure to not do too much as you can easily overwhelm your system by using this since it's CPU-based graphics.

If you want the lightest possible setup, I recommend just sticking with the default bars module.

Basic window options

You can find these in the [window] section of the configuration file:

Window size:

width = *number of pixels*
height = *number of pixels*

Toggle full-screen:

fullscreen = *true or false*

Toggle window border:

border = *true or false*

Window position

Move the window on startup to a specific part of the screen:

alignment = 'top_left', 'top', 'top_right'. 'left', 'center', 'right', 'bottom_left', 'bottom', 'bottom_right' and by default 'none'

In addition to window aligment you can adjust the window position further with:

x_padding = *specify offset in pixels*

y_padding = *specify offset in pixels*

Advanced window options

The following features enable options that come with recent OSes and may introduce problems on older software/hardware (fxp. Windows XP), but in return they may look really nice if you configure them properly.

Transparency

You can enable transparent windows:

transparency = *true or false*

And with transparency comes the ability to change the opacity of the background and the bars:

foreground_opacity = *range from 0.0 to 1.0*
background_opacity = *range from 0.0 to 1.0*

Advanced window behaviour

Force the window to be behind any window (may not work):

keep_below = *true or false*

Set window properties (useful for scripts relying on window class information):

set_win_props = *true or false*

This changes the X11 window type so that the compositor doesn't apply shadows and blur onto the window. However, this is not guaranteed to work, plus additional breakage may occur.

Make the window not react on mouse input (it just lets the click go through the window):

interactable = 0

Pro-tip: You can still gain control of the window by clicking it's taskbar icon or by alt-tabbing into it.

Fullscreening the visualizer without changing the viewport

In case you want to make the visualizer window fullscreen, but not the visualizer with it, you can do so by enabling the hold_size option in the [window] section of the configuration and enabling fullscreen. Then use the same options from window position to change how the visualizer is places within the window.

VSync

VSync is enabled by default on XAVA and works ONLY if you use OpenGL.

You can change its behavior or just outright disable it.

To do that open the configuration file and in the [general] section you will find:

vsync = 1 (1 means its enabled)
vsync = -1 (enable variable refresh rate)
vsync = 0 (disable Vsync)
vsync = 2 (custom framerate, the number is a divisor of the refresh rate of your display)

Bars

In XAVA you can customize the look of the visualizer.

In the [general] section you'll find two options that let you change the size of the bars and the space between them:

bar_width = *width in pixels*
bar_spacing = *width in pixels*

To limit the number of bars displayed on the window, set the following in the [general] category:

bars = *insert number here*

Colors and gradients

In the color section of the config file you can find:

background = *by name or by hex value*
foreground = *same as above*

Additionally, you can specify default if you want to use your system accent or Xresources color instead. Supported in win and x11 output modes only.

But if you want to have gradients on the bars instead of static colors, you can enable them by changing:

gradient_count = *number of colors higher than 1*

gradient_color_1 = *same rule as colors*
gradient_color_2 = *same rule as colors*
...

Additional options

XAVA still has plenty to offer, just look up all of the options in the config file. The config file also serves as documentation, so that you won't get stuck in configuration.

Contribution

Please read CONTRIBUTING.md before opening a pull request.

Thanks to:

for major contributions in the early development of this project.

Reporting issues

Because XAVA has a pretty outdated design paradigm, its error messages may appear out of place and convoluting. If that's the case you may file an issue where you explain your confusion and I will try fixing said issue.

Otherwise, if the issue is of how the program itself performs, (i.e. an actual bug) be SURE that you attach the full log by running XAVA with XAVA_SCREAM=1 set in your environment.

xava's People

Contributors

anko avatar antiprism avatar binarii avatar chelovechishko avatar czinsii avatar dnalor avatar emilgedda avatar funilrys avatar ginkage avatar hartwork avatar hashhar avatar iamsubhranil avatar jubalh avatar karlstav avatar larsks avatar livibetter avatar make-42 avatar nikp123 avatar notsatvrn avatar orthographic-pedant avatar phijor avatar sabrehagen avatar sionleroux avatar sjef avatar subhayu99 avatar tivervac avatar tiz-huglife avatar usernameblank avatar vectorcell avatar winny- 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

xava's Issues

Xava's problem with compiling

I followed the instruction one by one, but I failed to compiling when I reached the "make" part

I'm in an arch linux. Oh yea, btw I have problem to install it through aur too, idk why

[ 1%] Building C object CMakeFiles/iniparser.dir/lib/iniparser/src/dictionary.c.o
[ 2%] Building C object CMakeFiles/iniparser.dir/lib/iniparser/src/iniparser.c.o
[ 3%] Linking C static library libiniparser.a
[ 3%] Built target iniparser
[ 4%] Building C object CMakeFiles/xava-shared.dir/src/shared/log.c.o
[ 5%] Building C object CMakeFiles/xava-shared.dir/src/shared/config/config.c.o
[ 6%] Building C object CMakeFiles/xava-shared.dir/src/shared/module/abstractions.c.o
[ 7%] Building C object CMakeFiles/xava-shared.dir/src/shared/ionotify.c.o
[ 8%] Building C object CMakeFiles/xava-shared.dir/src/shared/io.c.o
[ 9%] Building C object CMakeFiles/xava-shared.dir/src/shared/version.c.o
[ 10%] Building C object CMakeFiles/xava-shared.dir/src/shared/module/unix.c.o
[ 11%] Building C object CMakeFiles/xava-shared.dir/src/shared/io/unix.c.o
[ 12%] Linking C shared library libxava-shared.so
[ 12%] Built target xava-shared
[ 12%] Building C object CMakeFiles/cairo_bars.dir/src/output/shared/cairo/modules/bars/main.c.o
[ 13%] Building C object CMakeFiles/cairo_bars.dir/src/output/shared/cairo/modules/shared/config.c.o
[ 14%] Linking C shared library cairo/module/bars/module.so
[ 14%] Built target cairo_bars
[ 15%] Building C object CMakeFiles/cairo_kinetic.dir/src/output/shared/cairo/modules/kinetic/main.c.o
[ 16%] Linking C shared library cairo/module/kinetic/module.so
[ 16%] Built target cairo_kinetic
[ 16%] Building C object lib/kiss-mpris-properties/src/CMakeFiles/kiss-mpris.dir/kiss-mpris.c.o
[ 17%] Linking C static library libkiss-mpris.a
[ 17%] Built target kiss-mpris
[ 18%] Building C object CMakeFiles/cairo_media_info.dir/src/output/shared/cairo/modules/media_info/main.c.o
/home/cancel/xava/src/output/shared/cairo/modules/media_info/main.c: In function โ€˜xava_cairo_module_draw_artworkโ€™:
/home/cancel/xava/src/output/shared/cairo/modules/media_info/main.c:296:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
296 | if(artwork->image->h > artwork->image->w) {
| ^
/home/cancel/xava/src/output/shared/cairo/modules/media_info/main.c:299:9: note: here
299 | case ARTWORK_PRESERVE:
| ^~~~
[ 19%] Building C object CMakeFiles/cairo_media_info.dir/src/output/shared/util/media/artwork.c.o
[ 20%] Building CXX object CMakeFiles/cairo_media_info.dir/src/output/shared/util/media/artwork_taglib.cpp.o
[ 21%] Building C object CMakeFiles/cairo_media_info.dir/src/output/shared/util/media/media_data.c.o
[ 22%] Linking CXX shared library cairo/module/media_info/module.so
[ 22%] Built target cairo_media_info
[ 23%] Building C object CMakeFiles/cairo_oscilloscope.dir/src/output/shared/cairo/modules/oscilloscope/main.c.o
[ 23%] Building C object CMakeFiles/cairo_oscilloscope.dir/src/output/shared/cairo/modules/shared/config.c.o
[ 24%] Linking C shared library cairo/module/oscilloscope/module.so
[ 24%] Built target cairo_oscilloscope
[ 25%] Building C object CMakeFiles/cairo_stars.dir/src/output/shared/cairo/modules/stars/main.c.o
[ 26%] Building C object CMakeFiles/cairo_stars.dir/src/output/shared/cairo/modules/shared/config.c.o
[ 27%] Linking C shared library cairo/module/stars/module.so
[ 27%] Built target cairo_stars
[ 28%] Building C object CMakeFiles/filter_default.dir/src/filters/default/main.c.o
[ 29%] Linking C shared library filter_default.so
[ 29%] Built target filter_default
[ 30%] Generating ../src/output/graphical_wayland/gen/xdg-shell-client-protocol.h
[ 31%] Generating ../src/output/graphical_wayland/gen/wlr-layer-shell-unstable-v1-client-protocol.c
[ 32%] Generating ../src/output/graphical_wayland/gen/wlr-layer-shell-unstable-v1-client-protocol.h
[ 32%] Generating ../src/output/graphical_wayland/gen/wlr-output-managment-unstable-v1.c
[ 33%] Generating ../src/output/graphical_wayland/gen/wlr-output-managment-unstable-v1.h
[ 34%] Generating ../src/output/graphical_wayland/gen/xdg-output-unstable-v1-client-protocol.c
[ 35%] Generating ../src/output/graphical_wayland/gen/xdg-output-unstable-v1-client-protocol.h
[ 36%] Generating ../src/output/graphical_wayland/gen/xdg-shell-client-protocol.c
[ 37%] Building C object CMakeFiles/out_wayland_opengl.dir/src/output/graphical_wayland/main.c.o
In file included from /home/cancel/xava/src/output/shared/gl/egl.h:7,
from /home/cancel/xava/src/output/graphical_wayland/main.h:6,
from /home/cancel/xava/src/output/graphical_wayland/main.c:12:
/home/cancel/xava/src/output/shared/gl/main.h:18:14: fatal error: GL/glew.h: No such file or directory
18 | #include <GL/glew.h>
| ^~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/out_wayland_opengl.dir/build.make:108: CMakeFiles/out_wayland_opengl.dir/src/output/graphical_wayland/main.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:364: CMakeFiles/out_wayland_opengl.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

I hope someone knows betters, cheers!

XQuartz 2.7.11 doesn't work.

The 2.7.11 version of XQuartz, which is the only one that will launch properly (in my case), doesn't work due to using a version of libX11 older than 11.0.0. Not sure if there is much to fix here, as I don't know if xava will work on older libX11 versions. Will try to test this soon.

malloc errror on running xava

On running xava i get the following error

xava: malloc.c:2394: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
[1]    29899 abort (core dumped)  xava

xava version = xava 0.6.3.1
I used the default config file.
I installed it from AUR given in the README https://aur.archlinux.org/packages/xava-git/

Disable support for Wayland

I know when building from source "you're on your own", but hopefully this is an acceptable question.

I'm building from source for use with X11. Which flag(s) can be supplied to make to disable support for Wayland?

Encountering error:

[ 32%] Built target cairo_bars
[ 32%] Building C object CMakeFiles/out_wayland_cairo.dir/src/output/graphical_wayland/main.c.o
In file included from /home/jackson/repositories/tmp/xava/src/output/graphical_wayland/main.c:13:
/home/jackson/repositories/tmp/xava/src/output/graphical_wayland/wl_output.h:4:10: fatal error: gen/xdg-output-unstable-v1-client-protocol.h: No such file or directory
    4 | #include "gen/xdg-output-unstable-v1-client-protocol.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/out_wayland_cairo.dir/build.make:79: CMakeFiles/out_wayland_cairo.dir/src/output/graphical_wayland/main.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:270: CMakeFiles/out_wayland_cairo.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Y-axis adjustment.

Thanks for the wonderful program!
Just updated to xava-git (0.6.2.1.r0.g960965b-1) and it no longer sits on the taskbar (Manjaro KDE). So I thought I'd open the config and tinker with the y-axis. Forgive my ignorance but I can put in negative values correct?

# Additionally we can further adjust the positions if needed (in pixels)
; x_padding = 0
 y_padding = -50

Unfortunately if that's the case it doesn't move the bars down to close the gap. positive values however work fine. :) If not, then I'm a dummy and sorry I wasted your time.
I had it set in the previous version to bottom_right and it rested on the bar.
I also tried alignment = 'none' and adjusted the y-axis, no luck. I also drug it to rest on the bar but it doesn't save the position because it popped back to it's spot with the gap.

Here's a screenshot if that's helpful.

Imgur

Thank you for your time.

Xava transparancy not working on CentOS 7 using Gnome 3.28.3

Hello everyone,

So even after I compiled the xava from a git clone (I am on version 0.6.3.1) the tranparency doesn't work. Anyone know why?

Here is my config file:

## Configuration file for XAVA. Default values are commented out. Use either ';' or '#' for commenting.


[general]

# Accepts only non-negative values.
; framerate = 60

# Keep the application in sync with the monitor to prevent tearing
# It's generally recommended to keep it on, as different framerates may lead to unstable frametimes
# -1 = adaptive Vsync (G-Sync. FreeSync, etc.)
# 0 = off
# 1 up to refresh rate = refresh at the refresh rate of the monitor divided by the number given
; vsync = 1

# 'autosens' will attempt to balance the sensitivity to keep the amplitude of the bars 
# within a reasonable range
; autosens = true

# Manual sensitivity in %. Autosens must be turned off for this to take effect.
# 200 means double height and so on. Accepts only non-negative values.
; sensitivity = 100

# The number of bars. 0 sets it to auto (put as many as you can).
# Bars' width and space between bars in number of pixels on screen.
; bars = 0
; bar_width = 13
; bar_spacing = 5

# Lower and higher cutoff frequencies for lowest and highest bars
# the bandwidth of the visualizer.
# XAVA will automatically increase the higher cutoff if a too low band is specified.
; lower_cutoff_freq = 26
; higher_cutoff_freq = 15000

# This allows XAVA to restart when the display settings are changed
# As this can cause constant reloading (https://github.com/nikp123/xava/issues/20)
# it is left off by default (X11 only)
; reload_on_display_configure = false
# mode = normal
framerate = 60
autosens = 0
overshoot = 0
sensitivity = 100
bars = 63
lower_cutoff_freq = 20
higher_cutoff_freq = 20000

[window]

# Window width and height
# width = 550
# height = 75

# Fullscreen toggle
; fullscreen = false

# Enables or disables window borders 
; border = false

# Window transparency toggle (your system must support transparent windows)
# transparency = 1

# Keeps the window under any other (doesn't work in SDL)
; keep_below = true

# This option aligns the window with a certain part of the screen
# The following positions are supported:
# top_left, top, top_right, left, center, right, bottom_left,
# bottom, bottom_right and none if you don't want manual positioning
; alignment = 'none'

# Additionally we can further adjust the position if needed (in pixels)
# It moves the window the opposite direction of whats in alignment
# FXP. if alignment is set to right and x_padding is 20, 
# it will move the window left 20 pixels and so on for every direction 
# x_padding =1220
# y_padding =200

# Enables the OpenGL renderer (not available on all output modes)
; opengl = true

# This option removes the ability to interact with the window
# NOTE: It does not work with SDL2 
; interactable = true

# Create an taskbar icon
; taskbar_icon = true

# Draw directly on the root window (or wallpaper) itself (Xorg ONLY), VERY UNPREDICTABLE
# You need to stop any form of compositing for this to even work properly
; rootwindow = false

# Sets the override any redirection by the host WM, that is the window cannot change
# the it's order in the window stack
# This option also disables any form of interaction with the window - same as when:
#    interacable = false
; override_redirect = false
bar_width = 18
bar_spacing = 7
width = 1650
height = 420
fullscreen = 0
border = 0
transparency = 1
keep_below = 1
set_win_props = 0
alignment = 'center'
x_padding = 0
y_padding = 75
opengl = 1


[input]

# Audio capturing method. Possible methods are the ones listed below.
# If one doesn't work, it might not be supported by your system or it just wasn't compiled with it.
# 
# Defaults to the order shown below ('pulse', 'portaudio', 'alsa'...)
#
# All input methods uses the same config variable 'source'
# to define where it should get the audio.
#
# For pulseaudio 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
# 
# For alsa, wasapi and portaudio 'source' will be the capture device.
# For fifo 'source' will be the path to fifo-file.
#
# In case of wasapi, specify 'loopback' to capture audio from the system or anything else 
# to capture from an input device, such as a microphone
#
# You can also specify 'list' as the source to portaudio to list all available audio devices
; method = pulse
; source = auto

; method = portaudio
; source = auto

; method = alsa
; source = hw:Loopback,1

; method = sndio
; source = 

; method = shmem
; source = /squeezelite-00:00:00:00:00:00 

; method = fifo
; source = /tmp/mpd.fifo

; method = wasapi
; source = loopback


[output]

# Output method. Can be any of the following (if supported):
# By default it's the window that is recommended for your platform/OS.
# 'sdl' is for a graphical window using SDL2
# 'x11' is for a graphical window using X11 (usually faster, unsupported in wayland however)
# 'win' is for a win32 graphical window
# method = x11

# Visual channels. Can be 'stereo' or 'mono'.
# 'stereo' mirrors both channels with low frequencies in center.
# 'mono' averages both channels and outputs left to right lowest to highest frequencies.
# channels = mono


[color]

# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
# Or defined by hex code '#xxxxxx' (hex code must be within '').
# It can also be 'default' at which point under X11 it reads the color off of Xrdb
# Under Windows it uses your system accent color
# And on SDL2 it's just black and cyan (default colorscheme)
# background = '#4c566a'
# foreground = '#5e81ac'

# This adjusts the opacity of the bars (must have transparency and OpenGL in order for it to work)
# foreground_opacity = 1.0

# And this does the same but for the background (previous rule applies here as well) 
# background_opacity = 0.0

# Gradient mode, only hex defined colors are supported, background must also be defined in hex
# or remain commented out.
# To enable gradients, just change gradient_count to the number of colors you have specified
# (0 = disabled)
; gradient_count = 0
; gradient_color_1 = '#0099ff'
; gradient_color_2 = '#ff3399'
# extra lines:
background = '#4c566a'
; foreground = "#e20809"	# Drum & Bass
; foreground = "#e5890c"	# House 
; foreground = "#0586e1"	# Trance
; foreground = "#9004df"	# Dubstep
; foreground = "#e20586" 	# Drumstep
; foreground = "#e5d900"	# Electro
; foreground = "#0bb304"	# Hardcore
; foreground = "#17aa59"	# Glitch Hop or 110BPM
; foreground = "#8a0e26"	# Trap
; foreground = "#9999fd"	# Future Bass
; foreground = "#29b9b0"	# Indie dance and Nu Disco
; foreground = "#c1c1c1"	# Misc

; foreground = "#000000"	# Everything Black xD
; foreground = "#ffffff"	# New layout

foreground_opacity = 1.0

gradient = 0
gradient_color_1 = '#0099ff'
gradient_color_2 = '#ff3399'


[smoothing]

# Percentage value for integral smoothing. Takes values from 0 - 100.
# Higher values means smoother, but less precise. 0 to disable.
; integral = 85

# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable (default).
; monstercat = 1.0
; waves = 0

# Set gravity percentage for "drop off". Higher values means bars will drop faster.
# Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off".
; gravity = 100

# In bar height, bars that would have been lower that this (in pixels) will not be drawn.
; ignore = 0

# Adjust the logarithmic scale of the frequency band (the lower the value, 
# the less difference between bars in frequency)
; log = 1.55

# Average out the value of each odd bar (just like the monstercat visualizer)
; oddoneout = true

# Balances the eq towards higher or lower frequencies
# lower value->lower frequencies, higher value->higher frequencies
; eq_balance = 0.67

# Adjusts the input buffer size (in samples, calculated by 2^input_size)
; input_size = 12

# Adjusts the FFT buffer size (calculated by 2^fft_size)
; fft_size = 14
#extra line
integral = 85
monstercat = 2.0
waves = 0.0
gravity = 1500
oddoneout = 1
log_begin = 0.1
log_end = 1.0
eq_balance = 0.64
ignore = 0
log = 1.6
fft_size = 14


[shadow]

# Fake shadow effect (works with transparency only)
# To disable shadows, set size to 0
; size = 7

# Color format is #aarrggbb
; color = "#ff000000"


[eq]

# This one is tricky. You can have as much keys as you want.
# Remember to uncomment more then one key! More keys = more precision.
# Look at readme.md on github for further explanations and examples.
; 1 = 1 # bass
; 2 = 1
; 3 = 1 # midtone
; 4 = 1
; 5 = 1 # treble

Config file name gets corrupted in xWatcher

When I run it on my system it says:

$ xava -p config.txt 
Output method 'alsa' at '/usr/lib/xava/out_alsa.so' could not load.
Reason: /usr/lib/xava/out_alsa.so: cannot open shared object file: No such file or directory

With this config:

[output]
method=alsa

[feature request] ability to specify output screen

Thank you so much for contributing into this project and providing us with awesome visualiser that is easy on CPU (everything else is much hard on CPU).

The addition of override_redirect makes it almost perfect. Now if only I could move it to another monitor of mine.

NO XAVA.PNG

i tried to compile xava from aur and from git and i couldn't because there is not a file named xava.png and when i added a random image xava didn't run :)

config file empty

by reading the readme.md, it seam like there must be something in the config file but there is nothing, using gedit on pop os 19.10. If there is nothing please add some sort of preset in the readme or in this post. Thanks!

[AUR] xava-git ASSERT issue

upon attempting to update xava-git I received this confounding error...

[ 98%] Linking C executable xava
/usr/bin/ld: libxava-shared.so: undefined reference to `assert'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/xava.dir/build.make:114: xava] Error 1
make[1]: *** [CMakeFiles/Makefile2:816: CMakeFiles/xava.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Makefile error (Ubuntu 20.04.2)

Here is what is did

sudo apt-get install libfftw3-dev libasound2-dev libpulse-dev libx11-dev libsdl2-dev libportaudio2 cmake git wayland-protocols
git clone https://github.com/nikp123/xava.git
cd xava
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)

Here is where it fails

/usr/bin/ld: libiniparser.a(iniparser.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/out_wayland.dir/build.make:235: out_wayland.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:125: CMakeFiles/out_wayland.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

CMake Error at CMakeLists.txt

I tryed to install xava and that happened:
cmake .. -DCMAKE_BUILD_TYPE=Release

-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- iniparser not found on system, building from source.
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
-- Checking for module 'fftw3'
--   Found fftw3, version 3.3.7
-- Not a Windows platform, can use POSIX now!
-- portaudio library not found
-- Configuring done
CMake Error at CMakeLists.txt:27 (add_library):
  Cannot find source file:

    lib/iniparser/src/dictionary.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:27 (add_library):
  No SOURCES given to target: iniparser


CMake Generate step failed.  Build files cannot be regenerated correctly.

Please help!
Thanks!

[Arch] Xava crashes with stereo option enabled

System info:

  • EndeavourOS Rolling
  • Xava v0.7.0.0

Error:

[ERROR] xavaFilterHandleConfiguration at src/filters/default/main.c:399 - 'oddoneout' and stereo channels do not work together!
at /usr/lib/xava/filter_default.so(xavaFilterHandleConfiguration+0x473) [0x7fd644d4afb3]
at xava(+0x2624) [0x5631e9028624]
at /usr/lib/libc.so.6(+0x2d310) [0x7fd645002310]
at /usr/lib/libc.so.6(__libc_start_main+0x81) [0x7fd6450023c1]
at xava(+0x2b7e) [0x5631e9028b7e]

Config file attached,
config.txt

Error when linking executable

Scanning dependencies of target iniparser
[ 15%] Building C object CMakeFiles/iniparser.dir/lib/iniparser/src/dictionary.c.o
[ 15%] Building C object CMakeFiles/iniparser.dir/lib/iniparser/src/iniparser.c.o
[ 23%] Linking C static library libiniparser.a
[ 23%] Built target iniparser
Scanning dependencies of target xava
[ 46%] Building C object CMakeFiles/xava.dir/src/input/alsa.c.o
[ 46%] Building C object CMakeFiles/xava.dir/src/output/graphical_x.c.o
[ 46%] Building C object CMakeFiles/xava.dir/src/output/graphical_sdl.c.o
[ 53%] Building C object CMakeFiles/xava.dir/src/input/fifo.c.o
[ 61%] Building C object CMakeFiles/xava.dir/src/misc/inode_watcher.c.o
[ 69%] Building C object CMakeFiles/xava.dir/src/output/graphical.c.o
[ 76%] Building C object CMakeFiles/xava.dir/src/shared.c.o
[ 84%] Building C object CMakeFiles/xava.dir/src/config.c.o
[ 92%] Building C object CMakeFiles/xava.dir/src/xava.c.o
[100%] Linking C executable xava
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: CMakeFiles/xava.dir/src/output/graphical_x.c.o: in function `apply_window_settings_x':
graphical_x.c:(.text+0x10bd): undefined reference to `glXSwapIntervalEXT'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/xava.dir/build.make:205: xava] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/xava.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Void Repos

In the docs under the installation for Void linux it says:

NOTE: Currently unavailable.

Was it removed for some reason? Are there plans to add xava to Void?

[Arch] Segfault when uncommenting EQ params

Interesting issue, xava segfaults when the eq params are uncommented. Comment them and it's perfectly happy to run. Config below:

[general]
framerate = 60
vsync = -1
bars = 0
bar_width = 13
bar_spacing = 0

[window]
width = 2560
height = 1560
fullscreen = false
border = false
transparency = true
keep_below = true
interactable = false
taskbar_icon = false

[x11]
root_window = true
override_redirect = true

[gl]
pre_shaderpack = default
post_shaderpack = default
resolution_scale = 1.0
[input]
method = pulseaudio
source = auto
size = 12

[output]
method = x11
channels = stereo

[color]
background = default
foreground = '#1B81F3'
foreground_opacity = 0.5
gradient_count = 0

[filter]
lower_cutoff_freq = 20
higher_cutoff_freq = 15000
integral = 80
monstercat = 0
waves = 5
gravity = 100
log = 1.2
oddoneout = false
eq_balance = 0.6
fft_size = 14
autosens = true
overshoot = -50

[eq]
;1 = 1 # bass
;2 = 1
;3 = 1 # midtone
;4 = 1
;5 = 1 # treble

Yet another OpenGL renderer

This is partly motivated by seeing how much I like the cairo system that I built. Unfortunately it's cairo, which means that the rendering is quite slow for something as intense as a visualizer. The current system, while more flexible than the last ones, is nothing in comparison to what cairo achieves.

My idea is the following:

xava main -> platform native window -> OpenGL main handle (via GLEW or EGL) -> OpenGL modules (emphasis on the s)

Implemented like this:

  1. The main handle should be able to load multiple modules using arrays of structs and a global "OpenGL module handle" that exists in cairo as well. This will allow the modules to use the same resources as all other parts of the visualizer.
  2. The main handle SHOULD handle the post processing shaders, because applying multiple post shaders basically makes no goddamn sense, you'll just get a corrupted/ugly looking image.
  3. The main handle should initialize the mian OpenGL resources/variables and let the modules create their own uniforms and such.
  4. The modules should draw to the same buffer using the FBO system already built, this way we ensure that the visualizer doesn't take hundreds of MB of VRAM, because creating a FB for EVERY single module is a memory hog and GPU hog. However this means that the modules themselves should be responsible for what they draw on the screen, aka. no module should overwrite the entire screen.
  5. The post shaders should have standardized uniforms and optional ones enabled through the config.ini thing I've already built. This ensures that the resources NOT used by the visualizer don't end up calculated, saving on (already limited) resources.
  6. Post shaders should demonstrate the power of filtering and what it can do to an OpenGL scene.
  7. The individual modules should focus on keeping the logic to themselves and handle geometry in the shader itself (if possible), mostly because geometry shaders are not well supported except on newer graphics cards 2014+ (i know this may seem old, but people are still running bad PCs).
  8. The modules should also share resources if possible: intensity value and other goodies. Perhaps a common feature flag (similar to how regions are handled by cairo)?
  9. The main handle (AND ONLY THE MAIN HANDLE) should take care of clearing the FBO. The same as cairo.
  10. Implement previous features that are now missing such as oscilloscope, artwork, kinetic... etc. through this system, if it ends up working.

[Feature Request] Multithreading the FFT calculation

I don't know if it is possible, but would it be possible to multithread the whole FFT calculation? Maybe dividing parts of the audio spectrum or buffering frames... My CPU has 28 threads and can easily run XAVA but when I assign 1 bar per pixel it doesn't run at full framerate... I'll have a look myself but I don't know at all how this could work.

Xava randomly quits working

Randomly (usually after quite a while of no audio activity) xava quits working. I have to kill it and restart it in order for it to work properly. If music is going, it will work for hours on end without problem.
Here is my setup.

Manjaro KDE (all current)
-Plasma 5.19.5
-Qt 5.15.1
-Kernel 5.8.11-1

Update windows build on release page

The Windows build available for download on the release page is pretty old (11 months), it would be pretty great if someone could release a newer version for Windows.

Improve CPU Usage

Looks promising, but would it be possible to make some improvements for the CPU usage? Not sure if is empty cycles or not, but it maxes out a core on an Intel i7-7700HQ @ 8x 3.8GHz (just using default settings).

That is quite a bit for a basic app to be using, especially one intended simply for background aesthetics.

Can't get non-transparent window under Kubuntu

I just freshly built xava from this repo, installed it and now I can't get the window to be non-transparent anymore. It's seemingly completely ignoring the transparency setting in the config file. Gradient mode also appears to work with transparency "off".

I'm using Kubuntu 19.04 currently, xava reports its version as 0.6.2.3.

Example screenshot:
image

Expected result: transparency is disabled, background is black with no transparency.

[AUR] XAVA-git Runtime Error

Good morning! Upon the most recent AUR update to xava-git this unusual error occurred:

X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 54
Current serial number in output stream: 55

Library not found for -lX11

I am trying to make xava work on my mac, but with no success.

OS:

System Software Overview:

      System Version: macOS 10.15.1 (19B88)
      Kernel Version: Darwin 19.0.0

Steps:

I cloned the repo from git and used the following cmake commands:

cmake .. -DCMAKE_BUILD_TYPE=Release

But I got the following warning:

X11 and/or Xfixes library not found

I stumbled upon this stack question and did the following:

  • xcode-select --install
  • ln -s /opt/X11/include/X11 /usr/local/include/X11
  • 'export CPPFLAGS=-I/opt/X11/include'

With no success.

Segmentation fault

This is another error from the AUR package xava-git.

(gdb) run
Starting program: /usr/bin/xava 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff6b1a700 (LWP 6770)]
[New Thread 0x7ffff6319700 (LWP 6782)]
[New Thread 0x7ffff5b18700 (LWP 6783)]
[New Thread 0x7ffff4a57700 (LWP 6788)]
[New Thread 0x7fffcfafd700 (LWP 6789)]
[New Thread 0x7fffcf2fc700 (LWP 6790)]
[New Thread 0x7fffceafb700 (LWP 6791)]
[New Thread 0x7fffce2fa700 (LWP 6792)]
[New Thread 0x7fffcdaf9700 (LWP 6793)]
[New Thread 0x7fffcd2f8700 (LWP 6794)]
[New Thread 0x7fffccaf7700 (LWP 6795)]
[New Thread 0x7fffaffff700 (LWP 6796)]
[New Thread 0x7fffaf7fe700 (LWP 6797)]
[New Thread 0x7fffaeffd700 (LWP 6798)]
[New Thread 0x7fffae7fc700 (LWP 6799)]
[New Thread 0x7fffadffb700 (LWP 6800)]
[New Thread 0x7fffad7fa700 (LWP 6801)]
[New Thread 0x7fffacff9700 (LWP 6802)]

Thread 1 "xava" received signal SIGSEGV, Segmentation fault.
0x00007ffff76cc2e5 in __strlen_avx2 () from /usr/lib/libc.so.6

I suspect that it has something to do with config files, but I could be entirely wrong :)

Idea: Dump legacy code

Seeing how flexible shaders really are, a slight part of me wants to delete legacy options such as X11 bars (it's over 800 lines of pure mess). Or perhaps having a simpler approach to them entirely, instead of JUST deleting them.

Like supporting all the advanced features, but ONLY in the EGL renderer, since most of the mess is caused by rewriting the same darn thing 20 times over for each windowing system.

Anyway, food for thought.

[Bug] Constantly reloads

Due to commit 568771a XAVA constantly reloads as if the display changes but it doesn't.

OS: Ubuntu 20.04 with KDE
Monitors: 2x(1920x1080)

ontake@ontake-PC:~/Apps/xava/xava/build$ xava
Display change detected - Restarting...
Display change detected - Restarting...
Display change detected - Restarting...
Display change detected - Restarting...
Display change detected - Restarting...
Display change detected - Restarting...

[Feature Request] Change stars size and blur

Hi, nice job done, I am in love ๐Ÿ’•.

One additional enhancement would be having control over:

  • The star's size โญ
  • The randomization factor of the size.
  • Color
  • Glow

Build error can't import iniparser in config.c

I have used xava on Windows in the past but I recently switched to Ubuntu, I have tried building the project with no success it fails with this error when I run make -j$(nproc):

/home/ontake/Downloads/xava/src/config.c:4:11: fatal error: iniparser.h: No such file or directory
    4 |  #include <iniparser.h>
      |           ^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/xava.dir/build.make:180: CMakeFiles/xava.dir/src/config.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/xava.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

If you could help me that would be great!

[arch/wayland] 898ebc8 builds successfully, but fails to start

I have just updated my xava install to the latest commit 898ebc8 pushed to this repo, and it won't start anymore under Sway (wayland mode).

Log when starting xava from cli:

[ERROR] SGLCreateProgram at /home/linuxct/.cache/paru/clone/xava-git/src/xava/src/output/shared/gl_shared.c:371 - Error: linking:
error: fragment shader input `v_color' has no matching output in the previous stage


at /usr/lib/xava/out_wayland.so(+0x6d63) [0x7fecd0d65d63]
at /usr/lib/xava/out_wayland.so(+0x6de0) [0x7fecd0d65de0]
at /usr/lib/xava/out_wayland.so(xavaInitOutput+0x111) [0x7fecd0d64771]
at xava(+0x26a3) [0x55dcabcc66a3]
at /usr/lib/libc.so.6(__libc_start_main+0xd5) [0x7fecd0d9db25]
at xava(+0x2bfe) [0x55dcabcc6bfe]

Relevant lines from my config file:

[general]
framerate = 60
vsync = 0

[window]
transparency = true
keep_below = true

[wayland]
background_layer = true

[output]
method = wayland

Any clue as to why this is happening?

[AUR] Package failed to build because of URL.

I was installing the xava package from the AUR (not the -git one) when I came across an error with the git clone url.
When I checked the AUR page, I tried clonning the link the the sources section, but came across the same error.
There I believe the error is because of the sources URL.
20231119_21h40m05s_grim
20231119_21h33m47s_grim

Linker issue in "Release" build

When I install xava-git from AUR. I get the following error.

[ontake@ontakePC ~]$ xava
xava: error while loading shared libraries: libxava-shared.so: cannot open shared object file: No such file or directory

Multiple definition of xavaGLXContext

I installed via AUR (xava-git) and got this linker error. Full log:

==> Making package: xava-git 0.6.2.3.r67.gcc4d03e-1 (Thu 21 May 2020 18:00:47 +08)
==> Checking runtime dependencies...==> Checking buildtime dependencies...
==> Retrieving sources...  -> Updating xava git repo...
Fetching origin==> Validating source files with sha1sums...
    xava ... Skipped==> Extracting sources...
  -> Creating working copy of xava git repo...Switched to a new branch 'makepkg'
==> Starting pkgver()...==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- Not a Windows platform, can use POSIX now!
-- Configuring done
-- Generating done
-- Build files have been written to: /home/takase/aur/xava-git/src/xava/build
[  7%] Linking C executable xava
/usr/bin/ld: CMakeFiles/xava.dir/src/output/graphical_x.c.o:(.bss+0x130): multiple definition of `xavaGLXContext'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1b0): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/output/graphical_x.c.o:(.bss+0x20): multiple definition of `p'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0xa0): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/output/graphical_x.c.o:(.bss+0x128): multiple definition of `xavaFBConfig'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1a8): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/output/graphical.c.o:(.bss+0x0): multiple definition of `p'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0xa0): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/output/graphical.c.o:(.bss+0x108): multiple definition of `xavaFBConfig'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1a8): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/output/graphical.c.o:(.bss+0x110): multiple definition of `xavaGLXContext'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1b0): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/config.c.o:(.bss+0x0): multiple definition of `p'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0xa0): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/config.c.o:(.bss+0x108): multiple definition of `xavaFBConfig'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1a8): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/config.c.o:(.bss+0x110): multiple definition of `xavaGLXContext'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1b0): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/xava.c.o:(.bss+0x0): multiple definition of `p'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0xa0): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/xava.c.o:(.bss+0x108): multiple definition of `xavaFBConfig'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1a8): first defined here
/usr/bin/ld: CMakeFiles/xava.dir/src/xava.c.o:(.bss+0x110): multiple definition of `xavaGLXContext'; CMakeFiles/xava.dir/src/output/graphical_sdl.c.o:(.bss+0x1b0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/xava.dir/build.make:269: xava] Error 1
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/xava.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

Gradient not working

Color part of my config

background = 'black'
foreground = '#5106db'

# This adjusts the opacity of the bars (must have transparency for it to work)
; foreground_opacity = 1.0

# And this does the same but for the background (under the same condition as above)
; background_opacity = 1.0

# Gradient mode, only hex defined colors are supported, background must also be
# defined in hex or remain commented out.
# To enable gradients, just change gradient_count to the number of colors you
# have specified (0 = disabled)
gradient_count = 2
gradient_color_1 = '#5106db'
gradient_color_2 = '#ff1593'

image

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.