Compare commits

..

No commits in common. "708a7e6d8eb05effb59d1f451f7b6c4a5e718ce6" and "103355d2658f1c744458d0b662349d6a049f59dd" have entirely different histories.

3 changed files with 9 additions and 11 deletions

View File

@ -14,20 +14,19 @@ class App:
self.vm.observer.add(self.on_midi)
def on_midi(self):
if self.get_info() == self.MIDI_BUTTON:
self.on_midi_press()
self.get_info()
self.on_midi_press()
def get_info(self):
current = self.vm.midi.current
print(f"Value of midi button {current} is {self.vm.midi.get(current)}")
return current
def on_midi_press(self):
"""if midi button 48 is pressed and strip 3 level max > -40, then set trigger for macrobutton 0"""
"""if strip 3 level max > -40 and midi button 48 is pressed, then set trigger for macrobutton 0"""
if (
self.vm.midi.get(self.MIDI_BUTTON) == 127
and max(self.vm.strip[3].levels.postfader) > -40
max(self.vm.strip[3].levels.postfader) > -40
and self.vm.midi.get(self.MIDI_BUTTON) == 127
):
print(
f"Strip 3 level max is greater than -40 and midi button {self.MIDI_BUTTON} is pressed"

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "voicemeeter-api"
version = "2.4.4"
version = "2.4.3"
description = "A Python wrapper for the Voiceemeter API"
authors = ["onyx-and-iris <code@onyxandiris.online>"]
license = "MIT"

View File

@ -33,7 +33,8 @@ class Remote(CBindings):
{k: kwargs.pop(k) for k in ("pdirty", "mdirty", "midi", "ldirty")}
)
self.gui = VmGui()
self.stop_event = None
self.stop_event = threading.Event()
self.stop_event.clear()
self.logger = logger.getChild(self.__class__.__name__)
for attr, val in kwargs.items():
@ -56,8 +57,6 @@ class Remote(CBindings):
self.event.info()
self.logger.debug("initiating events thread")
self.stop_event = threading.Event()
self.stop_event.clear()
queue = Queue()
self.updater = Updater(self, queue)
self.updater.start()
@ -65,7 +64,7 @@ class Remote(CBindings):
self.producer.start()
def stopped(self):
return self.stop_event is None or self.stop_event.is_set()
return self.stop_event.is_set()
def login(self) -> None:
"""Login to the API, initialize dirty parameters"""