Show in the test show whether the pads are on the cans or the movers.

A Pads layer frame under the movers pads has Cans pads and Movers pads
buttons (scripts/shows/layer_indicator.py). The pad controller holds channel
16 note 0 (cans) or 1 (movers) down and the other up whenever Pause changes,
QLC+ reloads or it starts, and the Flash buttons light while their note is
held, so the lit one is the layer and a missed message can't leave them the
wrong way round. Each flashes an empty scene of its own: with one between
them, QLC+ lit both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-10-23 15:09:49 +13:00
1 parent 467b480c76
commit c7546e5ea9
5 files changed
+142 -13

No files matched your search

+13 -3
View File
@@ -7,7 +7,10 @@ second set of buttons from the first. Play itself is not passed on.
Pause (CC 28) does the same for bank 1, but latches: the SMC-PAD sends one
message a press, 127 and 0 on alternate presses and nothing on release, and
bank 1 follows it. At 0, bank 1 pads 36–51 go out as they are, for the cans.
At 127, they go out as 84–99, for the movers. Pause itself is not passed on.
At 127, they go out as 84–99, for the movers. Pause itself is not passed on;
instead layer_lamp() tells QLC+ which layer is on, holding channel 16 note 0
(cans) or 1 (movers) down and the other up, for the test show's Pads layer
buttons.
colours holds the last colour pad pressed in each set, as sent (52–67 for the
cans, 68–83 for the movers), or None once it is pressed again: the colour
@@ -43,6 +46,8 @@ PAUSE_CC = 28
BANK_1_FIRST = 36
BANK_1_LAST = 51
MOVERS_SHIFT = 48 # bank 1 goes out as 84–99 while Pause is on, above bank 2's held layer
LAMP_CHANNEL = 15 # channel 16: the Pads layer buttons in QLC+, clear of the pads and knobs
CANS_LAMP, MOVERS_LAMP = 0, 1 # their notes
KNOB_CHANNEL = 0
# Wander, Ballyhoo, Circle, Sweep; Diamond, Square, Corners, Leaf; Tilt: pads 13–16, 9–12, 5
RELATIVE_NOTES = (96, 97, 98, 99, 92, 93, 94, 95, 88)
@@ -76,7 +81,7 @@ class PlayLayer:
return []
if kind == 0xB0 and len(data) >= 3 and data[1] == PAUSE_CC:
self.movers = data[2] > 0
return []
return self.layer_lamp()
if kind == 0xB0 and len(data) >= 3 and channel == KNOB_CHANNEL and data[1] in self.position:
self.position[data[1]] = data[2]
return [list(data)]
@@ -119,12 +124,17 @@ class PlayLayer:
"""QLC+ has loaded the show: everything is off. Press the colours that were on."""
self.moving = None
self.pattern = None
out = []
out = self.layer_lamp()
for colour in self.colours.values():
if colour is not None:
out += tap(*colour)
return out
def layer_lamp(self) -> list[list[int]]:
"""The active layer's lamp note held down and the other's let go."""
on, off = (MOVERS_LAMP, CANS_LAMP) if self.movers else (CANS_LAMP, MOVERS_LAMP)
return [[0x80 | LAMP_CHANNEL, off, 0], [0x90 | LAMP_CHANNEL, on, 127]]
def pattern_tap(self) -> list[list[int]]:
"""A tap of the can pattern that is on, to toggle it; nothing once none is."""
return [] if self.pattern is None else tap(self.pattern_channel, self.pattern)