diff --git a/subwave_nowplaying.star b/subwave_nowplaying.star index f5e61e8..03cab5d 100644 --- a/subwave_nowplaying.star +++ b/subwave_nowplaying.star @@ -411,19 +411,24 @@ GLITCH_STATE_POOL = [ # render.Sequence doesn't loop on its own (see _glitch_scanlines below), so # to repeat the burst-then-pause pattern, the repeats have to be spelled # out as one long children list up front rather than relying on any -# runtime looping. +# runtime looping. That matters here: with GLITCH_ACTIVE_SECONDS shorter +# than the actual show_static window, the sequence simply ran out and +# stopped painting partway through -- jitter played once near the start +# of the window and then silently went quiet for the rest of it, while +# the scanlines/corner ticks (which aren't Sequence-based) kept going, +# making it look like jitter wasn't working at all once past that +# opening burst. # -# Deliberately *not* sized against the full show_static window (which can -# now be up to STATIC_OVERLAY_END_SECONDS = 22s): each repeat adds several -# more uniquely-tinted/shifted frames for WebP to encode, and scaling that -# up to cover 22s of jitter pushed a real render past the 460KB device -# limit (measured 481KB). Scanlines and corner ticks (see _glitch_effect) -# are cheap, constant per-pixel layers that can cover the full window for -# free, but the hue-shifted bands don't need to keep jittering the whole -# time to read as "something's happening" -- GLITCH_ACTIVE_SECONDS caps -# how much of the window actually gets jitter, independent of how long -# the window itself is. -GLITCH_ACTIVE_SECONDS = 6 +# An earlier version capped this well below the full show_static window +# (which can be up to STATIC_OVERLAY_END_SECONDS = 22s) because the +# hue-shifted RGB-split bands this used to also drive were expensive +# enough to push a real render past the 460KB device limit if sized +# against the full window (measured 481KB at the time). Those bands are +# gone now -- this only drives the base-art jitter, built on +# render.Sequence + _glitch_shift (Padding), which compresses far +# better: a real worst-case render at the *full* 22s now measures ~54KB. +# So this now covers the whole window instead of a short burst within it. +GLITCH_ACTIVE_SECONDS = STATIC_OVERLAY_END_SECONDS _GLITCH_CYCLE_TICKS = GLITCH_STATES_PER_CYCLE * GLITCH_HOLD_TICKS + GLITCH_PAUSE_TICKS _GLITCH_TICKS_PER_SECOND = 20 # 1000ms / 50ms-per-tick GLITCH_REPEATS = int(GLITCH_ACTIVE_SECONDS * _GLITCH_TICKS_PER_SECOND / _GLITCH_CYCLE_TICKS) + 1