Simple, fast and lightweight spectrum visualiser made in C. It is a successor of [vspectro][1] in terms of performance and features. It grabs audio from a input device, analyses it through a sliding [DFT][2] and renders a logarithmic frequency spectrum with linear magnitude which you can study or just vibe to.
# on debian (or debian based distributions)
$ apt install libsdl2-dev libfftw3-dev
$ emerge media-libs/libsdl2 sci-libs/fftw
$ pacman -S mingw-w64-SDL2 mingw-w64-fftw
On Windows it is less painful to install [MSYS2](https://www.msys2.org/) then compile it.
### Compilation
Clone/download the repository and chdir into it ofcourse, then:
$ meson builddir -Doptimization=s -Dvsp:default_library=static $ ninja -C builddir
It will produce an executable in `builddir`, which is the program.
## Usage
$ ./builddir/vsp --help Usage:
-h, --help show this help message and exit
Audio Options
-d, --device=
Display Options
--fg-color=
`--fg-color` and `--bg-color` is in the hex-color format (optionally prefixed with `#`).
`--list-devices` shows what devices are for capturing with their indices.
list of capture devices: [index] [name] 0 Mic in at front panel (Pink) (Realtek High Definition Audio) 1 Stereo Mix (Realtek High Definition Audio)
If to choose a specific device than default, pass the any of the indices with `-d`.
If passed index is not in that list, it falls back to default.
## Technical details
- No windowing function is applied on the incoming samples, spectral leakage might occur.
- Frequency spectrum starts at 20hZ.
[1]: https://github.com/tripulse/vspectro
[2]: https://en.wikipedia.org/wiki/Discrete_Fourier_transform