From d722154325d02b321da3e580ec4653c5a222cfbc Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Mon, 18 Sep 2023 09:12:12 +0100 Subject: [PATCH] adds ctrl+shift+r slider reset bind closes #9 patch bump --- pyproject.toml | 2 +- src/nvda_voicemeeter/window.py | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e75d469..428ad7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nvda_voicemeeter" -version = "0.2.1b2" +version = "0.2.2" description = "A Voicemeeter app compatible with NVDA" authors = [ { name = "onyx-and-iris", email = "code@onyxandiris.online" }, diff --git a/src/nvda_voicemeeter/window.py b/src/nvda_voicemeeter/window.py index f5a3561..e7a2d9c 100644 --- a/src/nvda_voicemeeter/window.py +++ b/src/nvda_voicemeeter/window.py @@ -216,6 +216,7 @@ class NVDAVMWindow(psg.Window): self[f"STRIP {i}||SLIDER {param}"].bind("", "||KEY SHIFT DOWN") self[f"STRIP {i}||SLIDER {param}"].bind("", "||KEY CTRL UP") self[f"STRIP {i}||SLIDER {param}"].bind("", "||KEY CTRL DOWN") + self[f"STRIP {i}||SLIDER {param}"].bind("", "||KEY CTRL SHIFT R") # Bus Params params = ["MONO", "EQ", "MUTE", "MODE"] @@ -242,6 +243,7 @@ class NVDAVMWindow(psg.Window): self[f"BUS {i}||SLIDER GAIN"].bind("", "||KEY SHIFT DOWN") self[f"BUS {i}||SLIDER GAIN"].bind("", "||KEY CTRL UP") self[f"BUS {i}||SLIDER GAIN"].bind("", "||KEY CTRL DOWN") + self[f"BUS {i}||SLIDER GAIN"].bind("", "||KEY CTRL SHIFT R") def popup_save_as(self, message, title=None, initial_folder=None): layout = [ @@ -903,6 +905,23 @@ class NVDAVMWindow(psg.Window): case "LIMIT": self.vm.strip[int(index)].limit = util.check_bounds(val, (-40, 12)) self[f"STRIP {index}||SLIDER {param}"].update(value=util.check_bounds(val, (-40, 12))) + case [["STRIP", index], ["SLIDER", param], ["KEY", "CTRL", "SHIFT", "R"]]: + match param: + case "GAIN": + self.vm.strip[int(index)].gain = 0 + self[f"STRIP {index}||SLIDER {param}"].update(value=0) + case "COMP" | "GATE" | "DENOISER": + setattr(target, "knob", 0) + self[f"STRIP {index}||SLIDER {param}"].update(value=0) + case "AUDIBILITY": + self.vm.strip[int(index)].audibility = 0 + self[f"STRIP {index}||SLIDER {param}"].update(value=0) + case "BASS" | "MID" | "TREBLE": + setattr(self.vm.strip[int(index)], param.lower(), 0) + self[f"STRIP {index}||SLIDER {param}"].update(value=0) + case "LIMIT": + self.vm.strip[int(index)].limit = 12 + self[f"STRIP {index}||SLIDER {param}"].update(value=12) # Bus Params case [["BUS", index], [param]]: @@ -1012,6 +1031,9 @@ class NVDAVMWindow(psg.Window): val -= 0.1 self.vm.bus[int(index)].gain = util.check_bounds(val, (-60, 12)) self[f"BUS {index}||SLIDER GAIN"].update(value=val) + case [["BUS", index], ["SLIDER", "GAIN"], ["KEY", "CTRL", "SHIFT", "R"]]: + self.vm.bus[int(index)].gain = 0 + self[f"BUS {index}||SLIDER GAIN"].update(value=0) # Unknown case _: