aboutsummaryrefslogtreecommitdiffstats
path: root/solo_tool.py
diff options
context:
space:
mode:
authorEddy Pedroni <eddy@0xf7.com>2022-02-03 20:20:30 +0100
committerEddy Pedroni <eddy@0xf7.com>2022-02-03 20:20:30 +0100
commitb609b4ce55104c77a3f69366874a3e25e3061172 (patch)
treedb0095a810acc63d34e1719f59fca668fa693bf0 /solo_tool.py
parent6debe39546e62d5796f22db2388341ae9132042d (diff)
Added AB toggle button to MIDI interface
Diffstat (limited to 'solo_tool.py')
-rw-r--r--solo_tool.py10
1 files changed, 10 insertions, 0 deletions
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)
+