Put the pads on the cans or movers layer from Pause's value.
The SMC-PAD latches Pause itself: one message a press, 127 and 0 on alternate presses, nothing on release. The pad controller flipped the layer only on 127, so every second press did nothing. Bank 1 now follows the value: 0 is the cans, 127 the movers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
31ccbab340
commit
467b480c76
2 files changed
+26
-19
No files matched your search
@@ -4,9 +4,10 @@ The SMC-PAD sends CC 27 as 127 when Play goes down and 0 when it comes up.
|
||||
While it is down, pad notes 52–67 go out as 68–83, so QLC+ can tell a
|
||||
second set of buttons from the first. Play itself is not passed on.
|
||||
|
||||
Pause (CC 28) does the same for bank 1, but toggles: each press flips it.
|
||||
Off, bank 1 pads 36–51 go out as they are, for the cans. On, they go out as
|
||||
84–99, for the movers. Pause 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.
|
||||
|
||||
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
|
||||
@@ -52,7 +53,7 @@ PATTERN_NOTES = range(36, 44) # the can patterns: pads 1–8 on the cans layer
|
||||
class PlayLayer:
|
||||
def __init__(self) -> None:
|
||||
self.held = False
|
||||
self.movers = False # Pause toggles bank 1 between the cans and the movers
|
||||
self.movers = False # Pause latched on puts bank 1 on the movers
|
||||
# (channel, note as pressed) -> note sent, so a release matches its press
|
||||
self.sent: dict[tuple[int, int], int] = {}
|
||||
# Pan and Tilt as last sent; QLC+ starts them at 0.
|
||||
@@ -74,8 +75,7 @@ class PlayLayer:
|
||||
self.held = data[2] > 0
|
||||
return []
|
||||
if kind == 0xB0 and len(data) >= 3 and data[1] == PAUSE_CC:
|
||||
if data[2] > 0:
|
||||
self.movers = not self.movers
|
||||
self.movers = data[2] > 0
|
||||
return []
|
||||
if kind == 0xB0 and len(data) >= 3 and channel == KNOB_CHANNEL and data[1] in self.position:
|
||||
self.position[data[1]] = data[2]
|
||||
|
||||
Reference in new issue
Block a user