Remove the sound-reactive cans from the test show.
The Sound and Threshold audio triggers go, with the Sound submaster beside the cans' Front and Back sliders (CC 100) and the Sound peak frame with its Peak submaster and Hit button and the Cans hit functions only Hit ran. Pads 1 and 2 are plain spare buttons again (scripts/shows/drop_sound.py). The pads frame's own Peak (knob 6) stays: it is the chases' peak. The pad controller drops its side of it: the Pump and Threshold modes, the CC 100 resets, holding the side knobs at the peak and the pad lamps that showed which mode was on. Pads 1 and 2 and knobs 5, 6 and 8 pass straight through. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3b38df3dd0
commit
e7e1cf656b
6 files changed
+92
-349
No files matched your search
+10
-85
@@ -10,7 +10,6 @@ PLAY_DOWN = [0xB0, 27, 127]
|
||||
PLAY_UP = [0xB0, 27, 0]
|
||||
PAUSE_DOWN = [0xB0, 28, 127]
|
||||
PAUSE_UP = [0xB0, 28, 0]
|
||||
SIDES_FULL = [[0xB0, 34, 127], [0xB0, 37, 127]]
|
||||
|
||||
|
||||
class PlayLayerTest(unittest.TestCase):
|
||||
@@ -47,88 +46,18 @@ class PlayLayerTest(unittest.TestCase):
|
||||
layer.handle(PLAY_DOWN)
|
||||
self.assertEqual(layer.handle([0x99, 55, 0]), [[0x99, 55, 0]])
|
||||
|
||||
def test_sound_pad_puts_the_submaster_back_to_full(self):
|
||||
def test_pads_1_and_2_pass_straight_through(self):
|
||||
layer = PlayLayer()
|
||||
self.assertEqual(layer.handle([0x99, 36, 100]), [[0x99, 36, 100], *SIDES_FULL, [0xB0, 100, 127]])
|
||||
self.assertEqual(layer.handle([0x89, 36, 0]), [[0x89, 36, 0], [0xB0, 100, 127]])
|
||||
self.assertEqual(layer.handle([0x99, 36, 100]), [[0x99, 36, 100]])
|
||||
self.assertEqual(layer.handle([0x89, 36, 0]), [[0x89, 36, 0]])
|
||||
self.assertEqual(layer.handle([0x99, 37, 100]), [[0x99, 37, 100]])
|
||||
|
||||
def test_threshold_pad_holds_the_submaster_at_zero_while_on(self):
|
||||
layer = PlayLayer()
|
||||
self.assertEqual(layer.handle([0x99, 37, 100]), [[0x99, 37, 100], [0xB0, 100, 0]])
|
||||
self.assertEqual(layer.handle([0x89, 37, 0]), [[0x89, 37, 0], [0xB0, 100, 0]])
|
||||
self.assertEqual(layer.handle([0x99, 37, 100]), [[0x99, 37, 100], [0xB0, 100, 127]])
|
||||
self.assertEqual(layer.handle([0x89, 37, 0]), [[0x89, 37, 0], [0xB0, 100, 127]])
|
||||
|
||||
def test_sound_pads_track_which_mode_is_on(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0x99, 36, 100])
|
||||
layer.handle([0x89, 36, 0])
|
||||
self.assertEqual((layer.pump, layer.threshold), (True, False))
|
||||
layer.handle([0x99, 36, 100])
|
||||
layer.handle([0x99, 36, 0]) # note on at velocity 0 is a release
|
||||
self.assertEqual((layer.pump, layer.threshold), (False, False))
|
||||
|
||||
def test_turning_threshold_on_switches_pump_off_first(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0x99, 36, 100])
|
||||
self.assertEqual(
|
||||
layer.handle([0x99, 37, 100]),
|
||||
[[0x99, 36, 127], [0x89, 36, 0], [0x99, 37, 100], *SIDES_FULL, [0xB0, 100, 0]],
|
||||
)
|
||||
self.assertEqual((layer.pump, layer.threshold), (False, True))
|
||||
|
||||
def test_turning_pump_on_switches_threshold_off_first(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0x99, 37, 100])
|
||||
self.assertEqual(
|
||||
layer.handle([0x99, 36, 100]),
|
||||
[[0x99, 37, 127], [0x89, 37, 0], [0x99, 36, 100], *SIDES_FULL, [0xB0, 100, 127]],
|
||||
)
|
||||
self.assertEqual((layer.pump, layer.threshold), (True, False))
|
||||
|
||||
def test_turning_a_mode_off_leaves_the_other_alone(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0x99, 37, 100])
|
||||
self.assertEqual(layer.handle([0x99, 37, 100]), [[0x99, 37, 100], [0xB0, 100, 127]])
|
||||
self.assertEqual((layer.pump, layer.threshold), (False, False))
|
||||
|
||||
def test_peak_knob_goes_on_to_the_hits_submaster(self):
|
||||
def test_peak_and_side_knobs_pass_straight_through(self):
|
||||
layer = PlayLayer()
|
||||
self.assertEqual(layer.handle([0xB0, 35, 60]), [[0xB0, 35, 60]])
|
||||
|
||||
def test_side_knobs_pass_through_while_sound_is_off(self):
|
||||
layer = PlayLayer()
|
||||
self.assertEqual(layer.handle([0xB0, 34, 90]), [[0xB0, 34, 90]])
|
||||
layer.handle([0x99, 37, 100]) # Threshold keeps them: the submaster holds the sides dark
|
||||
self.assertEqual(layer.handle([0xB0, 37, 80]), [[0xB0, 37, 80]])
|
||||
|
||||
def test_pump_holds_the_sides_at_the_peak(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0xB0, 34, 90])
|
||||
layer.handle([0xB0, 35, 60])
|
||||
self.assertEqual(layer.handle([0x99, 36, 100]),
|
||||
[[0x99, 36, 100], [0xB0, 34, 60], [0xB0, 37, 60], [0xB0, 100, 127]])
|
||||
self.assertEqual(layer.handle([0xB0, 35, 40]), [[0xB0, 35, 40], [0xB0, 34, 40], [0xB0, 37, 40]])
|
||||
self.assertEqual(layer.handle([0xB0, 37, 100]), []) # kept for later
|
||||
|
||||
def test_pump_off_puts_the_side_knobs_back(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0xB0, 34, 90])
|
||||
layer.handle([0xB0, 35, 60])
|
||||
layer.handle([0x99, 36, 100])
|
||||
layer.handle([0xB0, 37, 100])
|
||||
self.assertEqual(layer.handle([0x99, 36, 100]),
|
||||
[[0x99, 36, 100], [0xB0, 34, 90], [0xB0, 37, 100], [0xB0, 100, 127]])
|
||||
|
||||
def test_threshold_taking_over_from_pump_puts_the_side_knobs_back(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0xB0, 34, 90])
|
||||
layer.handle([0xB0, 35, 60])
|
||||
layer.handle([0x99, 36, 100])
|
||||
self.assertEqual(layer.handle([0x99, 37, 100]),
|
||||
[[0x99, 36, 127], [0x89, 36, 0], [0x99, 37, 100],
|
||||
[0xB0, 34, 90], [0xB0, 37, 127], [0xB0, 100, 0]])
|
||||
|
||||
def test_colours_remember_the_last_pad_in_each_set(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0x99, 52, 100])
|
||||
@@ -144,16 +73,13 @@ class PlayLayerTest(unittest.TestCase):
|
||||
layer.handle([0x99, 52, 100])
|
||||
self.assertEqual(layer.colours[1], None)
|
||||
|
||||
def test_reopen_presses_the_colours_again_and_clears_sound(self):
|
||||
def test_reopen_presses_the_colours_again(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle([0x99, 54, 100])
|
||||
layer.handle(PLAY_DOWN)
|
||||
layer.handle([0x99, 66, 100])
|
||||
layer.handle(PLAY_UP)
|
||||
layer.handle([0x99, 36, 100])
|
||||
self.assertEqual(layer.reopen(), [[0x99, 54, 127], [0x89, 54, 0], [0x99, 82, 127], [0x89, 82, 0],
|
||||
[0xB0, 100, 127]])
|
||||
self.assertEqual((layer.pump, layer.threshold), (False, False))
|
||||
self.assertEqual(layer.reopen(), [[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):
|
||||
@@ -167,14 +93,13 @@ class PlayLayerTest(unittest.TestCase):
|
||||
layer.handle(PAUSE_UP)
|
||||
self.assertEqual(layer.handle([0x99, 44, 100]), [[0x99, 44, 100]])
|
||||
|
||||
def test_sound_pads_do_nothing_on_the_movers_layer(self):
|
||||
def test_pads_1_and_2_move_up_on_the_movers_layer(self):
|
||||
layer = PlayLayer()
|
||||
layer.handle(PAUSE_DOWN)
|
||||
self.assertEqual(layer.handle([0x99, 36, 100]), [[0x99, 84, 100]])
|
||||
self.assertEqual(layer.handle([0x89, 36, 0]), [[0x89, 84, 0]])
|
||||
self.assertEqual(layer.handle([0x99, 37, 100]), [[0x99, 85, 100]])
|
||||
self.assertEqual(layer.handle([0x89, 37, 0]), [[0x89, 85, 0]])
|
||||
self.assertEqual((layer.pump, layer.threshold), (False, False))
|
||||
|
||||
def test_bank_1_release_matches_its_press_across_pause(self):
|
||||
layer = PlayLayer()
|
||||
@@ -183,8 +108,8 @@ class PlayLayerTest(unittest.TestCase):
|
||||
layer.handle(PAUSE_DOWN)
|
||||
self.assertEqual(layer.handle([0x89, 48, 0]), [[0x89, 96, 0]])
|
||||
|
||||
def test_reopen_with_no_colours_only_resets_the_submaster(self):
|
||||
self.assertEqual(PlayLayer().reopen(), [[0xB0, 100, 127]])
|
||||
def test_reopen_with_no_colours_sends_nothing(self):
|
||||
self.assertEqual(PlayLayer().reopen(), [])
|
||||
|
||||
def test_wander_off_settles_pan_and_tilt(self):
|
||||
layer = PlayLayer()
|
||||
|
||||
Reference in new issue
Block a user