PM_K-1 0.0.14 (fix): late-toggled Continue arms the seam too

If Continue was toggled on mid-segment, _prepare_next never ran during bar (bars-1)
and the seam stayed un-armed. Fall back to prep on the spot at the boundary itself.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Me Here 2026-05-30 07:12:00 -05:00
parent fd8446658d
commit 99174d1bf8
2 changed files with 5 additions and 3 deletions

View file

@ -820,9 +820,11 @@ class App:
self._prepare_next() self._prepare_next()
if self.bars and bar > 0 and bar % self.bars == 0: # segment boundary if self.bars and bar > 0 and bar % self.bars == 0: # segment boundary
self._seg_start = time.monotonic() # timer resets with the bar counter self._seg_start = time.monotonic() # timer resets with the bar counter
if self.continue_on and self._next_pending is not None: if self.continue_on:
self._seam_t = self.lanes[0]['next'] # the wall-clock time of THIS boundary step if self._next_pending is None: self._prepare_next() # late-toggled Continue: prep on the spot
self._advance = True # tick() will swap to the prepared track if self._next_pending is not None:
self._seam_t = self.lanes[0]['next'] # the wall-clock time of THIS boundary step
self._advance = True # tick() will swap to the prepared track
# Note: per-master-step continuous ramp handles the bpm reset implicitly (seg_bar wraps to 0) # Note: per-master-step continuous ramp handles the bpm reset implicitly (seg_bar wraps to 0)
t = self.trainer # gap trainer: silence during the rest bars t = self.trainer # gap trainer: silence during the rest bars
self._muted = bool(t and (t['play'] + t['mute']) and (bar % (t['play'] + t['mute'])) >= t['play']) self._muted = bool(t and (t['play'] + t['mute']) and (bar % (t['play'] + t['mute'])) >= t['play'])