Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

cliamp-plugin-hal9000

A single glowing lens for cliamp: the eye opens on the beat, eases shut between hits, and breathes slowly when nothing is playing.

                         ▓▓██████▓▓
                     ▓████░░░▒▒░░░████▓
                   ▓██░▒▒░░░▒▒▒▒░░░▒▒░██▓
                 ▓██░▒░░▒▓▓▓▓██▓▓▓▓▒░░▒░██▓
                ▓██░▒░▒▓▓███▓▓▓▓███▓▓▒░▒░██▓
                ██░▒░▒▓██▓▓██████▓▓██▓▒░▒░██
               ▓██▒░▒▓██▓▓█▓▓██▓▓██▓██▓▒░▒██▓
               ▓█░▒░▒▓██▓██▓████▓██▓██▓▒░▒░█▓
               ▓██▒░▒▓██▓██▓▓██▓▓█▓▓██▓▒░▒██▓
                ██░▒░▒▓██▓▓█████▓▓▓██▓▒░▒░██
                ▓██░▒░▒▓▓███▓▓▓▓███▓▓▒░▒░██▓
                 ▓██░▒░░▒▓▓▓▓▓█▓▓▓▒▒░░▒░██▓
                   ▓██░▒▒░░░░▒▒▒░░▒▒▒░██▓
                     ▓████░░░▒▒░░░████▓
                         ▓▓██████▓▓

One frame on a beat, colour stripped; in the terminal the core is white-hot and the ramp runs out through your theme's bright red and red to the rim.

Install

cliamp plugins install Devis99/cliamp-plugin-hal9000
cliamp plugins trust hal9000

Restart cliamp (plugins load at startup), then:

cliamp vis HAL9000

What it does

Follows your terminal theme. Only the basic ANSI 16 colours are used — no 256-colour or truecolor escapes — so the eye is repainted by whatever palette your terminal is running. The gradient steps that a 5-colour palette would lose come back from the block shades █ ▓ ▒ ░.

Reacts to beats, not to volume. Driving the iris straight from the audio level pins it wide open for the whole of a loud track, so the only visible motion is the eye shutting whenever the music dips. Instead the plugin keeps a running loudness average over the last ~1.4 seconds; what moves the iris is how far the current frame sits above that average. Steady playback settles into mid-position with room to open, and each hit punches out from there. Overall loudness still contributes, at 30% weight, so a quiet passage does not look the same as a loud one.

Fast attack, slow release. The iris jumps open instantly and falls back at a fixed rate per second, so beats read as separate pulses rather than smearing together. Bass gets its own term, flaring the white-hot core on kicks.

Fits the panel it is given. cliamp's normal player view hands a visualizer five rows across the full width, which leaves a single round lens marooned in empty space. On a panel wider than the lens can fill, the eye takes the full height — the housing ring is dropped, it costs rows there are none of — and more lenses recede either side of it, each one smaller, dimmer, and a few frames behind the last, so a beat travels outwards along the row. There are at most six a side and they sit at fixed distances from the eye, so widening the window grows the margins instead of breeding more of them. Full screen is already all lens, so none of them fit there and that view is left alone.

                      ▄▄▄   ▄░▒▒░▄         ▄░▒█▓▓█▒░▄         ▄░▒▒░▄   ▄▄▄
               ░░     ░▓░   ░▓▓▓▓░         ▒▒▓████▓▒▒         ░▓▓▓▓░   ░▓░     ░░
                      ▀▀▀   ▀░▒▒░▀         ▀░▒█▓▓█▒░▀         ▀░▒▒░▀   ▀▀▀

Drawn in half cells. Each row is sampled twice, so the rim can land on a half-block ▀ ▄ instead of jumping a whole row. The lens reads round at five rows tall, where a whole-cell circle reads as a blob.

Idle breath. After 20 silent frames the eye drops into a slow 4-second breathing cycle. It is paced in real seconds rather than frames, so cliamp throttling its idle framerate cannot slow the breath down.

Tuning

All the constants live in one block at the top of hal9000.lua. The two worth reaching for first:

Setting Default Effect
BEAT_RANGE 0.55 How far above the running average counts as a full-open beat. Lower = smaller beats open the eye fully = stronger pulsing.
BEAT_WEIGHT 0.70 Share of the iris driven by beats vs. overall loudness. Higher = more punch, less level.

Others: RELEASE (how fast the eye shuts), IRIS_BASE / IRIS_GAIN (closed and open size), SHIMMER (per-band wobble of the rim), BASS_FLARE (core flash on kicks), BREATH_SECS (idle pace), BEZEL_WIDTH (housing thickness).

Editing the file changes its hash, so cliamp disables it until you approve it again:

cliamp plugins trust hal9000

Tests

lua5.4 test_hal9000.lua

Checks grid geometry at several terminal sizes, that no 256-colour escapes creep back in, both "Expand Window" bailouts, the idle transition, and that a beat opens the iris measurably wider than steady playback does.

License

MIT — see LICENSE.

HAL 9000 is from 2001: A Space Odyssey; this is an unaffiliated homage in terminal cells. No assets from the film are used or included.

About

Beat-reactive HAL 9000 lens visualizer for cliamp, painted in your terminal's own theme colours

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages