LinuxCommandLibrary

cava

Visualize audio in terminal

TLDR

Start the visualizer

$ cava
copy

Use the specified configuration file
$ cava -p [path/to/file]
copy

Increase/Decrease sensitivity
$ [<ArrowUp>|<ArrowDown>]
copy

Increase/Decrease the number of bars
$ [<ArrowRight>|<ArrowLeft>]
copy

Reload the configuration file (this resets the number of bars and sensitivity)
$ <r>
copy

Reload colors from the configuration file
$ <c>
copy

Cycle the foreground/background color
$ [<f>|<b>]
copy

Quit
$ <q>
copy

SYNOPSIS

cava [options]
cava -p <path> | --config=<path>
cava -v | --version
cava -h | --help

Note: Most of cava's extensive customization is done via a configuration file, not command-line options.

PARAMETERS

-p <path>, --config=<path>
    Specifies an alternative configuration file path instead of the default (~/.config/cava/config).

-f, --fifo
    Forces CAVA to use FIFO (named pipe) input mode, overriding the configuration file setting.

-v, --version
    Displays the current version information of CAVA.

-h, --help
    Shows a brief help message with available command-line options.

DESCRIPTION

cava is a highly configurable, console-based audio spectrum analyzer designed for Linux. It visualizes real-time audio output directly in your terminal, providing a dynamic and aesthetically pleasing representation of sound frequencies. It supports various audio inputs, including PulseAudio, ALSA, JACK, sndio, and even a FIFO (named pipe) for more advanced setups. Users can customize nearly every aspect of its appearance, from the number of bars and their colors to the visualizer type (e.g., ASCII, blocks, or Unicode characters), resolution, and sensitivity. Its lightweight design makes it suitable for running in the background while playing music, providing a unique visual experience for audiophiles and terminal enthusiasts alike. cava stands out for its extensive configurability, primarily managed through a dedicated configuration file, allowing for deep personalization of the visualization.

CAVEATS

cava's performance and appearance can vary significantly depending on the terminal emulator used; some terminals may offer better rendering and lower latency. Proper configuration of audio input sources (e.g., PulseAudio loopback module or ALSA monitor) is essential for cava to receive audio data, which can sometimes be a hurdle for new users. While highly customizable, the sheer number of configuration options in its config file can be overwhelming initially. It's primarily a visualizer and not intended for precise audio analysis or recording.

CONFIGURATION FILE

cava is primarily configured through a text-based configuration file, typically located at ~/.config/cava/config or /etc/cava/config. This file allows users to define parameters such as input source, output method, color schemes, bar dimensions, frequency range, and responsiveness. Extensive documentation on available options is usually provided within the default configuration file or the project's GitHub page.

AUDIO INPUT SOURCES

cava supports a variety of audio input methods to capture sound for visualization. These include: PulseAudio (via a loopback module), ALSA (monitoring a sound card's output), JACK (a professional audio server), sndio (OpenBSD's audio system), and FIFO (a named pipe, allowing audio data from any source to be streamed into cava). Users must select and properly configure the appropriate input source based on their system's audio setup.

OUTPUT VISUALIZERS

cava offers different visualizer types to render the spectrum in the terminal. The primary modes include ASCII characters (using simple characters like #), block characters (filling terminal cells), and Unicode characters (using block elements for smoother rendering). The choice of visualizer, combined with customizable colors and bar styles, allows for a wide range of aesthetic outcomes.

HISTORY

cava was initiated by Karl Stav, with its first commits appearing on GitHub around 2016. It emerged as a response to the need for a modern, highly customizable, and resource-efficient audio spectrum analyzer that could run directly in the Linux terminal. Over the years, it has gained significant popularity within the Linux community due to its flexibility with various audio backends (PulseAudio, ALSA, JACK) and its extensive visual customization options. Its development has been community-driven, with contributions enhancing its features, stability, and compatibility across diverse system setups, solidifying its position as a go-to tool for real-time audio visualization in the console.

SEE ALSO

pavucontrol(1), alsamixer(1), mpv(1), ffplay(1), htop(1), btop(1)

Copied to clipboard