From 4983e81a240b7f9c052d763d636b509e4700cf12 Mon Sep 17 00:00:00 2001 From: jim kolpack Date: Fri, 9 Oct 2026 15:18:19 -0400 Subject: [PATCH] Disable RGB-split bands, re-enable scanlines, fix base jitter cancelling out Commented out the two _glitch_band calls per request (RGB-split bands off), re-enabled _glitch_scanlines. Also found and fixed a real bug in the base jitter: base_shift was derived by averaging each state's shift1/shift2 values, but several GLITCH_STATE_POOL entries have those nearly or exactly cancel out (e.g. -2 and 2 average to 0), silently zeroing out the jitter in about half the burst states -- likely why it wasn't visible. Now alternates a fixed +1/-1 by position in the sequence instead, so it's never zero. --- subwave_nowplaying.star | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/subwave_nowplaying.star b/subwave_nowplaying.star index c15b657..8742038 100644 --- a/subwave_nowplaying.star +++ b/subwave_nowplaying.star @@ -478,18 +478,23 @@ def _glitch_jitter(zoom): pause = _glitch_hold(render.Box(width = ART_SLOT, height = ART_SLOT), GLITCH_PAUSE_TICKS) sequence = [] + state_index = 0 for cycle_index in range(GLITCH_REPEATS): for top1, h1, shift1, hue1, top2, h2, shift2, hue2 in _glitch_states_for_cycle(cycle_index): # The art itself nudges along with the bands, not just the - # bands moving over a static image. Capped to +-1px (rather - # than splitting the difference between the two bands' own, - # larger shift values) -- a full-frame shift reads very - # differently than a thin band shifting, so it stays subtle. - base_shift = max(-1, min(1, int((shift1 + shift2) / 2.0))) + # bands moving over a static image. Capped to +-1px -- a + # full-frame shift reads very differently than a thin band + # shifting, so it stays subtle. Alternates +1/-1 by position + # in the sequence rather than deriving from shift1/shift2: + # several pool entries have those nearly or exactly + # cancel out (e.g. -2 and 2), which silently zeroed out the + # jitter in about half the states. + base_shift = 1 if state_index % 2 == 0 else -1 + state_index += 1 state = render.Stack(children = [ _glitch_base_jitter(zoom, base_shift), - _glitch_band(zoom, top1, h1, shift1, hue1), - _glitch_band(zoom, top2, h2, shift2, hue2), + # _glitch_band(zoom, top1, h1, shift1, hue1), + # _glitch_band(zoom, top2, h2, shift2, hue2), ]) sequence.append(_glitch_hold(state, GLITCH_HOLD_TICKS)) sequence.append(pause) @@ -560,7 +565,7 @@ def _glitch_effect(zoom): height = ART_SLOT, child = render.Stack(children = [ _glitch_jitter(zoom), - # _glitch_scanlines(), # disabled -- was making the jitter hard to see + _glitch_scanlines(), _glitch_corner_ticks("#00000080"), ]), )