mirror of
https://github.com/onyx-and-iris/nvda-voicemeeter.git
synced 2024-11-22 18:00:50 +00:00
use gain getters.
This commit is contained in:
parent
e35bad9e1e
commit
ba1fb28187
@ -691,43 +691,39 @@ class NVDAVMWindow(psg.Window):
|
|||||||
case [["STRIP", index], ["SLIDER", "GAIN"], ["FOCUS", "OUT"]]:
|
case [["STRIP", index], ["SLIDER", "GAIN"], ["FOCUS", "OUT"]]:
|
||||||
self.vm.event.pdirty = True
|
self.vm.event.pdirty = True
|
||||||
case [["STRIP", index], ["SLIDER", "GAIN"], ["KEY", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction]]:
|
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:
|
match direction:
|
||||||
case "LEFT":
|
case "RIGHT" | "UP":
|
||||||
val -= 0.9
|
val += 1
|
||||||
case "DOWN":
|
case "LEFT" | "DOWN":
|
||||||
val -= 1.1
|
val -= 1
|
||||||
case "RIGHT":
|
self.vm.strip[int(index)].gain = val
|
||||||
val += 0.9
|
|
||||||
case "UP":
|
|
||||||
val += 1.1
|
|
||||||
self[f"STRIP {index}||SLIDER GAIN"].update(value=val)
|
self[f"STRIP {index}||SLIDER GAIN"].update(value=val)
|
||||||
case [
|
case [
|
||||||
["STRIP", index],
|
["STRIP", index],
|
||||||
["SLIDER", "GAIN"],
|
["SLIDER", "GAIN"],
|
||||||
["KEY", "CTRL", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
["KEY", "CTRL", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
||||||
]:
|
]:
|
||||||
val = values[f"STRIP {index}||SLIDER GAIN"]
|
val = self.vm.strip[int(index)].gain
|
||||||
match direction:
|
match direction:
|
||||||
case "LEFT":
|
case "RIGHT" | "UP":
|
||||||
val += 4.2
|
val += 3
|
||||||
case "DOWN":
|
case "LEFT" | "DOWN":
|
||||||
val -= 10.2
|
val -= 3
|
||||||
case "RIGHT":
|
self.vm.strip[int(index)].gain = val
|
||||||
val -= 4.2
|
|
||||||
case "UP":
|
|
||||||
val += 10.2
|
|
||||||
self[f"STRIP {index}||SLIDER GAIN"].update(value=val)
|
self[f"STRIP {index}||SLIDER GAIN"].update(value=val)
|
||||||
case [
|
case [
|
||||||
["STRIP", index],
|
["STRIP", index],
|
||||||
["SLIDER", "GAIN"],
|
["SLIDER", "GAIN"],
|
||||||
["KEY", "SHIFT", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
["KEY", "SHIFT", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
||||||
]:
|
]:
|
||||||
val = values[f"STRIP {index}||SLIDER GAIN"]
|
val = self.vm.strip[int(index)].gain
|
||||||
if direction == "UP":
|
match direction:
|
||||||
val += 0.2
|
case "RIGHT" | "UP":
|
||||||
elif direction == "DOWN":
|
val += 0.1
|
||||||
val -= 0.2
|
case "LEFT" | "DOWN":
|
||||||
|
val -= 0.1
|
||||||
|
self.vm.strip[int(index)].gain = val
|
||||||
self[f"STRIP {index}||SLIDER GAIN"].update(value=val)
|
self[f"STRIP {index}||SLIDER GAIN"].update(value=val)
|
||||||
|
|
||||||
# Bus Params
|
# Bus Params
|
||||||
@ -804,43 +800,39 @@ class NVDAVMWindow(psg.Window):
|
|||||||
case [["BUS", index], ["SLIDER", "GAIN"], ["FOCUS", "OUT"]]:
|
case [["BUS", index], ["SLIDER", "GAIN"], ["FOCUS", "OUT"]]:
|
||||||
self.vm.event.pdirty = True
|
self.vm.event.pdirty = True
|
||||||
case [["BUS", index], ["SLIDER", "GAIN"], ["KEY", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction]]:
|
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:
|
match direction:
|
||||||
case "LEFT":
|
case "RIGHT" | "UP":
|
||||||
val -= 0.9
|
val += 1
|
||||||
case "DOWN":
|
case "LEFT" | "DOWN":
|
||||||
val -= 1.1
|
val -= 1
|
||||||
case "RIGHT":
|
self.vm.bus[int(index)].gain = val
|
||||||
val += 0.9
|
|
||||||
case "UP":
|
|
||||||
val += 1.1
|
|
||||||
self[f"BUS {index}||SLIDER GAIN"].update(value=val)
|
self[f"BUS {index}||SLIDER GAIN"].update(value=val)
|
||||||
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],
|
||||||
]:
|
]:
|
||||||
val = values[f"BUS {index}||SLIDER GAIN"]
|
val = self.vm.bus[int(index)].gain
|
||||||
match direction:
|
match direction:
|
||||||
case "LEFT":
|
case "RIGHT" | "UP":
|
||||||
val += 4.2
|
val += 3
|
||||||
case "DOWN":
|
case "LEFT" | "DOWN":
|
||||||
val -= 10.2
|
val -= 3
|
||||||
case "RIGHT":
|
self.vm.bus[int(index)].gain = val
|
||||||
val -= 4.2
|
|
||||||
case "UP":
|
|
||||||
val += 10.2
|
|
||||||
self[f"BUS {index}||SLIDER GAIN"].update(value=val)
|
self[f"BUS {index}||SLIDER GAIN"].update(value=val)
|
||||||
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],
|
||||||
]:
|
]:
|
||||||
val = values[f"BUS {index}||SLIDER GAIN"]
|
val = self.vm.bus[int(index)].gain
|
||||||
if direction == "UP":
|
match direction:
|
||||||
val += 0.2
|
case "RIGHT" | "UP":
|
||||||
elif direction == "DOWN":
|
val += 0.1
|
||||||
val -= 0.2
|
case "LEFT" | "DOWN":
|
||||||
|
val -= 0.1
|
||||||
|
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)
|
||||||
|
|
||||||
# Unknown
|
# Unknown
|
||||||
|
Loading…
Reference in New Issue
Block a user