VizRenderState
Everything a drawing needs to know about this instant.
Two clocks live here on purpose. timeSeconds is the wall clock and never stops. musicTime only moves while there is something to listen to, so anything driven by it stands still in a silence instead of drifting on alone. stepSeconds is the frame's share of that: the seconds to move a camera or a path by, and zero while the player is paused or the audio is silent.
Constructors
Properties
Weight and attack are separate from section mood: a kick moves the picture NOW.
Seconds since the surface's previous step. Move particles by this, not by a fixed step. It is 0 when the surface draws the same step again, so no stretch of time is counted twice.
The analysed audio, already lined up with what is audible.
How much of the light the picture may give this frame, 0 to 1.
How much of the picture's own movement to keep, 0 to 1.
Seconds until the next onset that is already in the queue, or -1 when it is not known.
Seconds of audible time this frame, for anything that travels: deltaSeconds while there is something to hear, zero while the player is paused or the audio is silent. Springs and fades keep settling on deltaSeconds; a camera, a ground or a scrolling field moves by this.
Seconds since this visualiser started. Use it for anything that must never stop.
Functions
Continuous features seconds from now, or null when unavailable. For a future hit and its strength, use VizFuture.nextEvent; feature-window times are separate from event times.
How close the next onset is, 1 right on it and 0 further away than window.
The value that fraction of this frame's bars sit below.