mirror of
https://github.com/onyx-and-iris/nvda-voicemeeter.git
synced 2025-04-11 08:03:47 +01:00
Compare commits
3 Commits
e35bad9e1e
...
719328c6de
Author | SHA1 | Date | |
---|---|---|---|
719328c6de | |||
65a148aa7b | |||
ba1fb28187 |
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "nvda_voicemeeter"
|
||||
version = "0.2.1a1"
|
||||
version = "0.2.1a3"
|
||||
description = "A Voicemeeter app compatible with NVDA"
|
||||
authors = [
|
||||
{ name = "onyx-and-iris", email = "code@onyxandiris.online" },
|
||||
|
@ -128,3 +128,12 @@ def get_bus_modes(vm) -> list:
|
||||
"lfeonly",
|
||||
"rearonly",
|
||||
]
|
||||
|
||||
|
||||
def check_bounds(val, bounds):
|
||||
lower, upper = bounds
|
||||
if val > upper:
|
||||
val = upper
|
||||
elif val < lower:
|
||||
val = lower
|
||||
return val
|
||||
|
@ -17,6 +17,7 @@ from .nvda import Nvda
|
||||
from .parser import Parser
|
||||
from .util import (
|
||||
_patch_insert_channels,
|
||||
check_bounds,
|
||||
get_asio_checkbox_index,
|
||||
get_asio_samples_list,
|
||||
get_bus_modes,
|
||||
@ -691,43 +692,39 @@ class NVDAVMWindow(psg.Window):
|
||||
case [["STRIP", index], ["SLIDER", "GAIN"], ["FOCUS", "OUT"]]:
|
||||
self.vm.event.pdirty = True
|
||||
case [["STRIP", index], ["SLIDER", "GAIN"], ["KEY", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction]]:
|
||||
val = values[f"STRIP {index}||SLIDER GAIN"]
|
||||
val = self.vm.strip[int(index)].gain
|
||||
match direction:
|
||||
case "LEFT":
|
||||
val -= 0.9
|
||||
case "DOWN":
|
||||
val -= 1.1
|
||||
case "RIGHT":
|
||||
val += 0.9
|
||||
case "UP":
|
||||
val += 1.1
|
||||
case "RIGHT" | "UP":
|
||||
val += 1
|
||||
case "LEFT" | "DOWN":
|
||||
val -= 1
|
||||
self.vm.strip[int(index)].gain = check_bounds(val, (-60, 12))
|
||||
self[f"STRIP {index}||SLIDER GAIN"].update(value=val)
|
||||
case [
|
||||
["STRIP", index],
|
||||
["SLIDER", "GAIN"],
|
||||
["KEY", "CTRL", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
||||
]:
|
||||
val = values[f"STRIP {index}||SLIDER GAIN"]
|
||||
val = self.vm.strip[int(index)].gain
|
||||
match direction:
|
||||
case "LEFT":
|
||||
val += 4.2
|
||||
case "DOWN":
|
||||
val -= 10.2
|
||||
case "RIGHT":
|
||||
val -= 4.2
|
||||
case "UP":
|
||||
val += 10.2
|
||||
case "RIGHT" | "UP":
|
||||
val += 3
|
||||
case "LEFT" | "DOWN":
|
||||
val -= 3
|
||||
self.vm.strip[int(index)].gain = check_bounds(val, (-60, 12))
|
||||
self[f"STRIP {index}||SLIDER GAIN"].update(value=val)
|
||||
case [
|
||||
["STRIP", index],
|
||||
["SLIDER", "GAIN"],
|
||||
["KEY", "SHIFT", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
||||
]:
|
||||
val = values[f"STRIP {index}||SLIDER GAIN"]
|
||||
if direction == "UP":
|
||||
val += 0.2
|
||||
elif direction == "DOWN":
|
||||
val -= 0.2
|
||||
val = self.vm.strip[int(index)].gain
|
||||
match direction:
|
||||
case "RIGHT" | "UP":
|
||||
val += 0.1
|
||||
case "LEFT" | "DOWN":
|
||||
val -= 0.1
|
||||
self.vm.strip[int(index)].gain = check_bounds(val, (-60, 12))
|
||||
self[f"STRIP {index}||SLIDER GAIN"].update(value=val)
|
||||
|
||||
# Bus Params
|
||||
@ -804,43 +801,39 @@ class NVDAVMWindow(psg.Window):
|
||||
case [["BUS", index], ["SLIDER", "GAIN"], ["FOCUS", "OUT"]]:
|
||||
self.vm.event.pdirty = True
|
||||
case [["BUS", index], ["SLIDER", "GAIN"], ["KEY", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction]]:
|
||||
val = values[f"BUS {index}||SLIDER GAIN"]
|
||||
val = self.vm.bus[int(index)].gain
|
||||
match direction:
|
||||
case "LEFT":
|
||||
val -= 0.9
|
||||
case "DOWN":
|
||||
val -= 1.1
|
||||
case "RIGHT":
|
||||
val += 0.9
|
||||
case "UP":
|
||||
val += 1.1
|
||||
case "RIGHT" | "UP":
|
||||
val += 1
|
||||
case "LEFT" | "DOWN":
|
||||
val -= 1
|
||||
self.vm.bus[int(index)].gain = check_bounds(val, (-60, 12))
|
||||
self[f"BUS {index}||SLIDER GAIN"].update(value=val)
|
||||
case [
|
||||
["BUS", index],
|
||||
["SLIDER", "GAIN"],
|
||||
["KEY", "CTRL", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
||||
]:
|
||||
val = values[f"BUS {index}||SLIDER GAIN"]
|
||||
val = self.vm.bus[int(index)].gain
|
||||
match direction:
|
||||
case "LEFT":
|
||||
val += 4.2
|
||||
case "DOWN":
|
||||
val -= 10.2
|
||||
case "RIGHT":
|
||||
val -= 4.2
|
||||
case "UP":
|
||||
val += 10.2
|
||||
case "RIGHT" | "UP":
|
||||
val += 3
|
||||
case "LEFT" | "DOWN":
|
||||
val -= 3
|
||||
self.vm.bus[int(index)].gain = check_bounds(val, (-60, 12))
|
||||
self[f"BUS {index}||SLIDER GAIN"].update(value=val)
|
||||
case [
|
||||
["BUS", index],
|
||||
["SLIDER", "GAIN"],
|
||||
["KEY", "SHIFT", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
||||
]:
|
||||
val = values[f"BUS {index}||SLIDER GAIN"]
|
||||
if direction == "UP":
|
||||
val += 0.2
|
||||
elif direction == "DOWN":
|
||||
val -= 0.2
|
||||
val = self.vm.bus[int(index)].gain
|
||||
match direction:
|
||||
case "RIGHT" | "UP":
|
||||
val += 0.1
|
||||
case "LEFT" | "DOWN":
|
||||
val -= 0.1
|
||||
self.vm.bus[int(index)].gain = check_bounds(val, (-60, 12))
|
||||
self[f"BUS {index}||SLIDER GAIN"].update(value=val)
|
||||
|
||||
# Unknown
|
||||
|
Loading…
x
Reference in New Issue
Block a user