diff --git a/subwave_nowplaying.star b/subwave_nowplaying.star index ca4bb6e..3f1240e 100644 --- a/subwave_nowplaying.star +++ b/subwave_nowplaying.star @@ -591,12 +591,25 @@ GLITCH_STATE_POOL = [ # (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 +# against the full window (measured 481KB at the time). Those bands were +# dropped for a while (jitter alone, measured ~54KB worst-case at the +# full 22s) and this was widened to match -- but the bands have since +# come back (see GLITCH_STATE_POOL above), and worst-case payload tracks +# the *album art's own complexity*, not just whether bands are on: a +# busy/high-entropy cover compresses far worse than typical art, since +# every jitter/band/hue-shift state built from it ends up genuinely +# distinct rather than mostly redundant. Measured against synthetic +# noise art at the full 22s + strong zoom + random position: 354KB, +# uncomfortably close to the Gen1 460KB limit for art this adversarial. +# +# Capped at 18s (not the full 22) as a deliberate safety margin against +# that -- shorter than the max show_static window, so jitter/bands (and +# the scanline sweep, which shares this duration -- see +# SCANLINE_SWEEP_DURATION below) go static for the last few seconds of +# an "ending" window on a very long remaining-time case, the same +# tradeoff this was widened past once already, just re-accepted on +# purpose this time for the payload margin. +GLITCH_ACTIVE_SECONDS = 18 _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