diff options
author | Eddy Pedroni <eddy@0xf7.com> | 2022-02-03 20:20:30 +0100 |
---|---|---|
committer | Eddy Pedroni <eddy@0xf7.com> | 2022-02-03 20:20:30 +0100 |
commit | b609b4ce55104c77a3f69366874a3e25e3061172 (patch) | |
tree | db0095a810acc63d34e1719f59fca668fa693bf0 /solo_tool.py | |
parent | 6debe39546e62d5796f22db2388341ae9132042d (diff) |
Added AB toggle button to MIDI interface
Diffstat (limited to 'solo_tool.py')
-rw-r--r-- | solo_tool.py | 10 |
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) + |