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:
1 parent
467b480c76
commit
c7546e5ea9
5 files changed
+142
-13
No files matched your search
+17
-8
@@ -11,6 +11,8 @@ PLAY_UP = [0xB0, 27, 0]
|
||||
# The pad latches Pause: one message a press, 127 and 0 on alternate presses.
|
||||
PAUSE_ON = [0xB0, 28, 127]
|
||||
PAUSE_OFF = [0xB0, 28, 0]
|
||||
CANS_LIT = [[0x8F, 1, 0], [0x9F, 0, 127]] # channel 16: note 0 down, 1 up
|
||||
MOVERS_LIT = [[0x8F, 0, 0], [0x9F, 1, 127]]
|
||||
|
||||
|
||||
class PlayLayerTest(unittest.TestCase):
|
||||
@@ -80,16 +82,16 @@ class PlayLayerTest(unittest.TestCase):
|
||||
layer.handle(PLAY_DOWN)
|
||||
layer.handle([0x99, 66, 100])
|
||||
layer.handle(PLAY_UP)
|
||||
self.assertEqual(layer.reopen(), [[0x99, 54, 127], [0x89, 54, 0], [0x99, 82, 127], [0x89, 82, 0]])
|
||||
self.assertEqual(layer.reopen(), CANS_LIT + [[0x99, 54, 127], [0x89, 54, 0], [0x99, 82, 127], [0x89, 82, 0]])
|
||||
self.assertEqual(layer.colours, {1: (9, 54), 2: (9, 82)}) # still on, for the next reopen
|
||||
|
||||
def test_pause_toggles_bank_1_to_the_movers(self):
|
||||
layer = PlayLayer()
|
||||
self.assertEqual(layer.handle(PAUSE_ON), [])
|
||||
self.assertEqual(layer.handle(PAUSE_ON), MOVERS_LIT)
|
||||
self.assertEqual(layer.handle([0x99, 40, 100]), [[0x99, 88, 100]])
|
||||
self.assertEqual(layer.handle([0x99, 51, 100]), [[0x99, 99, 100]])
|
||||
self.assertEqual(layer.handle([0x99, 52, 100]), [[0x99, 52, 100]])
|
||||
self.assertEqual(layer.handle(PAUSE_OFF), [])
|
||||
self.assertEqual(layer.handle(PAUSE_OFF), CANS_LIT)
|
||||
self.assertEqual(layer.handle([0x99, 44, 100]), [[0x99, 44, 100]])
|
||||
|
||||
def test_pads_1_and_2_move_up_on_the_movers_layer(self):
|
||||
@@ -107,15 +109,22 @@ class PlayLayerTest(unittest.TestCase):
|
||||
layer.handle(PAUSE_OFF)
|
||||
self.assertEqual(layer.handle([0x89, 48, 0]), [[0x89, 96, 0]])
|
||||
|
||||
def test_reopen_with_no_colours_sends_nothing(self):
|
||||
self.assertEqual(PlayLayer().reopen(), [])
|
||||
def test_reopen_with_no_colours_only_lights_the_layer(self):
|
||||
self.assertEqual(PlayLayer().reopen(), CANS_LIT)
|
||||
|
||||
def test_pause_lights_the_layer_it_moves_to(self):
|
||||
layer = PlayLayer()
|
||||
self.assertEqual(layer.layer_lamp(), CANS_LIT)
|
||||
self.assertEqual(layer.handle(PAUSE_ON), MOVERS_LIT)
|
||||
self.assertEqual(layer.handle(PAUSE_OFF), CANS_LIT)
|
||||
self.assertEqual(layer.reopen(), CANS_LIT)
|
||||
|
||||
def test_pause_follows_the_pads_latch(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle(PAUSE_OFF) # already on the cans: stays there
|
||||
self.assertEqual(layer.handle(PAUSE_OFF), CANS_LIT) # already on the cans: stays there
|
||||
self.assertFalse(layer.movers)
|
||||
layer.handle(PAUSE_ON)
|
||||
layer.handle(PAUSE_ON) # a repeat changes nothing
|
||||
self.assertEqual(layer.handle(PAUSE_ON), MOVERS_LIT)
|
||||
self.assertEqual(layer.handle(PAUSE_ON), MOVERS_LIT) # a repeat changes nothing
|
||||
self.assertTrue(layer.movers)
|
||||
|
||||
def test_wander_off_settles_pan_and_tilt(self):
|
||||
|
||||
Reference in new issue
Block a user