import sys import time from solo_tool import SoloTool from solo_tool.midi_controller_launchpad_mini import MidiController def main(): args = sys.argv[1:] if len(args) == 0: print("Please provide path to session file") sys.exit(1) soloTool = SoloTool() soloTool.loadSession(args[0]) def tick(): soloTool.tick() threading.Timer(0.1, tick).start() midiController = MidiController(soloTool) midiController.connect() try: while(True): time.sleep(0.1) soloTool.tick() except KeyboardInterrupt: pass finally: midiController.disconnect() if __name__ == '__main__': main()