Audio visualizer thing
Go to file
Skylar "The Cobra" Widulski e341fa273d
Add screenshots
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
2023-12-22 11:52:00 -05:00
screenshots Add screenshots 2023-12-22 11:52:00 -05:00
yammer Make this a git repo 2023-12-21 13:59:13 -05:00
.gitignore Smoothing !!! 2023-12-21 21:57:37 -05:00
COPYING Prepare for publishing 2023-12-21 15:17:27 -05:00
README.md Interpolate non-fft values too 2023-12-22 10:39:58 -05:00
config.example.scm Interpolate non-fft values too 2023-12-22 10:39:58 -05:00
yammer.c 4 tab indents for C, add comments in C 2023-12-21 22:19:22 -05:00
yammer.h Prepare for publishing 2023-12-21 15:17:27 -05:00
yammer.scm Interpolate non-fft values too 2023-12-22 10:39:58 -05:00

README.md

Yammer

Audio visualizer thing in guile scheme

Build

Dependencies

guile-sdl2, fftw

Compiling the library

You need to compile the yammer.c file because it has wrappers around fftw functions.

gcc -shared yammer.c -o libyammer.so -Wall -Wextra -Werror -fPIC -shared -lfftw3 -lm -O3 -ggdb

Configuration

Copy config.example.scm to config.scm

Below is a list of values and what they do

  • fifo-file: The MPD fifo
  • bitrate: The bitrate of the audio coming from the input
  • sample-factor: Proportional to quality, may cause stuttering when >1.
  • fps: Self explanatory
  • resolution: Pixel width of bars
  • scale: Bar height multiplier
  • color: Bar color
  • bgcolor: Background color
  • queue-size: The size of the queue (minimum of 1), delays displaying bars by queue-size frames. Useful if desync is noticed
  • fft: Whether or not to perform a fourier transform to show frequencies (like spectrum mode in most other visualizers)
  • interpolation: Number of points to interpolate between values. <1 means disable
  • smoothing: Smoothing mode. Possible values are:
    • #f: No smoothing or interpolation. Disregards fft-interpolation
    • 'none: No smoothing
    • 'moving-average: Moving average
    • 'exponential: Simple (basic) exponential smoothing
  • moving-average-block-size: Size of the moving average window. Higher is smoother.
  • exponential-factor: Exponential smoothing factor, lower is more smooth.
  • exponential-init-factor: The first value of the exponentially smoothed list is multiplied by this

Running

Either install libyammer.so and yammer.h to their respective systemwide locations, or do the following:

export LD_LIBRARY_PATH=.

Then, run yammer.

guile -L . yammer.scm

Wishlist

  • Native PulseAudio and PipeWire sources
  • More smoothing modes (one that actually works would be nice)
  • Average over resolution
  • Offload some calculations to the GPU

Known issues

  • Sometimes the read gets misaligned and just becomes noise
  • When MPD is paused or the program is sleeping for the next frame, the UI doesn't update so you can't exit
  • The surface can't be transparent