Skip to main content

Module visual

Module visual 

Source
Expand description

Visual adapter: deterministic headless PNG rendering of a refrain.

The canvas is divided into time bands (one band per stage: territorialize / deterritorialize / reterritorialize). Each Hap is rendered as a horizontal colored rectangle starting at start * width and ending at end * width, on the band corresponding to its stage.

Color is derived from the Hap’s pitch or value via a small stable hash, mapped through a 24-color palette so that equal pitches across calls render to equal colors (golden-test stable).

Structs§

VisualAdapter