PM_K-1 0.0.22: cleanup -- delete the dead _step_dur fallback
By 0.0.20 every site that needed step duration had switched to L['durs'][step] (the precomputed tuple from _rebuild_dur). _step_dur was kept as a "legacy fallback" with a comment claiming it was still used by the tap-tempo path -- which was wrong; grep showed zero callers. Ten lines of unreachable code. Now that 0.0.21 is sounding clean on the Pico 2, time to trim the sediment. No behavior change; .mpy shrinks slightly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
47fa6d7ce7
commit
8726f42d05
1 changed files with 1 additions and 11 deletions
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
import board, busio, digitalio, analogio, pwmio, displayio, vectorio, time, json, gc, os, supervisor
|
||||
supervisor.runtime.autoreload = False # we write our own files (log + pushed programs); never self-restart
|
||||
APP_VERSION = "0.0.21" # firmware version (the A/B updater pushes/compares this)
|
||||
APP_VERSION = "0.0.22" # firmware version (the A/B updater pushes/compares this)
|
||||
try:
|
||||
import rtc # set from the editor's clock SysEx so the log has real timestamps
|
||||
except ImportError:
|
||||
|
|
@ -962,16 +962,6 @@ class App:
|
|||
with open("/settings.json", "w") as f: json.dump(d, f)
|
||||
except OSError: self.can_write = False
|
||||
|
||||
def _step_dur(self, L, step): # legacy fallback (still used by _start_play tap-tempo path)
|
||||
beat = self._beat_ns
|
||||
if L['poly']:
|
||||
m = self.lanes[0]; master_bar = beat * (m['steps'] // m['sub'])
|
||||
return master_bar // L['steps']
|
||||
sub = L['sub']
|
||||
if L['swing'] and sub % 2 == 0:
|
||||
pair = beat // (sub // 2)
|
||||
return (pair * 2) // 3 if (step % sub) % 2 == 0 else pair // 3
|
||||
return beat // sub
|
||||
def _rebuild_dur(self, L): # cache the per-step ns durations into L['durs'] (tuple lookup is ~10us)
|
||||
beat = self._beat_ns
|
||||
sub = max(1, L['sub']); steps = max(1, L['steps'])
|
||||
|
|
|
|||
Loading…
Reference in a new issue