diff --git a/README.md b/README.md index 0a2fad1..e374051 100644 --- a/README.md +++ b/README.md @@ -3,17 +3,7 @@ The most featureful termiminal audio visualizer I'm aware of. `vizzzz` is a responsive terminal spectrum visualizer written in Rust with -ratatui. It listens to audio already playing on the host; it never plays or -generates audio itself. - -The default presentation follows After Effects' Audio Spectrum effect: a -centered path, Side A & B response, dense Analog Lines, hue interpolation, and -a soft secondary glow. `--display analog-dots` and `--display digital` match -AE's other display options; the original meter remains as `--display bars`. -Its spectral preset uses 64 linearly spaced, non-overlapping max-peak bands from -20 Hz to 2 kHz so individual tones create the distinctive isolated spikes seen -in AE. Use `--frequency-scale log --detector rms` for the smoother conventional -analyzer response. +ratatui. On macOS and Windows, the default source is the main system output through ScreenCaptureKit or WASAPI loopback. On other platforms, and with @@ -361,40 +351,3 @@ cargo run --release -- \ system output. - Bluetooth headset microphone profiles often run at 16 kHz. Use system output or a higher-rate interface for a full-width music spectrum. - -## Performance - -The realtime capture callback processes host-delivered chunks through fixed -4096-frame scratch storage and a wait-free SPSC ring; it does not wait for 4096 -frames to accumulate. The queue is capped at 4096 frames (85 ms at 48 kHz), and -the UI drains it completely each frame, preventing an extended terminal stall -from accumulating an unbounded stale-audio backlog. FFT scratch, sample history, -band maps, harmonic routes, phase history, temporal envelopes, adaptive -references, classification layers, and effect workspaces are all allocated -during startup or a band-count change. Ripple events, tempo history, and phase -scope samples use fixed-size arrays. A regression test verifies that 100 -maximal steady-state DSP updates perform zero allocations. - -Criterion results on this host's Apple M4 Pro: - -| Pipeline | Time | -| --- | ---: | -| 4096 FFT, 64 peak bands | 7.46 us | -| Maximal spectral effect and analysis stack | 10.55 us | -| Stereo pair, two complete FFT pipelines | 15.67 us | -| 512-sample lock-free transfer | 44 ns | -| RustFFT NEON 4096 FFT | 6.64 us | -| RustFFT scalar 4096 FFT | 15.67 us | -| 120x40 analog-lines render | 111.1 us | -| 120x40 advanced Braille circle render | 149.7 us | -| 120x40 waterfall render | 54.0 us | - -RustFFT runtime-selects AVX/FMA on supported x86-64 hosts and NEON on AArch64. -AVX cannot execute on this Apple ARM host; the measured NEON implementation is -2.4x faster than scalar. Even the maximal DSP plus the slowest measured render -uses under 1.0% of a 16.67 ms frame at 60 FPS; terminal transport and emulator -refresh then dominate. Reproduce the benchmark suite with: - -```sh -cargo bench --bench spectrum -- --noplot -```