Listen to Music in Terminal with Spectrum

Written with C++ and the FTXUI library.

Listen to Music in Terminal with Spectrum

Spectrum is a console-based music player written in C++ and with the FTXUI library, that is, you will have a TUI environment to view graphically the frequency of each part of your song.


First of all you will need the following dependencies, example for Ubuntu:

sudo apt install build-essential libasound2-dev libavcodec-dev \
      libavfilter-dev libavformat-dev libfftw3-dev libswresample-dev

After that just clone the repository and compile:

git clone
cd spectrum
cmake -S . -B build

Once compiled, you can test it without installing by running the command: ./build/src/spectrum, but to install it on your system, run:

sudo cmake --install build

Once installed, you can remove the cloned directory: rm -rf spectrum/


To open Spectrum just run the command:

  • Navigate using the directional arrows in the Box on the left side of the screen to choose and play the song with [ENTER];
  • Also use the mouse (if you want) to click on options such as: equalizer, play, stop, advance or rewind the music time and among others;
  • To exit press q.


Spectrum Play

Click on the image to view it in a higher resolution

Spectrum Equalizer

Click on the image to view it in a higher resolution

We made a video about the FTXUI library which can be seen at the address below:

For more information about Spectrum visit the repository on GitHub.

cpp cppdaily tui terminal