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_cli.py | |
parent | 6debe39546e62d5796f22db2388341ae9132042d (diff) |
Added AB toggle button to MIDI interface
Diffstat (limited to 'solo_tool_cli.py')
-rw-r--r-- | solo_tool_cli.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/solo_tool_cli.py b/solo_tool_cli.py index 8d53a33..43e3a9d 100644 --- a/solo_tool_cli.py +++ b/solo_tool_cli.py @@ -1,10 +1,12 @@ import sys +import time +import threading from solo_tool import SoloTool from midi_controller_launchpad_mini import MidiController class SoloToolCLI: - def __init__(self, sessionJson, soloToolOverride=None, midiOverride=None): + def __init__(self, sessionJson, soloToolOverride=None, midiOverride=None, tickEnable=True): self._soloTool = SoloTool() if soloToolOverride is None else soloToolOverride self._soloTool.loadSession(sessionJson) self._midiController = MidiController(self._soloTool) if midiOverride is None else midiOverride @@ -12,6 +14,8 @@ class SoloToolCLI: "song" : self._song, "midi" : self._midi } + if tickEnable: + self._tick() def input(self, commandString): split = commandString.strip().split(" ") @@ -34,6 +38,10 @@ class SoloToolCLI: else: print("Supported device: Novation Launchpad Mini MkII") + def _tick(self): + self._soloTool.tick() + threading.Timer(0.1, self._tick).start() + def main(args): if len(args) == 0: print("Please provide path to session file") |