mirror of
https://github.com/onyx-and-iris/voicemeeter-compact.git
synced 2024-11-21 20:30:56 +00:00
channels and gainlayers now using is_updated
minor ver bump. dependencies updated.
This commit is contained in:
parent
e9477d9650
commit
24870e1861
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "voicemeeter-compact"
|
||||
version = "1.0.5"
|
||||
version = "1.0.6"
|
||||
description = "A Compact Voicemeeter Remote App"
|
||||
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
||||
license = "MIT"
|
||||
@ -15,8 +15,8 @@ include = ["vmcompact/img/cat.ico"]
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.11"
|
||||
sv-ttk = "^0.1"
|
||||
voicemeeter-api = { version = "^0.1.9", python = "^3.10" }
|
||||
vban-cmd = { version = "^1.0.8", python = "^3.10" }
|
||||
voicemeeter-api = { version = "^0.2.0", python = "^3.10" }
|
||||
vban-cmd = { version = "^1.1.0", python = "^3.10" }
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
|
||||
|
@ -125,11 +125,6 @@ class ChannelLabelFrame(ttk.LabelFrame):
|
||||
self.grid()
|
||||
self.configure(text=retval)
|
||||
|
||||
def convert_level(self, val):
|
||||
if _base_values.vban_connected:
|
||||
return round(-val * 0.01, 1)
|
||||
return round(20 * log(val, 10), 1) if val > 0 else -200.0
|
||||
|
||||
def grid_configure(self):
|
||||
self.grid(sticky=(tk.N, tk.S))
|
||||
[
|
||||
@ -167,25 +162,9 @@ class Strip(ChannelLabelFrame):
|
||||
|
||||
Checks offset against expected level array size to avoid a race condition
|
||||
"""
|
||||
if self.level_offset + 1 < len(self.parent.target.strip_levels):
|
||||
if (
|
||||
any(
|
||||
self.parent.target._strip_comp[
|
||||
self.level_offset : self.level_offset + 1
|
||||
]
|
||||
)
|
||||
or self.level.get() > 0
|
||||
):
|
||||
val = self.convert_level(
|
||||
max(
|
||||
self.parent.target.strip_levels[
|
||||
self.level_offset : self.level_offset + 1
|
||||
]
|
||||
)
|
||||
)
|
||||
self.level.set(
|
||||
(0 if self.mute.get() else 100 + val - 18 + self.gain.get())
|
||||
)
|
||||
if self.target.levels.is_updated:
|
||||
val = max(self.target.levels.prefader)
|
||||
self.level.set((0 if self.mute.get() else 100 + val - 18 + self.gain.get()))
|
||||
|
||||
def on_update(self, subject):
|
||||
"""update levels"""
|
||||
@ -208,22 +187,8 @@ class Bus(ChannelLabelFrame):
|
||||
return getattr(_target, self.identifier)[self.index]
|
||||
|
||||
def upd_levels(self):
|
||||
if self.level_offset + 1 < len(self.parent.target.bus_levels):
|
||||
if (
|
||||
any(
|
||||
self.parent.target._bus_comp[
|
||||
self.level_offset : self.level_offset + 1
|
||||
]
|
||||
)
|
||||
or self.level.get() > 0
|
||||
):
|
||||
val = self.convert_level(
|
||||
max(
|
||||
self.parent.target.bus_levels[
|
||||
self.level_offset : self.level_offset + 1
|
||||
]
|
||||
)
|
||||
)
|
||||
if self.target.levels.is_updated:
|
||||
val = max(self.target.levels.all)
|
||||
self.level.set((0 if self.mute.get() else 100 + val - 18))
|
||||
|
||||
def on_update(self, subject):
|
||||
|
@ -127,38 +127,19 @@ class GainLayer(ttk.LabelFrame):
|
||||
self.grid()
|
||||
self.configure(text=retval)
|
||||
|
||||
def convert_level(self, val):
|
||||
if _base_values.vban_connected:
|
||||
return round(-val * 0.01, 1)
|
||||
return round(20 * log(val, 10), 1) if val > 0 else -200.0
|
||||
|
||||
def upd_levels(self):
|
||||
"""
|
||||
Updates level values.
|
||||
|
||||
Checks offset against expected level array size to avoid a race condition
|
||||
"""
|
||||
if self.level_offset + 1 < len(self.parent.target.strip_levels):
|
||||
if (
|
||||
any(
|
||||
self.parent.target._strip_comp[
|
||||
self.level_offset : self.level_offset + 1
|
||||
]
|
||||
)
|
||||
or self.level.get() > 0
|
||||
):
|
||||
val = self.convert_level(
|
||||
max(
|
||||
self.parent.target.strip_levels[
|
||||
self.level_offset : self.level_offset + 1
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
if self.parent.target.strip[self.index].levels.is_updated:
|
||||
val = max(self.parent.target.strip[self.index].levels.prefader)
|
||||
self.level.set(
|
||||
(
|
||||
0
|
||||
if self.parent.target.strip[self.index].mute
|
||||
or not self.on.get()
|
||||
if self.parent.target.strip[self.index].mute or not self.on.get()
|
||||
else 100 + val - 18 + self.gain.get()
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user