diff options
| author | sbahling <sbahling@mudgum.net> | 2018-10-31 23:31:20 +0100 |
|---|---|---|
| committer | sbahling <sbahling@mudgum.net> | 2018-10-31 23:31:20 +0100 |
| commit | 70ff37debca07c6711c104085df70c4124cde091 (patch) | |
| tree | 44fc07e04e03dcda3584ab0da8411454cd3b9477 /tascam_fw_console | |
| parent | 90f9b73aa0d2c09404511176bcc8640e235f2cbc (diff) | |
| download | tascam-fw-osc-70ff37debca07c6711c104085df70c4124cde091.tar.gz tascam-fw-osc-70ff37debca07c6711c104085df70c4124cde091.tar.xz tascam-fw-osc-70ff37debca07c6711c104085df70c4124cde091.zip | |
Handle incoming strip select notification
Diffstat (limited to 'tascam_fw_console')
| -rw-r--r-- | tascam_fw_console/console.py | 16 | ||||
| -rw-r--r-- | tascam_fw_console/osc.py | 1 |
2 files changed, 14 insertions, 3 deletions
diff --git a/tascam_fw_console/console.py b/tascam_fw_console/console.py index 319f969..97a89e9 100644 --- a/tascam_fw_console/console.py +++ b/tascam_fw_console/console.py @@ -257,10 +257,20 @@ class Console(): def default_handler(self, addr, *args): print(addr, args) + def strip_select_handler(self, addr, ssid, state): + strip = self.strips[int(ssid)] + print('select_handler', strip, state) + if strip.num == 0 or strip.name == ' ': + return + if state: + strip.select = True + else: + strip.select = False + def strip_mute_handler(self, addr, ssid, state): strip = self.strips[int(ssid)] print('mute_handler', strip, state) - if strip.name == ' ': + if strip.num == 0 or strip.name == ' ': return if state: strip.mute = True @@ -270,7 +280,7 @@ class Console(): def strip_solo_handler(self, addr, ssid, state): strip = self.strips[int(ssid)] print('solo_handler', strip, state) - if strip.name == ' ': + if strip.num == 0 or strip.name == ' ': return if state: strip.solo = True @@ -280,7 +290,7 @@ class Console(): def strip_recenable_handler(self, addr, ssid, state): strip = self.strips[int(ssid)] print('recenable_handler', strip, state) - if strip.name == ' ': + if strip.num == 0 or strip.name == ' ': return if state: strip.rec = True diff --git a/tascam_fw_console/osc.py b/tascam_fw_console/osc.py index 1fbd8c9..2892168 100644 --- a/tascam_fw_console/osc.py +++ b/tascam_fw_console/osc.py @@ -38,6 +38,7 @@ def init_dispatcher(console): dispatcher.map("/rec_enable_toggle", console.rec_enable_toggle_handler) dispatcher.map('/strip/fader', console.strip_fader_handler) dispatcher.map('/strip/mute', console.strip_mute_handler) + dispatcher.map('/strip/select', console.strip_select_handler) dispatcher.map('/strip/solo', console.strip_solo_handler) dispatcher.map('/strip/recenable', console.strip_recenable_handler) dispatcher.map('/strip/trimdB', console.strip_trimdb_handler) |
