Commit 5875bf42 by PLN (Algolia)

midiviz: /dirt/play is the wire truth; the wordmark measures its own ink

The HL feed's root cause, captured off the wire: Tidal 1.9 addresses its
superdirtShape packets /dirt/play, not /play — a decoder that accepted only
the documented address dropped every real packet while every synthetic test
passed. Also: the first-trigger log could die on a non-trigger datagram
(UnboundLocalError) and take the whole feed thread silently; the feed now
survives anything. The wordmark bakes generously, scans its own ink and
crops — font metrics ignored the letter spacing and cut the tail to
PARVAGU; pixels do not lie. Single instance by flock (exit 78, no restart
storm); the tray launches midiviz via systemctl --user start, per PLN; the
2x column experiment is retired to a uniform grid — 'a C1 move overlapping
C2 is bad taste'.
parent 813c3962
......@@ -660,6 +660,25 @@ def launch(key):
if key == "ardour":
_sweep_stale_pending(spec)
# PLN, 2026-09-24: "ensure parvagues tray item launches via systemctl
# --user start midiviz indeed, not via raw launch, for this is how i
# launch". A unit-owned process gets the journal, the restart policy and
# the converger's idea of the truth; a raw Popen gets none of them — and
# then LOOKS dead to everything that asks the unit, which is how a lens
# ran unsupervised for nine hours while midiviz.service read inactive.
# Only specs that OPT IN with a "unit" key route here.
unit = spec.get("unit")
if unit:
_clear_latch(spec)
r = subprocess.run(["systemctl", "--user", "start", f"{unit}.service"],
capture_output=True, text=True)
if r.returncode == 0:
_log(f"{key}: started via systemctl --user start {unit}")
return {"ok": True, "status": "launched",
"msg": f"started {spec['name']} (unit {unit})"}
_log(f"{key}: systemctl start {unit} failed: {r.stderr.strip()}")
return {"ok": False, "status": "error",
"msg": r.stderr.strip() or f"systemctl --user start {unit} failed"}
argv = _argv(spec)
if not argv:
return {"ok": False, "status": "no-terminal", "msg": "no terminal emulator found"}
......
......@@ -114,8 +114,13 @@ def decode_osc(data: bytes) -> list[dict]:
def play_orbit(msg: dict) -> int | None:
"""A decoded message → its 1-based orbit number, or None if not a trigger."""
if msg["addr"] != "/play":
"""A decoded message → its 1-based orbit number, or None if not a trigger.
Tidal 1.9's superdirtShape addresses its messages `/dirt/play`, not
`/play` — captured off the wire on this rig — and a decoder that only
accepted the documentation's address silently dropped every real packet
while every synthetic test passed. Accept both spellings."""
if msg["addr"] not in ("/play", "/dirt/play"):
return None
o = msg["args"].get("orbit")
if isinstance(o, float) and o == int(o):
......@@ -175,6 +180,7 @@ class HLFeed:
msgs = decode_osc(data)
except (ValueError, struct.error, IndexError):
continue
first = False
for msg in msgs:
o = play_orbit(msg)
if o is None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment