From b609b4ce55104c77a3f69366874a3e25e3061172 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Thu, 3 Feb 2022 20:20:30 +0100 Subject: Added AB toggle button to MIDI interface --- solo_tool.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'solo_tool.py') diff --git a/solo_tool.py b/solo_tool.py index 4ea081d..6cb1a77 100644 --- a/solo_tool.py +++ b/solo_tool.py @@ -74,7 +74,14 @@ class SoloTool: return list() def setAbLimitEnable(self, enable): + previous = self._abController.isEnabled() self._abController.setEnable(enable) + new = self._abController.isEnabled() + if previous != new: + self._notifier.notify(Notifier.AB_LIMIT_ENABLED_EVENT, new) + + def isAbLimitEnabled(self): + return self._abController.isEnabled() def nextStoredAbLimits(self): previous = self._abController.getLoadedIndex() @@ -152,3 +159,6 @@ class SoloTool: def registerCurrentAbLimitsCallback(self, callback): self._notifier.registerCallback(Notifier.CURRENT_AB_EVENT, callback) + def registerAbLimitEnabledCallback(self, callback): + self._notifier.registerCallback(Notifier.AB_LIMIT_ENABLED_EVENT, callback) + -- cgit v1.2.3