Expand description
The waterfall system: the recent spectrum laid out as a landscape and seen through the shared perspective camera (ADR-0258).
§One frame
update reduces the analysis frame’s band array to elements levels, shapes
and eases each one through the same helpers the spectrum readout uses
(downsample, shape_and_ease), and hands the eased levels to the
Landscape. That keeps a ring of past rows and pushes one every
row_period seconds of injected dt, so the rows are spaced in time,
not in frames, and the landscape scrolls at the same speed at any display
rate (ADR-0019).
render lays the rows out on the ground plane: row k of the ring sits at
depth (k + frac) * row_spacing behind the front edge, where frac is the
fraction of a period since the last push, so every row slides back
continuously and a push moves nothing. Each row is a polyline of
elements - 1 segments across the frequency axis, height * level tall,
clipped and culled through the camera block and drawn by this scene’s own
seg3d renderer.
§The front edge is live
The nearest row is the live eased level, drawn at depth 0 every frame,
not the last pushed row: the front edge answers the music on the frame it
arrives, however long row_period is. A pushed row is born on top of it and
fades in over its first period as it slides away (alpha = frac), so a push
adds no line at once and the front edge never pops. The oldest row fades out
over its last period the same way.
§Colour
The palette runs along the frequency axis, as on spectrum (ADR-0059):
hue places the lowest band and hue_spread says how far the palette
travels to the highest. Age dims a row by fade: the farthest row keeps
1 - fade of the front edge’s light.
§Solid
When the camera block’s solid is on, every row segment also lays a
skirt under itself: a black band down to the ground plane, drawn through
the same seg3d pipeline and sorted with its row by where the row stands,
so a near row hides what lies behind it — hidden-line removal for a
ridgeline (ADR-0263). A skirted row costs twice the segments, and the rows
drawn are held to that cost each solid frame, announced as the load-time
row clamp is.
Structs§
- Waterfall
Config - The
[waterfall]table, validated (ADR-0180 rule 1). - Waterfall
Scene - The waterfall scene: the landscape’s rows and the
seg3drenderer they are drawn through.
Constants§
- DEFAULT_
ELEMENTS - The bands across a row a preset that names none draws.
- DEFAULT_
ROWS - The rows a preset that names none draws.
- DEFAULT_
ROW_ PERIOD - The
row_perioda preset that names none pushes at, in seconds. - MAX_
ROWS - The most rows a preset may ask for at load, before the tier’s
seg3d_segmentsholds it further. - MAX_
ROW_ PERIOD - The longest
row_perioda preset may ask for, in seconds. - MIN_
ROWS - The fewest rows a landscape may ask for: the live front row and one pushed row behind it.
- MIN_
ROW_ PERIOD - The shortest
row_perioda preset may ask for, in seconds. Below a frame at 100 Hz every frame would push more than one copy of the same row. - PARAMS
- Parameter vocabulary — see
fragment_field::PARAMS. Keep in sync withset_parambelow.