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]
|
[tool.poetry]
|
||||||
name = "voicemeeter-compact"
|
name = "voicemeeter-compact"
|
||||||
version = "1.0.5"
|
version = "1.0.6"
|
||||||
description = "A Compact Voicemeeter Remote App"
|
description = "A Compact Voicemeeter Remote App"
|
||||||
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
@ -15,8 +15,8 @@ include = ["vmcompact/img/cat.ico"]
|
|||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.11"
|
python = "^3.11"
|
||||||
sv-ttk = "^0.1"
|
sv-ttk = "^0.1"
|
||||||
voicemeeter-api = { version = "^0.1.9", python = "^3.10" }
|
voicemeeter-api = { version = "^0.2.0", python = "^3.10" }
|
||||||
vban-cmd = { version = "^1.0.8", python = "^3.10" }
|
vban-cmd = { version = "^1.1.0", python = "^3.10" }
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
|
|
||||||
|
@ -125,11 +125,6 @@ class ChannelLabelFrame(ttk.LabelFrame):
|
|||||||
self.grid()
|
self.grid()
|
||||||
self.configure(text=retval)
|
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):
|
def grid_configure(self):
|
||||||
self.grid(sticky=(tk.N, tk.S))
|
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
|
Checks offset against expected level array size to avoid a race condition
|
||||||
"""
|
"""
|
||||||
if self.level_offset + 1 < len(self.parent.target.strip_levels):
|
if self.target.levels.is_updated:
|
||||||
if (
|
val = max(self.target.levels.prefader)
|
||||||
any(
|
self.level.set((0 if self.mute.get() else 100 + val - 18 + self.gain.get()))
|
||||||
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())
|
|
||||||
)
|
|
||||||
|
|
||||||
def on_update(self, subject):
|
def on_update(self, subject):
|
||||||
"""update levels"""
|
"""update levels"""
|
||||||
@ -208,23 +187,9 @@ class Bus(ChannelLabelFrame):
|
|||||||
return getattr(_target, self.identifier)[self.index]
|
return getattr(_target, self.identifier)[self.index]
|
||||||
|
|
||||||
def upd_levels(self):
|
def upd_levels(self):
|
||||||
if self.level_offset + 1 < len(self.parent.target.bus_levels):
|
if self.target.levels.is_updated:
|
||||||
if (
|
val = max(self.target.levels.all)
|
||||||
any(
|
self.level.set((0 if self.mute.get() else 100 + val - 18))
|
||||||
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
|
|
||||||
]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
self.level.set((0 if self.mute.get() else 100 + val - 18))
|
|
||||||
|
|
||||||
def on_update(self, subject):
|
def on_update(self, subject):
|
||||||
"""update levels"""
|
"""update levels"""
|
||||||
|
@ -127,41 +127,22 @@ class GainLayer(ttk.LabelFrame):
|
|||||||
self.grid()
|
self.grid()
|
||||||
self.configure(text=retval)
|
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):
|
def upd_levels(self):
|
||||||
"""
|
"""
|
||||||
Updates level values.
|
Updates level values.
|
||||||
|
|
||||||
Checks offset against expected level array size to avoid a race condition
|
Checks offset against expected level array size to avoid a race condition
|
||||||
"""
|
"""
|
||||||
if self.level_offset + 1 < len(self.parent.target.strip_levels):
|
|
||||||
if (
|
if self.parent.target.strip[self.index].levels.is_updated:
|
||||||
any(
|
val = max(self.parent.target.strip[self.index].levels.prefader)
|
||||||
self.parent.target._strip_comp[
|
self.level.set(
|
||||||
self.level_offset : self.level_offset + 1
|
(
|
||||||
]
|
0
|
||||||
)
|
if self.parent.target.strip[self.index].mute or not self.on.get()
|
||||||
or self.level.get() > 0
|
else 100 + val - 18 + self.gain.get()
|
||||||
):
|
|
||||||
val = self.convert_level(
|
|
||||||
max(
|
|
||||||
self.parent.target.strip_levels[
|
|
||||||
self.level_offset : self.level_offset + 1
|
|
||||||
]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
self.level.set(
|
|
||||||
(
|
|
||||||
0
|
|
||||||
if self.parent.target.strip[self.index].mute
|
|
||||||
or not self.on.get()
|
|
||||||
else 100 + val - 18 + self.gain.get()
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
def on_update(self, subject):
|
def on_update(self, subject):
|
||||||
"""update levels"""
|
"""update levels"""
|
||||||
|
Loading…
Reference in New Issue
Block a user