Give the test show Dimmers knobs instead of the custom colour mixer, and add Amber.
The colour scenes leave the dimmers to Level sliders on knobs 15, 5, 7 and 8. The Chataigne export carries Level sliders and their starting values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
11da656ee6
commit
2219788904
7 files changed
+1994
-2821
No files matched your search
@@ -8,11 +8,9 @@ Holding Play picks set B: the pad controller turns those notes into 68–83 whil
|
||||
Play is down. Bank 1 is kept for animations.
|
||||
|
||||
python3 scripts/shows/colour_sets.py && python3 -m showfile write shows/test.show.json -o shows/test.qxw
|
||||
The sliders are Playback sliders over five scenes per set (Dim, R, G, B, W),
|
||||
so they never override a channel. Knobs 1–5 move colour 1's sliders and knobs
|
||||
6–10 colour 2's. Run the pad controller with --lock-knobs to make them work only
|
||||
after the Custom pad is pressed; any other pad sends them back to zero (see
|
||||
padcontroller/layer.py).
|
||||
The colour scenes leave the dimmers alone: the Dimmers frame's Level sliders
|
||||
own them, on knob 15 (movers), knob 5 (cans 9–15), knob 7 (cans 3–6) and
|
||||
knob 8 (cans 1, 2, 7, 8).
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -30,13 +28,14 @@ HELD_FIRST_NOTE = 68 # padcontroller/layer.py sends bank 2 here while Play is h
|
||||
PROFILE = "M-VAVE SMC-PAD"
|
||||
OMNI = 16 # QLC+ MIDI plugin channel that accepts every MIDI channel
|
||||
PAD_MIDI_CH = 9 # the pads send notes on channel 10
|
||||
KNOB_FIRST_CC = 30 # pad knob 1; colour 2's sliders follow colour 1's
|
||||
KNOB_FIRST_CC = 30 # pad knob 1
|
||||
PAD_PORT = "padcontroller" # padcontroller/midi.py; it applies the Play layer
|
||||
|
||||
# name, r, g, b, w. Bottom row first, four to a row. The cans have a white emitter, so the whites use it.
|
||||
COLOURS = (
|
||||
("Red", 255, 0, 0, 0),
|
||||
("Orange", 255, 127, 0, 0),
|
||||
("Amber", 255, 191, 0, 0),
|
||||
("Yellow", 255, 255, 0, 0),
|
||||
("Lime", 127, 255, 0, 0),
|
||||
("Green", 0, 255, 0, 0),
|
||||
@@ -51,10 +50,6 @@ COLOURS = (
|
||||
("White", 0, 0, 0, 255),
|
||||
("Cool", 80, 120, 255, 120),
|
||||
)
|
||||
# The top-right pad is the custom colour. Its button shows this swatch, but
|
||||
# its scene is dark: the sliders next to it mix the colour from five scenes.
|
||||
# Its pad lamp stays off.
|
||||
CUSTOM = (("Custom", 255, 60, 0, 0),)
|
||||
CANS = [f"#{n}" for n in range(1, 16)]
|
||||
MOVERS = ["M1", "M2", "M3", "M4"]
|
||||
# Mover channels: 8 is centre brightness, 9 centre strobe, then seven R G B W groups from 10.
|
||||
@@ -65,41 +60,25 @@ def swatch(r: int, g: int, b: int, w: int) -> list[int]:
|
||||
return [min(255, r + w), min(255, g + w), min(255, b + w)]
|
||||
|
||||
|
||||
# Mixer beside each grid: caption, can channel, offset in a mover colour group (None is brightness).
|
||||
SLIDERS = (
|
||||
("Dim", DIMMER, None, [255, 255, 255]),
|
||||
("R", RED, 0, [255, 0, 0]),
|
||||
("G", GREEN, 1, [0, 255, 0]),
|
||||
("B", BLUE, 2, [0, 0, 255]),
|
||||
("W", WHITE, 3, [255, 255, 255]),
|
||||
# Level sliders on the dimmer channels: caption, knob (from 1), fixtures, channel.
|
||||
DIMMERS = (
|
||||
("Movers", 15, MOVERS, MOVER_BRIGHTNESS),
|
||||
("Cans 9–15", 5, CANS[8:], DIMMER),
|
||||
("Cans 3–6", 7, CANS[2:6], DIMMER),
|
||||
("Cans 1, 2, 7, 8", 8, CANS[0:2] + CANS[6:8], DIMMER),
|
||||
)
|
||||
|
||||
|
||||
def component(cans: list[str], movers: list[str], can_channel: int, offset: int | None) -> dict:
|
||||
"""One channel kind of this set at full, for a Playback slider to scale."""
|
||||
values = {can: {can_channel: 255} for can in cans}
|
||||
for mover in movers:
|
||||
if offset is None:
|
||||
values[mover] = {MOVER_BRIGHTNESS: 255}
|
||||
else:
|
||||
values[mover] = {MOVER_FIRST_COLOUR + group * 4 + offset: 255 for group in range(MOVER_GROUPS)}
|
||||
return values
|
||||
|
||||
|
||||
def custom_off(cans: list[str], movers: list[str]) -> dict:
|
||||
"""The Custom pad's own scene: dark, so the sliders' scenes set the colour."""
|
||||
values = {can: {DIMMER: 0} for can in cans}
|
||||
values.update({mover: {MOVER_BRIGHTNESS: 0} for mover in movers})
|
||||
return values
|
||||
|
||||
|
||||
def sliders(label: str, first_cc: int) -> list[dict]:
|
||||
"""Playback sliders. Each scales its own scene, so nothing is overridden."""
|
||||
return [{
|
||||
"type": "slider", "caption": caption, "function": f"custom_{label}_{caption}",
|
||||
"x": 400 + index * 52, "y": 10, "w": 48, "h": 200, "fg": fg,
|
||||
"input": {"universe": 1, "cc": [0, first_cc + index]},
|
||||
} for index, (caption, _can, _offset, fg) in enumerate(SLIDERS)]
|
||||
def dimmers() -> dict:
|
||||
return {
|
||||
"type": "frame", "caption": "Dimmers", "x": 10, "y": 630, "w": 250, "h": 250,
|
||||
"children": [{
|
||||
"type": "slider", "caption": caption, "value": 255,
|
||||
"channels": [[fixture, channel] for fixture in fixtures],
|
||||
"x": 10 + index * 58, "y": 10, "w": 52, "h": 200,
|
||||
"input": {"universe": 1, "cc": [0, KNOB_FIRST_CC + knob - 1]},
|
||||
} for index, (caption, knob, fixtures, channel) in enumerate(DIMMERS)],
|
||||
}
|
||||
|
||||
|
||||
def main() -> None:
|
||||
@@ -108,17 +87,14 @@ def main() -> None:
|
||||
functions, frames = [], []
|
||||
for si, (label, cans, movers) in enumerate((("1", CANS, []), ("2", [], MOVERS))):
|
||||
buttons = []
|
||||
for i, (name, r, g, b, w) in enumerate(COLOURS + CUSTOM):
|
||||
for i, (name, r, g, b, w) in enumerate(COLOURS):
|
||||
key = f"colour_{label}_{i + 1}"
|
||||
on = 255
|
||||
values = {can: {DIMMER: on, RED: r, GREEN: g, BLUE: b, WHITE: w} for can in cans}
|
||||
values = {can: {RED: r, GREEN: g, BLUE: b, WHITE: w} for can in cans}
|
||||
for mover in movers:
|
||||
values[mover] = {MOVER_BRIGHTNESS: on, MOVER_STROBE: 0}
|
||||
values[mover] = {MOVER_STROBE: 0}
|
||||
for group in range(MOVER_GROUPS):
|
||||
first = MOVER_FIRST_COLOUR + group * 4
|
||||
values[mover].update({first: r, first + 1: g, first + 2: b, first + 3: w})
|
||||
if name == CUSTOM[0][0]:
|
||||
values = custom_off(cans, movers)
|
||||
functions.append({
|
||||
"key": key, "type": "scene", "name": f"{label} {name}",
|
||||
"fade_in": FADE_MS, "fade_out": FADE_MS, "values": values,
|
||||
@@ -134,17 +110,12 @@ def main() -> None:
|
||||
}
|
||||
button["input"] = {"universe": 1, "note": [PAD_MIDI_CH, (HELD_FIRST_NOTE if si else PAD_BANK_2_FIRST_NOTE) + i]}
|
||||
buttons.append(button)
|
||||
for caption, can_channel, offset, _fg in SLIDERS:
|
||||
functions.append({
|
||||
"key": f"custom_{label}_{caption}", "type": "scene", "name": f"{label} Custom {caption}",
|
||||
"values": component(cans, movers, can_channel, offset),
|
||||
})
|
||||
frames.append({
|
||||
"type": "solo", "caption": f"Colour {label}", "x": 10, "y": 10 + si * 310,
|
||||
"w": 400 + len(SLIDERS) * 52, "h": 300, "children": buttons + sliders(label, KNOB_FIRST_CC + si * len(SLIDERS)),
|
||||
"w": 400, "h": 300, "children": buttons,
|
||||
})
|
||||
spec["functions"] = functions
|
||||
spec["vc"] = frames
|
||||
spec["vc"] = frames + [dimmers()]
|
||||
SPEC.write_text(json.dumps(spec, indent=2) + "\n")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user