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
@@ -28,44 +28,5 @@ def set_lamps() -> None:
|
||||
print(f"Lamps not set: {exc}", flush=True)
|
||||
|
||||
|
||||
# Bank 1 pads 1 and 2 (notes 36 and 37), lit while their sound mode is on.
|
||||
PUMP_RGB = (0, 255, 0)
|
||||
THRESHOLD_RGB = (255, 120, 0)
|
||||
|
||||
|
||||
def set_sound_lamps(pump: bool, threshold: bool) -> None:
|
||||
"""Light the Pump and Threshold pads while their mode is on, without saving.
|
||||
|
||||
Writes only the pad's running copy, so the stored preset (bank 1 off) comes
|
||||
back on a power cycle. Needs the USB Private port; raises when it is missing.
|
||||
"""
|
||||
sys.path.insert(0, str(ROOT))
|
||||
sys.path.insert(0, str(ROOT / "scripts" / "pad"))
|
||||
import pad_colours
|
||||
import rtmidi
|
||||
from padcontroller.device import transact
|
||||
from padcontroller.preset import scale
|
||||
from padcontroller.sysex import RAM, write_request
|
||||
|
||||
lamps = {0: PUMP_RGB if pump else (0, 0, 0), 1: THRESHOLD_RGB if threshold else (0, 0, 0)}
|
||||
midiout = rtmidi.MidiOut(rtapi=rtmidi.API_LINUX_ALSA)
|
||||
midiin = rtmidi.MidiIn(rtapi=rtmidi.API_LINUX_ALSA)
|
||||
try:
|
||||
# Free both clients when the Private port is missing too, or every
|
||||
# sound pad press on Bluetooth leaks two and fills the sequencer.
|
||||
index = midiout.get_ports().index(pad_colours.private_port(midiout.get_ports()))
|
||||
midiin.open_port(index)
|
||||
midiin.ignore_types(sysex=False, timing=True, active_sense=True)
|
||||
midiout.open_port(index)
|
||||
for base in pad_colours.bank_bases(1):
|
||||
for pad, rgb in lamps.items():
|
||||
address = RAM + base + pad * pad_colours.RECORD + pad_colours.RGB_AT
|
||||
transact(midiout, midiin, write_request(address, bytes(scale(c) for c in rgb)))
|
||||
finally:
|
||||
for port in (midiout, midiin):
|
||||
port.close_port()
|
||||
port.delete()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
set_lamps()
|
||||
Reference in new issue
Block a user