# Cava: ten years of trying to make a spectrum analyser look good in a terminal

> A C program that reads audio through whichever backend your system has, runs it through FFTW, and draws bars with SDL or ncurses.

**karlstav/cava** — Cross-platform Audio Visualizer

- Repository: https://github.com/karlstav/cava
- Stars: 6,474 · Forks: 299
- Language: C
- License: MIT
- Published: 2026-10-07 · Updated: 2026-10-07 · Language: en
- Canonical page: https://hysenlabs.com/projects/karlstav-cava

## A spectrum analyser, and an honest disclaimer about it

The README describes cava as a bar spectrum audio visualizer for terminal or desktop using SDL. The name expands to Cross-platform Audio Visualizer, and the author is Karl Stavestrand.

What it is not is stated just as plainly: this program is not intended for scientific use. It is written to look responsive and aesthetic when visualizing music. That sentence matters more than it first appears, because it sets expectations about accuracy. A tool that prioritises how bars look will make choices an FFT tool used for measurement would not.

The platforms listed are Linux, FreeBSD, macOS and Windows, and the repository topics back that up, naming ALSA, Pulseaudio, Pipewire, Portaudio, sndio, SDL2, ncurses and OpenGL shaders.

There is also a demo video linked from the README, plus a screenshot and a link to documentation for dumb terminals, which is the project name for terminals with no graphics capability at all.

## The audio backend you get depends on your system

This is the part that makes cava portable, and it is the part that makes building it harder. The README documents capture methods for Pipewire, Pulseaudio, ALSA, MPD, sndio, OSS, JACK, squeezelite, macOS and Windows.

Pipewire is the default input method where supported, with the default source set to `auto`, which will usually be your currently selected output. Under WirePlumber you can use `wpctl` to find the object path or serial of a specific device. The config file is where the method is chosen:

```bash
method = pipewire
```

On macOS, Core Audio is built in and needs no extra capture library, which is why the build requirements section singles that case out.

A useful note in the build docs: only FFTW, iniparser and the build tools are strictly required, but that minimum only gives you the ability to read from fifo files. Capturing audio directly needs development files for whichever backend you actually use.

## Build dependencies and distro packages

Required components are FFTW, libtool, automake, pkgconf, build essentials and iniparser. Recommended are the development libraries for one audio framework, and optionally SDL2 dev files for the desktop renderer, autoconf-archive for OpenGL, and ncursesw for the terminal fallback.

Each supported distro gets its own package line in the README, from `pacman -S cava` on Arch to `sudo apt install cava` on Debian 12 and Ubuntu 20.10 or newer, `dnf install cava` on Fedora 26 and later, `zypper in cava` on openSUSE Tumbleweed, `pkg install cava` on FreeBSD, and `brew install cava` on macOS.

Building from source is the usual autotools sequence:

```bash
./autogen.sh
./configure
make
```

Individual features can be disabled at configure time, which matters if you are cross-compiling. CMake is available, and is the documented path on Windows through vcpkg, but autoconf and automake remain the default supported build system.

## Cavacore, raw output and the SDL renderer

The repository separates the visualizer from the visualizer. `cavacore.c` and `cavacore.h` hold the audio processing, documented separately in `CAVACORE.md`, and there is a `cavacore_test.c` alongside `run_all_tests.sh`. `input/` and `output/` are the backend directories. There is also a raw output mode for driving cava from another application, and a `cava.psf` PlayStation visualizer file that suggests one consumer of that API.

Output options are more than one. The default is SDL, and 1.0.0's notes mention GLSL shader work including a gain option, added Orion circle shaders in both static and rotating forms, and hardening long-run timing. `SHADERS.md` documents the shader set. ncurses is the alternative when the default output has problems, and `TERMINAL.md` covers the no-graphics case.

The author notes in the 1.0.0 release that cavacore is the only real API, that it has not changed in years, and that he is not sure anyone else is using it. That candour is useful: it is an invitation, not a promise.

## Ten years, then a version number

The 1.0.0 release on 2026-06-13 is mostly a statement about maintenance rather than a feature drop. The release note says development has slowed, that the project has been in development for over ten years, and that the author could have released 1.0.0 long ago but did not feel it was needed.

What shipped alongside the version bump: the shader additions, the SDL gain option, WiX installer support for Windows, a vcpkg migration and static linking on Windows, smoothing tied to elapsed sample count in the core, and the ability to define the input device on Windows.

The 0.10.7 release in January 2026 brought live config auto-reload, various Pipewire fixes from two contributors, Windows device fixes, and improved memory handling during config reloading. 0.10.6 in September 2025 added mingw toolchain support on Windows, theme files, horizontal gradients, dumb terminal support, and handling for default device changes on Windows.

The repository was pushed to on 2026-09-21, with 18 open issues and 298 forks. The license is MIT.

## Conclusion

Cava is the rare tool that got better for a decade without changing its shape. Version 1.0.0 in June 2026 is mostly a declaration of stability rather than a rewrite, and the author says so, noting that development had slowed and the cavacore API had not changed in years. What you get is a program with a dozen capture backends, an SDL renderer with GLSL shaders, a terminal fallback for machines with no graphics stack, and a library other programs can link against. Install it from your distribution package rather than source, because the build requirements are real. Then read the config file rather than the defaults: nearly every visual property, from bar count to smoothing to colour gradient, lives there and reloads live.

## FAQ

### What is cava in Linux?

Cava is a bar spectrum audio visualizer written in C that runs in a terminal or in an SDL window. It runs on Linux, FreeBSD, macOS and Windows, captures audio through whichever backend your system provides such as Pipewire, Pulseaudio or ALSA, and is packaged in most major distributions.

### How does Cava work in Linux?

It reads audio from a configured capture backend, runs the samples through an FFT using FFTW, and maps frequency bins onto bars. The capture method is chosen in the config file, with Pipewire as the default where it is supported and a default source of auto, which normally follows your current output device.

### Which audio backends does cava support?

The README documents capture methods for Pipewire, Pulseaudio, ALSA, MPD, sndio, OSS, JACK, squeezelite, macOS Core Audio and Windows. Only FFTW, iniparser and build tools are strictly required to compile, but that minimum only reads from fifo files rather than capturing live audio.

### Does cava need a graphical environment?

No. SDL is the default output, but ncurses is available as an alternative when the default has problems, and the project documents support for dumb terminals with no graphics capability at all. Shaders documented in SHADERS.md apply to the SDL renderer.

## Sources

- [Issues](https://github.com/karlstav/cava/issues)
- [karlstav/cava on GitHub](https://github.com/karlstav/cava)
- [License: MIT](https://github.com/karlstav/cava/blob/master/LICENSE)
- [README](https://github.com/karlstav/cava/blob/master/README.md)
- [Releases](https://github.com/karlstav/cava/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/karlstav-cava
