|
|
|
@@ -38,7 +38,7 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
self.popup = Popup(self)
|
|
|
|
self.popup = Popup(self)
|
|
|
|
self.builder = Builder(self)
|
|
|
|
self.builder = Builder(self)
|
|
|
|
layout = self.builder.run()
|
|
|
|
layout = self.builder.run()
|
|
|
|
super().__init__(title, layout, return_keyboard_events=True, finalize=True)
|
|
|
|
super().__init__(title, layout, return_keyboard_events=False, finalize=True)
|
|
|
|
buttonmenu_opts = {"takefocus": 1, "highlightthickness": 1}
|
|
|
|
buttonmenu_opts = {"takefocus": 1, "highlightthickness": 1}
|
|
|
|
for i in range(self.kind.phys_in):
|
|
|
|
for i in range(self.kind.phys_in):
|
|
|
|
self[f"HARDWARE IN||{i + 1}"].Widget.config(**buttonmenu_opts)
|
|
|
|
self[f"HARDWARE IN||{i + 1}"].Widget.config(**buttonmenu_opts)
|
|
|
|
@@ -57,6 +57,10 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
self[f"STRIP {i}||SLIDER LIMIT"].Widget.config(**slider_opts)
|
|
|
|
self[f"STRIP {i}||SLIDER LIMIT"].Widget.config(**slider_opts)
|
|
|
|
for i in range(self.kind.num_bus):
|
|
|
|
for i in range(self.kind.num_bus):
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].Widget.config(**slider_opts)
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].Widget.config(**slider_opts)
|
|
|
|
|
|
|
|
if self.kind.name != "basic":
|
|
|
|
|
|
|
|
for i in range(self.kind.phys_out):
|
|
|
|
|
|
|
|
self[f"ASIO CHECKBOX||IN{i + 1} 0"].Widget.config(state="readonly")
|
|
|
|
|
|
|
|
self[f"ASIO CHECKBOX||IN{i + 1} 1"].Widget.config(state="readonly")
|
|
|
|
|
|
|
|
|
|
|
|
self.register_events()
|
|
|
|
self.register_events()
|
|
|
|
self["tabgroup"].set_focus()
|
|
|
|
self["tabgroup"].set_focus()
|
|
|
|
@@ -138,6 +142,7 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
self[f"tabgroup||{tabname}"].bind("<Shift-KeyPress-Tab>", "||KEY SHIFT TAB")
|
|
|
|
self[f"tabgroup||{tabname}"].bind("<Shift-KeyPress-Tab>", "||KEY SHIFT TAB")
|
|
|
|
self.bind("<Control-KeyPress-Tab>", "CTRL-TAB")
|
|
|
|
self.bind("<Control-KeyPress-Tab>", "CTRL-TAB")
|
|
|
|
self.bind("<Control-Shift-KeyPress-Tab>", "CTRL-SHIFT-TAB")
|
|
|
|
self.bind("<Control-Shift-KeyPress-Tab>", "CTRL-SHIFT-TAB")
|
|
|
|
|
|
|
|
self.bind("<F2>", "F2")
|
|
|
|
|
|
|
|
|
|
|
|
# NAV
|
|
|
|
# NAV
|
|
|
|
self.bind("<Control-a>", "CTRL-A")
|
|
|
|
self.bind("<Control-a>", "CTRL-A")
|
|
|
|
@@ -164,13 +169,14 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
self.bind("<Control-t>", "GATE MODE")
|
|
|
|
self.bind("<Control-t>", "GATE MODE")
|
|
|
|
self.bind("<Control-d>", "DENOISER MODE")
|
|
|
|
self.bind("<Control-d>", "DENOISER MODE")
|
|
|
|
self.bind("<Control-l>", "LIMIT MODE")
|
|
|
|
self.bind("<Control-l>", "LIMIT MODE")
|
|
|
|
|
|
|
|
self.bind("<Escape>", "ESCAPE")
|
|
|
|
|
|
|
|
|
|
|
|
self.bind("<Alt-Left>", "LEFT")
|
|
|
|
for event in ("KeyPress", "KeyRelease"):
|
|
|
|
self.bind("<Alt-Right>", "RIGHT")
|
|
|
|
event_id = event.removeprefix("Key").upper()
|
|
|
|
self.bind("<Alt-Shift-KeyPress-Left>", "SHIFT-LEFT")
|
|
|
|
for direction in ("Left", "Right", "Up", "Down"):
|
|
|
|
self.bind("<Alt-Shift-KeyPress-Right>", "SHIFT-RIGHT")
|
|
|
|
self.bind(f"<Alt-{event}-{direction}>", f"ALT {direction.upper()}||{event_id}")
|
|
|
|
self.bind("<Alt-Control-KeyPress-Left>", "CTRL-LEFT")
|
|
|
|
self.bind(f"<Alt-Shift-{event}-{direction}>", f"ALT SHIFT {direction.upper()}||{event_id}")
|
|
|
|
self.bind("<Alt-Control-KeyPress-Right>", "CTRL-RIGHT")
|
|
|
|
self.bind(f"<Alt-Control-{event}-{direction}>", f"ALT CTRL {direction.upper()}||{event_id}")
|
|
|
|
|
|
|
|
|
|
|
|
# Hardware In
|
|
|
|
# Hardware In
|
|
|
|
for i in range(self.vm.kind.phys_in):
|
|
|
|
for i in range(self.vm.kind.phys_in):
|
|
|
|
@@ -207,8 +213,11 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
if i < self.kind.phys_in:
|
|
|
|
if i < self.kind.phys_in:
|
|
|
|
self[f"INSERT CHECKBOX||IN{i + 1} 0"].bind("<FocusIn>", "||FOCUS IN")
|
|
|
|
self[f"INSERT CHECKBOX||IN{i + 1} 0"].bind("<FocusIn>", "||FOCUS IN")
|
|
|
|
self[f"INSERT CHECKBOX||IN{i + 1} 1"].bind("<FocusIn>", "||FOCUS IN")
|
|
|
|
self[f"INSERT CHECKBOX||IN{i + 1} 1"].bind("<FocusIn>", "||FOCUS IN")
|
|
|
|
|
|
|
|
self[f"INSERT CHECKBOX||IN{i + 1} 0"].bind("<Return>", "||KEY ENTER")
|
|
|
|
|
|
|
|
self[f"INSERT CHECKBOX||IN{i + 1} 1"].bind("<Return>", "||KEY ENTER")
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
[self[f"INSERT CHECKBOX||IN{i + 1} {j}"].bind("<FocusIn>", "||FOCUS IN") for j in range(8)]
|
|
|
|
[self[f"INSERT CHECKBOX||IN{i + 1} {j}"].bind("<FocusIn>", "||FOCUS IN") for j in range(8)]
|
|
|
|
|
|
|
|
[self[f"INSERT CHECKBOX||IN{i + 1} {j}"].bind("<Return>", "||KEY ENTER") for j in range(8)]
|
|
|
|
|
|
|
|
|
|
|
|
# Advanced Settings
|
|
|
|
# Advanced Settings
|
|
|
|
self["ADVANCED SETTINGS"].bind("<FocusIn>", "||FOCUS IN")
|
|
|
|
self["ADVANCED SETTINGS"].bind("<FocusIn>", "||FOCUS IN")
|
|
|
|
@@ -236,18 +245,18 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
for param in util.get_full_slider_params(i, self.kind):
|
|
|
|
for param in util.get_full_slider_params(i, self.kind):
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<FocusIn>", "||FOCUS IN")
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<FocusIn>", "||FOCUS IN")
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<FocusOut>", "||FOCUS OUT")
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<FocusOut>", "||FOCUS OUT")
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<Left>", "||KEY LEFT")
|
|
|
|
for event in ("KeyPress", "KeyRelease"):
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<Right>", "||KEY RIGHT")
|
|
|
|
event_id = event.removeprefix("Key").upper()
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<Shift-KeyPress-Left>", "||KEY SHIFT LEFT")
|
|
|
|
for direction in ("Left", "Right", "Up", "Down"):
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<Shift-KeyPress-Right>", "||KEY SHIFT RIGHT")
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind(
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<Control-KeyPress-Left>", "||KEY CTRL LEFT")
|
|
|
|
f"<{event}-{direction}>", f"||KEY {direction.upper()} {event_id}"
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<Control-KeyPress-Right>", "||KEY CTRL RIGHT")
|
|
|
|
)
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<Up>", "||KEY UP")
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind(
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<Down>", "||KEY DOWN")
|
|
|
|
f"<Shift-{event}-{direction}>", f"||KEY SHIFT {direction.upper()} {event_id}"
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<Shift-KeyPress-Up>", "||KEY SHIFT UP")
|
|
|
|
)
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<Shift-KeyPress-Down>", "||KEY SHIFT DOWN")
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind(
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<Control-KeyPress-Up>", "||KEY CTRL UP")
|
|
|
|
f"<Control-{event}-{direction}>", f"||KEY CTRL {direction.upper()} {event_id}"
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<Control-KeyPress-Down>", "||KEY CTRL DOWN")
|
|
|
|
)
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<Control-Shift-KeyPress-R>", "||KEY CTRL SHIFT R")
|
|
|
|
self[f"STRIP {i}||SLIDER {param}"].bind("<Control-Shift-KeyPress-R>", "||KEY CTRL SHIFT R")
|
|
|
|
|
|
|
|
|
|
|
|
# Bus Params
|
|
|
|
# Bus Params
|
|
|
|
@@ -261,20 +270,18 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
|
|
|
|
|
|
|
|
# Bus Sliders
|
|
|
|
# Bus Sliders
|
|
|
|
for i in range(self.kind.num_bus):
|
|
|
|
for i in range(self.kind.num_bus):
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<FocusIn>", "||FOCUS IN")
|
|
|
|
for event in ("KeyPress", "KeyRelease"):
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<FocusOut>", "||FOCUS OUT")
|
|
|
|
event_id = event.removeprefix("Key").upper()
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<Left>", "||KEY LEFT")
|
|
|
|
for direction in ("Left", "Right", "Up", "Down"):
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<Right>", "||KEY RIGHT")
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind(
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<Shift-KeyPress-Left>", "||KEY SHIFT LEFT")
|
|
|
|
f"<{event}-{direction}>", f"||KEY {direction.upper()} {event_id}"
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<Shift-KeyPress-Right>", "||KEY SHIFT RIGHT")
|
|
|
|
)
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<Control-KeyPress-Left>", "||KEY CTRL LEFT")
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind(
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<Control-KeyPress-Right>", "||KEY CTRL RIGHT")
|
|
|
|
f"<Shift-{event}-{direction}>", f"||KEY SHIFT {direction.upper()} {event_id}"
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<Up>", "||KEY UP")
|
|
|
|
)
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<Down>", "||KEY DOWN")
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind(
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<Shift-KeyPress-Up>", "||KEY SHIFT UP")
|
|
|
|
f"<Control-{event}-{direction}>", f"||KEY CTRL {direction.upper()} {event_id}"
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<Shift-KeyPress-Down>", "||KEY SHIFT DOWN")
|
|
|
|
)
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<Control-KeyPress-Up>", "||KEY CTRL UP")
|
|
|
|
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<Control-KeyPress-Down>", "||KEY CTRL DOWN")
|
|
|
|
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<Control-Shift-KeyPress-R>", "||KEY CTRL SHIFT R")
|
|
|
|
self[f"BUS {i}||SLIDER GAIN"].bind("<Control-Shift-KeyPress-R>", "||KEY CTRL SHIFT R")
|
|
|
|
|
|
|
|
|
|
|
|
def run(self):
|
|
|
|
def run(self):
|
|
|
|
@@ -294,17 +301,25 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
elif event.endswith("MODE"):
|
|
|
|
elif event.endswith("MODE"):
|
|
|
|
mode = event
|
|
|
|
mode = event
|
|
|
|
self.nvda.speak(f"{mode} enabled")
|
|
|
|
self.nvda.speak(f"{mode} enabled")
|
|
|
|
elif event == "Escape:27":
|
|
|
|
continue
|
|
|
|
|
|
|
|
elif event == "ESCAPE":
|
|
|
|
if mode:
|
|
|
|
if mode:
|
|
|
|
self.nvda.speak(f"{mode} disabled")
|
|
|
|
self.nvda.speak(f"{mode} disabled")
|
|
|
|
mode = None
|
|
|
|
mode = None
|
|
|
|
|
|
|
|
|
|
|
|
if mode:
|
|
|
|
|
|
|
|
if event in ("LEFT", "RIGHT", "SHIFT-LEFT", "SHIFT-RIGHT", "CTRL-LEFT", "CTRL-RIGHT"):
|
|
|
|
|
|
|
|
self.write_event_value(f"SLIDER-MODE-{event}", mode.split()[0])
|
|
|
|
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
|
|
match parsed_cmd := self.parser.match.parseString(event):
|
|
|
|
match parsed_cmd := self.parser.match.parseString(event):
|
|
|
|
|
|
|
|
# Slide mode
|
|
|
|
|
|
|
|
case [["ALT", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction], ["PRESS" | "RELEASE" as e]]:
|
|
|
|
|
|
|
|
if mode:
|
|
|
|
|
|
|
|
self.write_event_value(f"SLIDER MODE {direction}||{e}", mode.split()[0])
|
|
|
|
|
|
|
|
case [
|
|
|
|
|
|
|
|
["ALT", "SHIFT" | "CTRL" as modifier, "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
|
|
|
|
|
|
|
["PRESS" | "RELEASE" as e],
|
|
|
|
|
|
|
|
]:
|
|
|
|
|
|
|
|
if mode:
|
|
|
|
|
|
|
|
self.write_event_value(f"SLIDER MODE {modifier} {direction}||{e}", mode.split()[0])
|
|
|
|
|
|
|
|
|
|
|
|
# Focus tabgroup
|
|
|
|
# Focus tabgroup
|
|
|
|
case ["CTRL-TAB"] | ["CTRL-SHIFT-TAB"]:
|
|
|
|
case ["CTRL-TAB"] | ["CTRL-SHIFT-TAB"]:
|
|
|
|
self["tabgroup"].set_focus()
|
|
|
|
self["tabgroup"].set_focus()
|
|
|
|
@@ -372,13 +387,19 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
if focus := self.find_element_with_focus():
|
|
|
|
if focus := self.find_element_with_focus():
|
|
|
|
identifier, param = focus.Key.split("||")
|
|
|
|
identifier, param = focus.Key.split("||")
|
|
|
|
self.write_event_value(f"{identifier}||MUTE", None)
|
|
|
|
self.write_event_value(f"{identifier}||MUTE", None)
|
|
|
|
|
|
|
|
case [["SLIDER", "MODE", direction], ["PRESS" | "RELEASE" as e]]:
|
|
|
|
|
|
|
|
if values["tabgroup"] not in ("tab||Physical Strip", "tab||Virtual Strip", "tab||Buses"):
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
param = values[event]
|
|
|
|
|
|
|
|
if focus := self.find_element_with_focus():
|
|
|
|
|
|
|
|
identifier, partial = focus.Key.split("||")
|
|
|
|
|
|
|
|
_, index = identifier.split()
|
|
|
|
|
|
|
|
if param in util.get_full_slider_params(int(index), self.kind):
|
|
|
|
|
|
|
|
if "SLIDER" not in partial:
|
|
|
|
|
|
|
|
self.write_event_value(f"{identifier}||SLIDER {param}||KEY {direction} {e}", None)
|
|
|
|
case [
|
|
|
|
case [
|
|
|
|
"SLIDER-MODE-LEFT"
|
|
|
|
["SLIDER", "MODE", "SHIFT" | "CTRL" as modifier, direction],
|
|
|
|
| "SLIDER-MODE-RIGHT"
|
|
|
|
["PRESS" | "RELEASE" as e],
|
|
|
|
| "SLIDER-MODE-SHIFT-LEFT"
|
|
|
|
|
|
|
|
| "SLIDER-MODE-SHIFT-RIGHT"
|
|
|
|
|
|
|
|
| "SLIDER-MODE-CTRL-LEFT"
|
|
|
|
|
|
|
|
| "SLIDER-MODE-CTRL-RIGHT" as op
|
|
|
|
|
|
|
|
]:
|
|
|
|
]:
|
|
|
|
if values["tabgroup"] not in ("tab||Physical Strip", "tab||Virtual Strip", "tab||Buses"):
|
|
|
|
if values["tabgroup"] not in ("tab||Physical Strip", "tab||Virtual Strip", "tab||Buses"):
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
@@ -388,11 +409,12 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
_, index = identifier.split()
|
|
|
|
_, index = identifier.split()
|
|
|
|
if param in util.get_full_slider_params(int(index), self.kind):
|
|
|
|
if param in util.get_full_slider_params(int(index), self.kind):
|
|
|
|
if "SLIDER" not in partial:
|
|
|
|
if "SLIDER" not in partial:
|
|
|
|
op = op.removeprefix("SLIDER-MODE-").split("-")
|
|
|
|
self.write_event_value(
|
|
|
|
self.write_event_value(f"{identifier}||SLIDER {param}||KEY {' '.join(op)}", None)
|
|
|
|
f"{identifier}||SLIDER {param}||KEY {modifier} {direction} {e}", None
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
# Rename popups
|
|
|
|
# Rename popups
|
|
|
|
case ["F2:113"]:
|
|
|
|
case ["F2"]:
|
|
|
|
tab = values["tabgroup"].split("||")[1]
|
|
|
|
tab = values["tabgroup"].split("||")[1]
|
|
|
|
if tab in ("Physical Strip", "Virtual Strip", "Buses"):
|
|
|
|
if tab in ("Physical Strip", "Virtual Strip", "Buses"):
|
|
|
|
if focus := self.find_element_with_focus():
|
|
|
|
if focus := self.find_element_with_focus():
|
|
|
|
@@ -579,7 +601,7 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
)
|
|
|
|
)
|
|
|
|
val = values[f"INSERT CHECKBOX||{in_num} {channel}"]
|
|
|
|
val = values[f"INSERT CHECKBOX||{in_num} {channel}"]
|
|
|
|
self.vm.patch.insert[index].on = val
|
|
|
|
self.vm.patch.insert[index].on = val
|
|
|
|
self.nvda.speak(f"{'on' if val else 'off'}")
|
|
|
|
self.nvda.speak("on" if val else "off")
|
|
|
|
case [["INSERT", "CHECKBOX"], [in_num, channel], ["FOCUS", "IN"]]:
|
|
|
|
case [["INSERT", "CHECKBOX"], [in_num, channel], ["FOCUS", "IN"]]:
|
|
|
|
if self.find_element_with_focus() is not None:
|
|
|
|
if self.find_element_with_focus() is not None:
|
|
|
|
index = util.get_insert_checkbox_index(
|
|
|
|
index = util.get_insert_checkbox_index(
|
|
|
|
@@ -591,6 +613,9 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
channel = util._patch_insert_channels[int(channel)]
|
|
|
|
channel = util._patch_insert_channels[int(channel)]
|
|
|
|
num = int(in_num[-1])
|
|
|
|
num = int(in_num[-1])
|
|
|
|
self.nvda.speak(f"Patch INSERT IN#{num} {channel} {'on' if val else 'off'}")
|
|
|
|
self.nvda.speak(f"Patch INSERT IN#{num} {channel} {'on' if val else 'off'}")
|
|
|
|
|
|
|
|
case [["INSERT", "CHECKBOX"], [in_num, channel], ["KEY", "ENTER"]]:
|
|
|
|
|
|
|
|
val = not values[f"INSERT CHECKBOX||{in_num} {channel}"]
|
|
|
|
|
|
|
|
self.write_event_value(f"INSERT CHECKBOX||{in_num} {channel}", val)
|
|
|
|
|
|
|
|
|
|
|
|
# Advanced Settings
|
|
|
|
# Advanced Settings
|
|
|
|
case ["ADVANCED SETTINGS"] | ["CTRL-A"]:
|
|
|
|
case ["ADVANCED SETTINGS"] | ["CTRL-A"]:
|
|
|
|
@@ -701,7 +726,6 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
["FOCUS", "IN"],
|
|
|
|
["FOCUS", "IN"],
|
|
|
|
]:
|
|
|
|
]:
|
|
|
|
if self.find_element_with_focus() is not None:
|
|
|
|
if self.find_element_with_focus() is not None:
|
|
|
|
self.vm.event.pdirty = False
|
|
|
|
|
|
|
|
val = values[f"STRIP {index}||SLIDER {param}"]
|
|
|
|
val = values[f"STRIP {index}||SLIDER {param}"]
|
|
|
|
label = self.cache["labels"][f"STRIP {index}||LABEL"]
|
|
|
|
label = self.cache["labels"][f"STRIP {index}||LABEL"]
|
|
|
|
self.nvda.speak(f"{label} {param} {int(val) if param == 'LIMIT' else val}")
|
|
|
|
self.nvda.speak(f"{label} {param} {int(val) if param == 'LIMIT' else val}")
|
|
|
|
@@ -713,7 +737,7 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
],
|
|
|
|
],
|
|
|
|
["FOCUS", "OUT"],
|
|
|
|
["FOCUS", "OUT"],
|
|
|
|
]:
|
|
|
|
]:
|
|
|
|
self.vm.event.pdirty = True
|
|
|
|
pass
|
|
|
|
case [
|
|
|
|
case [
|
|
|
|
["STRIP", index],
|
|
|
|
["STRIP", index],
|
|
|
|
[
|
|
|
|
[
|
|
|
|
@@ -728,8 +752,10 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
| "MID"
|
|
|
|
| "MID"
|
|
|
|
| "TREBLE" as param,
|
|
|
|
| "TREBLE" as param,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
["KEY", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
|
|
|
["KEY", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction, "PRESS" | "RELEASE" as e],
|
|
|
|
]:
|
|
|
|
]:
|
|
|
|
|
|
|
|
if e == "PRESS":
|
|
|
|
|
|
|
|
self.vm.event.pdirty = False
|
|
|
|
match param:
|
|
|
|
match param:
|
|
|
|
case "GAIN":
|
|
|
|
case "GAIN":
|
|
|
|
val = self.vm.strip[int(index)].gain
|
|
|
|
val = self.vm.strip[int(index)].gain
|
|
|
|
@@ -771,6 +797,8 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
self.vm.strip[int(index)].limit = val
|
|
|
|
self.vm.strip[int(index)].limit = val
|
|
|
|
self[f"STRIP {index}||SLIDER {param}"].update(value=val)
|
|
|
|
self[f"STRIP {index}||SLIDER {param}"].update(value=val)
|
|
|
|
self.nvda.speak(str(val))
|
|
|
|
self.nvda.speak(str(val))
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
self.vm.event.pdirty = True
|
|
|
|
case [
|
|
|
|
case [
|
|
|
|
["STRIP", index],
|
|
|
|
["STRIP", index],
|
|
|
|
[
|
|
|
|
[
|
|
|
|
@@ -785,8 +813,10 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
| "MID"
|
|
|
|
| "MID"
|
|
|
|
| "TREBLE" as param,
|
|
|
|
| "TREBLE" as param,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
["KEY", "CTRL", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
|
|
|
["KEY", "CTRL", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction, "PRESS" | "RELEASE" as e],
|
|
|
|
]:
|
|
|
|
]:
|
|
|
|
|
|
|
|
if e == "PRESS":
|
|
|
|
|
|
|
|
self.vm.event.pdirty = False
|
|
|
|
match param:
|
|
|
|
match param:
|
|
|
|
case "GAIN":
|
|
|
|
case "GAIN":
|
|
|
|
val = self.vm.strip[int(index)].gain
|
|
|
|
val = self.vm.strip[int(index)].gain
|
|
|
|
@@ -834,6 +864,8 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
self.vm.strip[int(index)].limit = val
|
|
|
|
self.vm.strip[int(index)].limit = val
|
|
|
|
self[f"STRIP {index}||SLIDER {param}"].update(value=val)
|
|
|
|
self[f"STRIP {index}||SLIDER {param}"].update(value=val)
|
|
|
|
self.nvda.speak(f"{param} {val}")
|
|
|
|
self.nvda.speak(f"{param} {val}")
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
self.vm.event.pdirty = True
|
|
|
|
case [
|
|
|
|
case [
|
|
|
|
["STRIP", index],
|
|
|
|
["STRIP", index],
|
|
|
|
[
|
|
|
|
[
|
|
|
|
@@ -848,8 +880,10 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
| "MID"
|
|
|
|
| "MID"
|
|
|
|
| "TREBLE" as param,
|
|
|
|
| "TREBLE" as param,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
["KEY", "SHIFT", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
|
|
|
["KEY", "SHIFT", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction, "PRESS" | "RELEASE" as e],
|
|
|
|
]:
|
|
|
|
]:
|
|
|
|
|
|
|
|
if e == "PRESS":
|
|
|
|
|
|
|
|
self.vm.event.pdirty = False
|
|
|
|
match param:
|
|
|
|
match param:
|
|
|
|
case "GAIN":
|
|
|
|
case "GAIN":
|
|
|
|
val = self.vm.strip[int(index)].gain
|
|
|
|
val = self.vm.strip[int(index)].gain
|
|
|
|
@@ -897,6 +931,8 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
self.vm.strip[int(index)].limit = val
|
|
|
|
self.vm.strip[int(index)].limit = val
|
|
|
|
self[f"STRIP {index}||SLIDER {param}"].update(value=val)
|
|
|
|
self[f"STRIP {index}||SLIDER {param}"].update(value=val)
|
|
|
|
self.nvda.speak(f"{param} {val}")
|
|
|
|
self.nvda.speak(f"{param} {val}")
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
self.vm.event.pdirty = True
|
|
|
|
case [["STRIP", index], ["SLIDER", param], ["KEY", "CTRL", "SHIFT", "R"]]:
|
|
|
|
case [["STRIP", index], ["SLIDER", param], ["KEY", "CTRL", "SHIFT", "R"]]:
|
|
|
|
match param:
|
|
|
|
match param:
|
|
|
|
case "GAIN":
|
|
|
|
case "GAIN":
|
|
|
|
@@ -982,13 +1018,18 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
self.vm.bus[int(index)].gain = val
|
|
|
|
self.vm.bus[int(index)].gain = val
|
|
|
|
case [["BUS", index], ["SLIDER", "GAIN"], ["FOCUS", "IN"]]:
|
|
|
|
case [["BUS", index], ["SLIDER", "GAIN"], ["FOCUS", "IN"]]:
|
|
|
|
if self.find_element_with_focus() is not None:
|
|
|
|
if self.find_element_with_focus() is not None:
|
|
|
|
self.vm.event.pdirty = False
|
|
|
|
|
|
|
|
label = self.cache["labels"][f"BUS {index}||LABEL"]
|
|
|
|
label = self.cache["labels"][f"BUS {index}||LABEL"]
|
|
|
|
val = values[f"BUS {index}||SLIDER GAIN"]
|
|
|
|
val = values[f"BUS {index}||SLIDER GAIN"]
|
|
|
|
self.nvda.speak(f"{label} gain {val}")
|
|
|
|
self.nvda.speak(f"{label} gain {val}")
|
|
|
|
case [["BUS", index], ["SLIDER", "GAIN"], ["FOCUS", "OUT"]]:
|
|
|
|
case [["BUS", index], ["SLIDER", "GAIN"], ["FOCUS", "OUT"]]:
|
|
|
|
self.vm.event.pdirty = True
|
|
|
|
pass
|
|
|
|
case [["BUS", index], ["SLIDER", "GAIN"], ["KEY", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction]]:
|
|
|
|
case [
|
|
|
|
|
|
|
|
["BUS", index],
|
|
|
|
|
|
|
|
["SLIDER", "GAIN"],
|
|
|
|
|
|
|
|
["KEY", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction, "PRESS" | "RELEASE" as e],
|
|
|
|
|
|
|
|
]:
|
|
|
|
|
|
|
|
if e == "PRESS":
|
|
|
|
|
|
|
|
self.vm.event.pdirty = False
|
|
|
|
val = self.vm.bus[int(index)].gain
|
|
|
|
val = self.vm.bus[int(index)].gain
|
|
|
|
match direction:
|
|
|
|
match direction:
|
|
|
|
case "RIGHT" | "UP":
|
|
|
|
case "RIGHT" | "UP":
|
|
|
|
@@ -999,11 +1040,15 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
self.vm.bus[int(index)].gain = val
|
|
|
|
self.vm.bus[int(index)].gain = val
|
|
|
|
self[f"BUS {index}||SLIDER GAIN"].update(value=val)
|
|
|
|
self[f"BUS {index}||SLIDER GAIN"].update(value=val)
|
|
|
|
self.nvda.speak(str(val))
|
|
|
|
self.nvda.speak(str(val))
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
self.vm.event.pdirty = True
|
|
|
|
case [
|
|
|
|
case [
|
|
|
|
["BUS", index],
|
|
|
|
["BUS", index],
|
|
|
|
["SLIDER", "GAIN"],
|
|
|
|
["SLIDER", "GAIN"],
|
|
|
|
["KEY", "CTRL", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
|
|
|
["KEY", "CTRL", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction, "PRESS" | "RELEASE" as e],
|
|
|
|
]:
|
|
|
|
]:
|
|
|
|
|
|
|
|
if e == "PRESS":
|
|
|
|
|
|
|
|
self.vm.event.pdirty = False
|
|
|
|
val = self.vm.bus[int(index)].gain
|
|
|
|
val = self.vm.bus[int(index)].gain
|
|
|
|
match direction:
|
|
|
|
match direction:
|
|
|
|
case "RIGHT" | "UP":
|
|
|
|
case "RIGHT" | "UP":
|
|
|
|
@@ -1014,11 +1059,15 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
self.vm.bus[int(index)].gain = val
|
|
|
|
self.vm.bus[int(index)].gain = val
|
|
|
|
self[f"BUS {index}||SLIDER GAIN"].update(value=val)
|
|
|
|
self[f"BUS {index}||SLIDER GAIN"].update(value=val)
|
|
|
|
self.nvda.speak(str(val))
|
|
|
|
self.nvda.speak(str(val))
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
self.vm.event.pdirty = True
|
|
|
|
case [
|
|
|
|
case [
|
|
|
|
["BUS", index],
|
|
|
|
["BUS", index],
|
|
|
|
["SLIDER", "GAIN"],
|
|
|
|
["SLIDER", "GAIN"],
|
|
|
|
["KEY", "SHIFT", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
|
|
|
["KEY", "SHIFT", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction, "PRESS" | "RELEASE" as e],
|
|
|
|
]:
|
|
|
|
]:
|
|
|
|
|
|
|
|
if e == "PRESS":
|
|
|
|
|
|
|
|
self.vm.event.pdirty = False
|
|
|
|
val = self.vm.bus[int(index)].gain
|
|
|
|
val = self.vm.bus[int(index)].gain
|
|
|
|
match direction:
|
|
|
|
match direction:
|
|
|
|
case "RIGHT" | "UP":
|
|
|
|
case "RIGHT" | "UP":
|
|
|
|
@@ -1029,6 +1078,8 @@ class NVDAVMWindow(psg.Window):
|
|
|
|
self.vm.bus[int(index)].gain = val
|
|
|
|
self.vm.bus[int(index)].gain = val
|
|
|
|
self[f"BUS {index}||SLIDER GAIN"].update(value=val)
|
|
|
|
self[f"BUS {index}||SLIDER GAIN"].update(value=val)
|
|
|
|
self.nvda.speak(str(val))
|
|
|
|
self.nvda.speak(str(val))
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
self.vm.event.pdirty = True
|
|
|
|
case [["BUS", index], ["SLIDER", "GAIN"], ["KEY", "CTRL", "SHIFT", "R"]]:
|
|
|
|
case [["BUS", index], ["SLIDER", "GAIN"], ["KEY", "CTRL", "SHIFT", "R"]]:
|
|
|
|
self.vm.bus[int(index)].gain = 0
|
|
|
|
self.vm.bus[int(index)].gain = 0
|
|
|
|
self[f"BUS {index}||SLIDER GAIN"].update(value=0)
|
|
|
|
self[f"BUS {index}||SLIDER GAIN"].update(value=0)
|
|
|
|
|