Beispiel #1
0
def main() -> None:
    engine = Engine()
    engine.load_session_from_json('../config/project.json')
    interface = ConsoleInterface(engine)
    # This starts the interface, which uses this thread until the exit command has been given
    # The sequencer runs in it's own thread, that has already been started, so this is actually desired
    interface.start_interface()
    # after the ui has stopped, it's time to shut down the engine (which stops the sequencer thread)
    engine.shut_down()
Beispiel #2
0
 def perform(self, engine: Engine, command: str) -> str:
     file_path = command[3:]
     if isfile(file_path):
         engine.load_session_from_json(file_path)
         return f'Loaded json session from {file_path}'
     return f'Couldn\'t load json from {file_path}, because it the file does not exits'