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:
1 parent
873502b3ca
commit
72425159b5
4 files changed
+4208
-7
No files matched your search
@@ -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__":
|
||||
|
||||
Reference in new issue
Block a user