mirror of
https://github.com/onyx-and-iris/voicemeeter-compact.git
synced 2024-11-21 20:30:56 +00:00
factorise watch level
factorise watch level
This commit is contained in:
parent
26832b3cb9
commit
1d29e5113c
@ -216,24 +216,7 @@ class Strip(Channel):
|
|||||||
and _base_vals.strip_level_array_size
|
and _base_vals.strip_level_array_size
|
||||||
== len(self._parent._parent.comp_strip)
|
== len(self._parent._parent.comp_strip)
|
||||||
):
|
):
|
||||||
if self.index <= self._parent.phys_in and any(
|
if any(
|
||||||
self._parent._parent.comp_strip[
|
|
||||||
self.level_offset : self.level_offset + 1
|
|
||||||
]
|
|
||||||
):
|
|
||||||
vals = (
|
|
||||||
self.convert_level(
|
|
||||||
self._parent._parent.strip_levels[self.level_offset]
|
|
||||||
),
|
|
||||||
self.convert_level(
|
|
||||||
self._parent._parent.strip_levels[self.level_offset + 1]
|
|
||||||
),
|
|
||||||
)
|
|
||||||
peak = vals[0] if vals[0] > vals[1] else vals[1]
|
|
||||||
self.level.set(
|
|
||||||
(0 if self.mute.get() else 100 + (peak - 18) + self.gain.get())
|
|
||||||
)
|
|
||||||
elif any(
|
|
||||||
self._parent._parent.comp_strip[
|
self._parent._parent.comp_strip[
|
||||||
self.level_offset : self.level_offset + 1
|
self.level_offset : self.level_offset + 1
|
||||||
]
|
]
|
||||||
|
@ -171,31 +171,7 @@ class GainLayer(ttk.LabelFrame):
|
|||||||
and _base_vals.strip_level_array_size
|
and _base_vals.strip_level_array_size
|
||||||
== len(self._parent._parent.comp_strip)
|
== len(self._parent._parent.comp_strip)
|
||||||
):
|
):
|
||||||
if self.index <= self._parent.phys_in and any(
|
if any(
|
||||||
self._parent._parent.comp_strip[
|
|
||||||
self.level_offset : self.level_offset + 1
|
|
||||||
]
|
|
||||||
):
|
|
||||||
vals = (
|
|
||||||
self.convert_level(
|
|
||||||
self._parent._parent.strip_levels[self.level_offset]
|
|
||||||
),
|
|
||||||
self.convert_level(
|
|
||||||
self._parent._parent.strip_levels[self.level_offset + 1]
|
|
||||||
),
|
|
||||||
)
|
|
||||||
peak = vals[0] if vals[0] > vals[1] else vals[1]
|
|
||||||
self.level.set(
|
|
||||||
(
|
|
||||||
0
|
|
||||||
if self._parent._parent.channel_frame.strips[
|
|
||||||
self.index
|
|
||||||
].mute.get()
|
|
||||||
or not self.on.get()
|
|
||||||
else 100 + (peak - 18) + self.gain.get()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
elif any(
|
|
||||||
self._parent._parent.comp_strip[
|
self._parent._parent.comp_strip[
|
||||||
self.level_offset : self.level_offset + 1
|
self.level_offset : self.level_offset + 1
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user