Modelled on BeSpec's LED mode. Bars are now shaded by height rather than drawn in one flat color, and a peak-hold marker rides above each column. Shading is a function of the row alone, so it stays cheap: the color is computed once per row and the row's cells still coalesce into a couple of spans. `gradient_color` ramps the configured base from 55% brightness at the floor to 30% toward white at the top, so a loud bar reads as hot and not merely tall. Only an `Rgb` base can be interpolated -- a color name or a palette index is a reference into the terminal's own theme, whose RGB value is not ours to know -- so those render flat, whatever `spectrum_gradient` says. The peaks are per-bin state advanced in `update_spectrum`: a bin at or above its peak raises it at once, otherwise the peak falls 0.03 a frame, about 1.7s from full scale at the server's 20 fps. The server keeps streaming zeroed frames while the audio is idle, so the markers fall away on pause instead of freezing on screen. A marker is drawn only in a row the bar does not reach: a cell holds one glyph, so one inside the bar's own top cell would eat the bar to repeat what its top edge already shows. Config gains `spectrum_gradient` (default true) and `spectrum_peak_color` (default the primary blue, `"none"`/`"off"` to draw none), resolved with `spectrum_color` into one `SpectrumStyle` in place of the old `set_spectrum_color`. Existing config files take the defaults. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.lock | ||
| Cargo.toml | ||
| build.rs | ||
| schema.graphql | ||