mirror of
https://github.com/onyx-and-iris/nvda-voicemeeter.git
synced 2024-11-22 10:00:46 +00:00
defines bass,mid,treble ctrl events
This commit is contained in:
parent
6c54d28210
commit
42fad86905
@ -754,8 +754,6 @@ class NVDAVMWindow(psg.Window):
|
||||
match param:
|
||||
case "GAIN":
|
||||
val = self.vm.strip[int(index)].gain
|
||||
case "LIMIT":
|
||||
val = self.vm.strip[int(index)].limit
|
||||
case "COMP" | "GATE" | "DENOISER":
|
||||
target = getattr(self.vm.strip[int(index)], param.lower())
|
||||
val = target.knob
|
||||
@ -763,6 +761,8 @@ class NVDAVMWindow(psg.Window):
|
||||
val = self.vm.strip[int(index)].audibility
|
||||
case "BASS" | "MID" | "TREBLE":
|
||||
val = getattr(self.vm.strip[int(index)], param.lower())
|
||||
case "LIMIT":
|
||||
val = self.vm.strip[int(index)].limit
|
||||
|
||||
match direction:
|
||||
case "RIGHT" | "UP":
|
||||
@ -774,9 +774,6 @@ class NVDAVMWindow(psg.Window):
|
||||
case "GAIN":
|
||||
self.vm.strip[int(index)].gain = util.check_bounds(val, (-60, 12))
|
||||
self[f"STRIP {index}||SLIDER {param}"].update(value=util.check_bounds(val, (-60, 12)))
|
||||
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 "COMP" | "GATE" | "DENOISER":
|
||||
setattr(target, "knob", util.check_bounds(val, (0, 10)))
|
||||
self[f"STRIP {index}||SLIDER {param}"].update(value=util.check_bounds(val, (0, 10)))
|
||||
@ -786,9 +783,23 @@ class NVDAVMWindow(psg.Window):
|
||||
case "BASS" | "MID" | "TREBLE":
|
||||
setattr(self.vm.strip[int(index)], param.lower(), util.check_bounds(val, (-12, 12)))
|
||||
self[f"STRIP {index}||SLIDER {param}"].update(value=util.check_bounds(val, (-12, 12)))
|
||||
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", "GAIN" | "COMP" | "GATE" | "DENOISER" | "LIMIT" | "BASS" | "MID" | "TREBLE" as param],
|
||||
[
|
||||
"SLIDER",
|
||||
"GAIN"
|
||||
| "COMP"
|
||||
| "GATE"
|
||||
| "DENOISER"
|
||||
| "AUDIBILITY"
|
||||
| "LIMIT"
|
||||
| "BASS"
|
||||
| "MID"
|
||||
| "TREBLE" as param,
|
||||
],
|
||||
["KEY", "CTRL", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
||||
]:
|
||||
match param:
|
||||
@ -797,17 +808,21 @@ class NVDAVMWindow(psg.Window):
|
||||
case "COMP" | "GATE" | "DENOISER":
|
||||
target = getattr(self.vm.strip[int(index)], param.lower())
|
||||
val = target.knob
|
||||
case "AUDIBILITY":
|
||||
val = self.vm.strip[int(index)].audibility
|
||||
case "BASS" | "MID" | "TREBLE":
|
||||
val = getattr(self.vm.strip[int(index)], param.lower())
|
||||
case "LIMIT":
|
||||
val = self.vm.strip[int(index)].limit
|
||||
|
||||
match direction:
|
||||
case "RIGHT" | "UP":
|
||||
if param in ("COMP", "GATE", "DENOISER", "BASS", "MID", "TREBLE"):
|
||||
if param in ("COMP", "GATE", "DENOISER", "AUDIBILITY", "BASS", "MID", "TREBLE"):
|
||||
val += 1
|
||||
else:
|
||||
val += 3
|
||||
case "LEFT" | "DOWN":
|
||||
if param in ("COMP", "GATE", "DENOISER", "BASS", "MID", "TREBLE"):
|
||||
if param in ("COMP", "GATE", "DENOISER", "AUDIBILITY", "BASS", "MID", "TREBLE"):
|
||||
val -= 1
|
||||
else:
|
||||
val -= 3
|
||||
@ -819,6 +834,9 @@ class NVDAVMWindow(psg.Window):
|
||||
case "COMP" | "GATE" | "DENOISER":
|
||||
setattr(target, "knob", util.check_bounds(val, (0, 10)))
|
||||
self[f"STRIP {index}||SLIDER {param}"].update(value=util.check_bounds(val, (0, 10)))
|
||||
case "AUDIBILITY":
|
||||
self.vm.strip[int(index)].audibility = util.check_bounds(val, (0, 10))
|
||||
self[f"STRIP {index}||SLIDER {param}"].update(value=util.check_bounds(val, (0, 10)))
|
||||
case "BASS" | "MID" | "TREBLE":
|
||||
setattr(self.vm.strip[int(index)], param.lower(), util.check_bounds(val, (-12, 12)))
|
||||
self[f"STRIP {index}||SLIDER {param}"].update(value=util.check_bounds(val, (-12, 12)))
|
||||
@ -827,7 +845,18 @@ class NVDAVMWindow(psg.Window):
|
||||
self[f"STRIP {index}||SLIDER {param}"].update(value=util.check_bounds(val, (-40, 12)))
|
||||
case [
|
||||
["STRIP", index],
|
||||
["SLIDER", "GAIN" | "COMP" | "GATE" | "DENOISER" | "AUDIBILITY" | "LIMIT" as param],
|
||||
[
|
||||
"SLIDER",
|
||||
"GAIN"
|
||||
| "COMP"
|
||||
| "GATE"
|
||||
| "DENOISER"
|
||||
| "AUDIBILITY"
|
||||
| "LIMIT"
|
||||
| "BASS"
|
||||
| "MID"
|
||||
| "TREBLE" as param,
|
||||
],
|
||||
["KEY", "SHIFT", "LEFT" | "RIGHT" | "UP" | "DOWN" as direction],
|
||||
]:
|
||||
match param:
|
||||
@ -838,6 +867,8 @@ class NVDAVMWindow(psg.Window):
|
||||
val = target.knob
|
||||
case "AUDIBILITY":
|
||||
val = self.vm.strip[int(index)].audibility
|
||||
case "BASS" | "MID" | "TREBLE":
|
||||
val = getattr(self.vm.strip[int(index)], param.lower())
|
||||
case "LIMIT":
|
||||
val = self.vm.strip[int(index)].limit
|
||||
|
||||
@ -863,6 +894,9 @@ class NVDAVMWindow(psg.Window):
|
||||
case "AUDIBILITY":
|
||||
self.vm.strip[int(index)].audibility = util.check_bounds(val, (0, 10))
|
||||
self[f"STRIP {index}||SLIDER {param}"].update(value=util.check_bounds(val, (0, 10)))
|
||||
case "BASS" | "MID" | "TREBLE":
|
||||
setattr(self.vm.strip[int(index)], param.lower(), util.check_bounds(val, (-12, 12)))
|
||||
self[f"STRIP {index}||SLIDER {param}"].update(value=util.check_bounds(val, (-12, 12)))
|
||||
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)))
|
||||
|
Loading…
Reference in New Issue
Block a user