mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2026-01-24 17:27:48 +00:00
implement {strip}.gate
This commit is contained in:
parent
e37dea38b3
commit
cc58d1f081
@ -260,7 +260,7 @@ class CompressorSettings(NamedTuple):
|
||||
attack_ms: float
|
||||
release_ms: float
|
||||
n_knee: float
|
||||
comprate: float
|
||||
ratio: float
|
||||
threshold: float
|
||||
c_enabled: bool
|
||||
makeup: bool
|
||||
@ -268,9 +268,9 @@ class CompressorSettings(NamedTuple):
|
||||
|
||||
|
||||
class GateSettings(NamedTuple):
|
||||
dBThreshold_in: float
|
||||
dBDamping_max: float
|
||||
BP_Sidechain: bool
|
||||
threshold_in: float
|
||||
damping_max: float
|
||||
bp_sidechain: bool
|
||||
attack_ms: float
|
||||
hold_ms: float
|
||||
release_ms: float
|
||||
@ -473,7 +473,7 @@ class VbanVMParamStrip:
|
||||
attack_ms=round(int.from_bytes(self._COMP_attack_ms, 'little') * 0.1, 2),
|
||||
release_ms=round(int.from_bytes(self._COMP_release_ms, 'little') * 0.1, 2),
|
||||
n_knee=round(int.from_bytes(self._COMP_n_knee, 'little') * 0.01, 2),
|
||||
comprate=round(int.from_bytes(self._COMP_comprate, 'little') * 0.01, 2),
|
||||
ratio=round(int.from_bytes(self._COMP_comprate, 'little') * 0.01, 2),
|
||||
threshold=round(
|
||||
int.from_bytes(self._COMP_threshold, 'little', signed=True) * 0.01, 2
|
||||
),
|
||||
@ -487,15 +487,15 @@ class VbanVMParamStrip:
|
||||
@property
|
||||
def gate(self) -> GateSettings:
|
||||
return GateSettings(
|
||||
dBThreshold_in=round(
|
||||
threshold_in=round(
|
||||
int.from_bytes(self._GATE_dBThreshold_in, 'little', signed=True) * 0.01,
|
||||
2,
|
||||
),
|
||||
dBDamping_max=round(
|
||||
damping_max=round(
|
||||
int.from_bytes(self._GATE_dBDamping_max, 'little', signed=True) * 0.01,
|
||||
2,
|
||||
),
|
||||
BP_Sidechain=round(
|
||||
bp_sidechain=round(
|
||||
int.from_bytes(self._GATE_BP_Sidechain, 'little') * 0.1, 2
|
||||
),
|
||||
attack_ms=round(int.from_bytes(self._GATE_attack_ms, 'little') * 0.1, 2),
|
||||
|
||||
@ -115,7 +115,7 @@ class StripComp(IRemote):
|
||||
def ratio(self) -> float:
|
||||
if self.public_packets[NBS.one] is None:
|
||||
return 0.0
|
||||
return self.public_packets[NBS.one].strips[self.index].compressor.comprate
|
||||
return self.public_packets[NBS.one].strips[self.index].compressor.ratio
|
||||
|
||||
@ratio.setter
|
||||
def ratio(self, val: float):
|
||||
@ -199,7 +199,9 @@ class StripGate(IRemote):
|
||||
|
||||
@property
|
||||
def threshold(self) -> float:
|
||||
return
|
||||
if self.public_packets[NBS.one] is None:
|
||||
return 0.0
|
||||
return self.public_packets[NBS.one].strips[self.index].gate.threshold_in
|
||||
|
||||
@threshold.setter
|
||||
def threshold(self, val: float):
|
||||
@ -207,7 +209,9 @@ class StripGate(IRemote):
|
||||
|
||||
@property
|
||||
def damping(self) -> float:
|
||||
return
|
||||
if self.public_packets[NBS.one] is None:
|
||||
return 0.0
|
||||
return self.public_packets[NBS.one].strips[self.index].gate.damping_max
|
||||
|
||||
@damping.setter
|
||||
def damping(self, val: float):
|
||||
@ -215,7 +219,9 @@ class StripGate(IRemote):
|
||||
|
||||
@property
|
||||
def bpsidechain(self) -> int:
|
||||
return
|
||||
if self.public_packets[NBS.one] is None:
|
||||
return 0
|
||||
return self.public_packets[NBS.one].strips[self.index].gate.bp_sidechain
|
||||
|
||||
@bpsidechain.setter
|
||||
def bpsidechain(self, val: int):
|
||||
@ -223,7 +229,9 @@ class StripGate(IRemote):
|
||||
|
||||
@property
|
||||
def attack(self) -> float:
|
||||
return
|
||||
if self.public_packets[NBS.one] is None:
|
||||
return 0.0
|
||||
return self.public_packets[NBS.one].strips[self.index].gate.attack_ms
|
||||
|
||||
@attack.setter
|
||||
def attack(self, val: float):
|
||||
@ -231,7 +239,9 @@ class StripGate(IRemote):
|
||||
|
||||
@property
|
||||
def hold(self) -> float:
|
||||
return
|
||||
if self.public_packets[NBS.one] is None:
|
||||
return 0.0
|
||||
return self.public_packets[NBS.one].strips[self.index].gate.hold_ms
|
||||
|
||||
@hold.setter
|
||||
def hold(self, val: float):
|
||||
@ -239,7 +249,9 @@ class StripGate(IRemote):
|
||||
|
||||
@property
|
||||
def release(self) -> float:
|
||||
return
|
||||
if self.public_packets[NBS.one] is None:
|
||||
return 0.0
|
||||
return self.public_packets[NBS.one].strips[self.index].gate.release_ms
|
||||
|
||||
@release.setter
|
||||
def release(self, val: float):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user