Add a gig show: the test show sending Art-Net to the rig.

shows/gig.qxw is shows/test.qxw with its one output changed from 127.0.0.1
to the Art-Net node at 192.168.1.175, sent from the laptop's gig address
192.168.1.143 as cabaret.qxw does (scripts/shows/make_gig.py; run it again
after changing the test show). The test show stays on the simulator.
draw_test_pads.py takes a show's name, and shows/gig-pads.png is its pad
layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-10-23 15:45:51 +13:00
1 parent 873502b3ca
commit 72425159b5
4 files changed
+4208 -7

No files matched your search

+9 -7
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""Draw the SMC-PAD layout for shows/test.qxw as shows/test-pads.png.
"""Draw the SMC-PAD layout for shows/test.qxw as shows/test-pads.png, or another show's.
Every label and colour comes from the show's virtual console: a pad shows the
caption of the button on its note, and a colour pad that button's colour, so
@@ -16,7 +16,8 @@ Each title says how to get there: the pad's PAD BANK and KNOB BANK buttons pick
the banks, Pause (CC 28) latches bank 1 onto the movers, and Play held moves
bank 2 to Colour 2.
python3 scripts/shows/draw_test_pads.py
python3 scripts/shows/draw_test_pads.py # shows/test.qxw -> shows/test-pads.png
python3 scripts/shows/draw_test_pads.py gig # shows/gig.qxw -> shows/gig-pads.png
It needs Inkscape to turn the drawing into a PNG.
"""
@@ -26,13 +27,12 @@ from __future__ import annotations
import html
import re
import subprocess
import sys
import tempfile
from pathlib import Path
from mover_bank import NOTE_BASE, ROOT
SHOW = ROOT / "shows" / "test.qxw"
OUT = ROOT / "shows" / "test-pads.png"
BG, PANEL, TEXT, MUTED, EDGE = "#1a1a1c", "#232327", "#f2f2f2", "#9a9aa4", "#3a3a42"
PAD_W, PAD_H, GAP = 150, 90, 10
@@ -149,7 +149,9 @@ def knob_bank(x: int, y: int, bank: int, info: dict[int, list[str]]) -> str:
def main() -> None:
vc = SHOW.read_text().split("<VirtualConsole>")[1]
name = sys.argv[1] if len(sys.argv) > 1 else "test"
show, out = ROOT / "shows" / f"{name}.qxw", ROOT / "shows" / f"{name}-pads.png"
vc = show.read_text().split("<VirtualConsole>")[1]
info, knob_info = buttons(vc), knobs(vc)
panel_w = 4 * PAD_W + 3 * GAP
col2, col3 = 60 + panel_w + 70, 60 + 2 * (panel_w + 70)
@@ -177,9 +179,9 @@ text {{ font-family: "DejaVu Sans", sans-serif; fill: {TEXT}; }}
with tempfile.TemporaryDirectory() as tmp:
src = Path(tmp) / "test-pads.svg"
src.write_text(svg)
subprocess.run(["inkscape", str(src), "--export-type=png", f"--export-filename={OUT}", "--export-dpi=96"],
subprocess.run(["inkscape", str(src), "--export-type=png", f"--export-filename={out}", "--export-dpi=96"],
check=True, capture_output=True)
print(f"Drew {OUT.relative_to(ROOT)} ({width}x{height})")
print(f"Drew {out.relative_to(ROOT)} ({width}x{height})")
if __name__ == "__main__":
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env python3
"""Copy shows/test.qxw to shows/gig.qxw, sending Art-Net to the rig.
The test show sends Art-Net to 127.0.0.1 only, so it drives the simulator and
never the rig (see CLAUDE.md). The gig show is the same show sending from the
laptop's address on the gig network to the Art-Net node, as cabaret.qxw does.
Everything else, from the pads to the console, is the test show's, so run this
again after changing the test show.
python3 scripts/shows/make_gig.py
python3 scripts/shows/draw_test_pads.py gig # its pad layout picture
Don't open gig.qxw on a network where 192.168.1.175 is the real node unless
the rig should light up.
"""
from __future__ import annotations
from mover_bank import ROOT
TEST = ROOT / "shows" / "test.qxw"
GIG = ROOT / "shows" / "gig.qxw"
LAPTOP = "192.168.1.143" # the laptop's address on the gig network, as in cabaret.qxw
LINE = 1 # QLC+'s Art-Net line for it there
NODE = "192.168.1.175"
TEST_OUTPUT = ' <Output Plugin="ArtNet" UID="127.0.0.1" Line="4"/>\n'
GIG_OUTPUT = (f' <Output Plugin="ArtNet" UID="{LAPTOP}" Line="{LINE}">\n'
f' <PluginParameters outputIP="{NODE}" outputUni="0"/>\n'
' </Output>\n')
def main() -> None:
xml = TEST.read_text()
if xml.count(TEST_OUTPUT) != 1:
raise SystemExit(f"{TEST.relative_to(ROOT)} doesn't have its one Art-Net output to 127.0.0.1")
GIG.write_text(xml.replace(TEST_OUTPUT, GIG_OUTPUT, 1))
print(f"Copied {TEST.relative_to(ROOT)} to {GIG.relative_to(ROOT)}, sending Art-Net to {NODE}")
if __name__ == "__main__":
main()