Skip to content

About

Real-time TrueColor terminal audio spectrum visualizer & CAVA suite for KimSystem

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📊 KimSystem Visualizer & CAVA Audio Suite

An ultra-responsive, zero-latency bar spectrum audio visualizer engineered specifically for KimSystem (Arch Linux running on Android PRoot).

Includes both a standalone pure terminal audio visualizer (kimsystem-visualizer) and a native CAVA integration preconfigured for KimSystem's PulseAudio monitor subsystem.


🌟 Overview

Standard terminal visualizers rely on direct Linux /dev/snd ALSA devices, which do not exist inside Android containers due to SELinux restrictions.

KimSystem Visualizer bridges this gap by directly tapping into KimSystem's dual-tier audio architecture:

  1. PulseAudio Monitor Sink (kimsystem_sink.monitor): Visualizes live audio rendered by any Linux audio application.
  2. Real-Time PCM Engine (127.0.0.1:48293): Simultaneously streams audio to the phone's hardware speakers while computing real-time FFT spectrum bars in the terminal.
  3. Piped PCM Stdin: Visualizes raw audio piped directly from tools like ffmpeg or sox.

🚀 Features

  • 8-Level Sub-Character Unicode Blocks: Smooth vertical resolution using ▁, ▂, ▃, ▄, ▅, ▆, ▇, █.
  • Peak Hold with Gravitational Falloff: Accurate physics simulation with peak hold dots/bars (▔) and customizable decay.
  • 8 TrueColor 24-Bit Gradient Themes:
    • kimsystem (Default): Signature Arch Navy (#0e3a6c) → Arch Blue (#1793d1) → Electric Cyan (#00f0ff) → Android Green (#3ddc84) → Cyber Lime (#76ff03)
    • cyberpunk: Neon Cyan → Electric Violet → Hot Pink
    • matrix: Forest Green → Cyber Lime
    • sunset: Deep Purple → Amber Orange → Golden Yellow
    • fire: Crimson Red → Flame Orange → Golden Amber
    • rainbow: Horizontal chromatic rainbow spectrum
    • cava: Classic CAVA Deep Blue → Cyan
    • monokai: Charcoal → Acid Green → Vivid Orange → Fuchsia
  • Logarithmic Frequency Perception: Maps 20 Hz – 20,000 Hz according to the human ear's hearing curve (sub-bass, bass, mids, treble).
  • Multiple Audio Sources:
    • --pulse: Captures live system audio via PulseAudio monitor.
    • --play <file>: Plays audio to phone speakers while visualizing in real-time.
    • --yt <query>: Searches YouTube, streams audio to phone speakers, and displays live visualizer bars.
    • --demo: Interactive synthesized polyphonic EDM/electronic music generator.
    • --stdin: Reads raw S16LE PCM stream from stdin.
    • --cava: Launches the official CAVA binary using the tailored KimSystem profile.
  • Interactive Runtime Controls: Adjust sensitivity, switch themes, toggle peaks, or mute speaker on the fly.
  • Auto Terminal Resize: Automatically adapts bar counts and height on window resize (SIGWINCH).

⌨️ Interactive Keybindings

Key Action
q / ESC / Ctrl+C Quit and cleanly restore terminal cursor
c Cycle color theme
↑ / + Increase sensitivity
↓ / - Decrease sensitivity
→ Increase number of bars
← Decrease number of bars
r Reset bar count to screen auto-fit
p Toggle peak indicators
m Mute / unmute speaker playback
h Toggle HUD header / FPS counter

📦 Installation & Setup

To install locally:

cd /Projects/linux/kimsystem-visualizer
./install.sh

To uninstall:

cd /Projects/linux/kimsystem-visualizer
./uninstall.sh

🎧 Usage Examples

1. Interactive Demo Mode (No Audio File Needed)

Test your terminal colors and visualizer physics with procedural electronic music:

kimsystem-visualizer --demo

(Tip: Press m to mute or unmute audio to the phone speaker, or pass --no-speaker to run silent).

2. Stream from YouTube with Live Visualizer

Search YouTube and stream music directly to your phone's speakers with live visualizer bars:

kimsystem-visualizer --yt "daft punk get lucky"

3. Play Local Audio File with Live Visualizer

kimsystem-visualizer --play ~/Music/song.mp3

4. Capture Live PulseAudio Output

Visualize any background audio currently playing through PulseAudio:

kimsystem-visualizer --pulse

5. Pipe Audio from FFmpeg

ffmpeg -re -i myvideo.mp4 -f s16le -ar 48000 -ac 2 - | kimsystem-visualizer --stdin

6. Official CAVA

Launch vanilla CAVA using the pre-tuned KimSystem configuration (~/.config/cava/config):

cava
# or
cava-kimsystem

📁 Repository Structure

kimsystem-visualizer/
├── bin/
│   └── kimsystem-visualizer   # Main executable visualizer CLI
├── config/
│   └── cava.conf              # Tuned CAVA configuration for KimSystem
├── scripts/
│   └── cava-kimsystem.sh      # Launcher script for native CAVA
├── install.sh                 # Complete installer
├── uninstall.sh               # Clean uninstaller
├── README.md                  # Documentation
└── LICENSE                    # MIT License

📄 License

This project is licensed under the MIT License.

About

Real-time TrueColor terminal audio spectrum visualizer & CAVA suite for KimSystem

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages