I really love [cava](https://github.com/karlstav/cava). It provides a crude but pleasant frequency plot for your music: just the bare minimum to see leads solos and basslines.
I wanted to also be able to see waveforms, but to my knowledge nothing is available. There is some soundcard oscilloscope software available, but the graphical GUI is usually dated and breaks the magic.
I thus decided to solve this very critical issue with my own hands! And over a night of tinkering with pulseaudio (via [libpulse-simple-binding](https://crates.io/crates/libpulse-simple-binding)) and some TUI graphics (via [tui-rs](https://github.com/fdehau/tui-rs)),
the first version of `scope-tui` was developed, with very minimal settings given from command line, but a bonus vectorscope mode baked in.
The audio buffer size directly impacts resource usage, latency and refresh rate and its limits are given by the audio refresh rate. Larger buffers are slower but less resource intensive. A good starting value might be `8192`
While "scatter" mode is as precise as Pulseaudio and the terminal lets us be, "line" mode simply draws a straight line across points, meaning high frequencies don't get properly represented.
Latency is kept to a minimum thanks to small buffer and block sizes.
Sample rate can be freely specified but will ultimately be limited by source's actual sample rate.