LIGHT TIMING: the hold saves the set; what is under a cue includes the stem's lag

- After moving cues, the hold clicks File > Save Live Set in Live (System Events; osascript has
  Accessibility on the Tracks Mac), only when the set open in Live is the one checked
- "Under the cue" now looks from 10 ms before to 25 ms after it: a cue on a hit whose stem starts
  10-15 ms after the grid read as a quiet spot (Name Above All Names 737.1.1 was moved by mistake
  and has been put back)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-22 10:50:05 -04:00
co-authored by Claude Opus 5.5
parent 625d424bda
commit 11ac8aa8e0
4 changed files with 54 additions and 5 deletions
+15 -2
View File
@@ -495,11 +495,13 @@ class TestLightTiming(unittest.TestCase):
self.assertEqual([(b, n) for b, n, _ in moves], [(104, 30), (104, 36), (108, 31)])
self.assertEqual(moves[0][2], 103.75)
self.assertAlmostEqual(moves[2][2], 108 + 0.047 * 151 / 60, places=3)
rd.LAST["light"] = {"key": (al["set"], al["mtime"]), "summary": al["summary"], "off": off}
rd.LAST["light"] = {"key": (al["set"], al["mtime"]), "summary": al["summary"], "off": off, "live_set": "/elsewhere/261011.als"}
sent = []
def fake_remote(cfg, host, script, timeout=60):
sent.append(json.loads(script.split("P = json.loads(", 1)[1].split(")\n", 1)[0].strip()[1:-1]))
if "Save Live Set" in script:
return {"saved": True}
return {"done": [[b, n, 1] for b, n, _ in sent[-1]["moves"]]}
real = (rd.run_remote, rd.hand_back)
rd.run_remote, rd.hand_back = fake_remote, lambda cfg, host: None
@@ -508,9 +510,20 @@ class TestLightTiming(unittest.TestCase):
finally:
rd.run_remote, rd.hand_back = real
self.assertEqual(sent[0]["track"], "LIGHTING CUES")
# until the set is saved, the moved cues are not named again: the key asks for a save instead
# another set is open in Live: nothing is saved, and until the set is saved the key asks for a save
self.assertEqual(len(sent), 1)
line = rd.eval_light_timing(RC, al, hits)
self.assertEqual(msgs(line), ["SAVE SET (2 MOVED)"])
# this weekend's set open in Live: moved, then saved straight away
rd.MOVED.clear()
rd.LAST["light"]["live_set"] = al["set"]
rd.run_remote, rd.hand_back = fake_remote, lambda cfg, host: None
try:
self.assertTrue(rd.run_action(CONFIG, "light_timing"))
finally:
rd.run_remote, rd.hand_back = real
self.assertEqual(sent[-1], {"set": al["set"]})
compile(rd.SAVE_SCRIPT % json.dumps({"set": "/x.als"}), "remote", "exec")
def test_bars_as_live_shows_them(self):
self.assertEqual(rd.bar_of(1315.75), "329.4.4")