|
@@ -124,7 +124,8 @@ class SimpleMidi:
|
|
if not self.connect and not self.is_alive():
|
|
if not self.connect and not self.is_alive():
|
|
padsdir = os.path.normpath(os.path.join(os.getcwd(), "../pads"))
|
|
padsdir = os.path.normpath(os.path.join(os.getcwd(), "../pads"))
|
|
args=(os.path.join(os.getcwd(), config.PAD_ROUTER_BIN), "--command", "inet", "8081", "-k", "--pads-dir", padsdir)
|
|
args=(os.path.join(os.getcwd(), config.PAD_ROUTER_BIN), "--command", "inet", "8081", "-k", "--pads-dir", padsdir)
|
|
- self.process=subprocess.Popen(args)
|
|
|
|
|
|
+ fd = open("_stderr", "wb")
|
|
|
|
+ self.process=subprocess.Popen(args, stderr=fd)
|
|
"""if (self.pid>0):
|
|
"""if (self.pid>0):
|
|
os.kill(self.pid, 9)
|
|
os.kill(self.pid, 9)
|
|
os.wait()
|
|
os.wait()
|
|
@@ -174,6 +175,8 @@ class SimpleMidi:
|
|
with open(SimpleMidi.TEMP_FILE, "w") as f:
|
|
with open(SimpleMidi.TEMP_FILE, "w") as f:
|
|
f.write(json.dumps(padconf.json()))
|
|
f.write(json.dumps(padconf.json()))
|
|
self.socket.set_configuration("ui/"+SimpleMidi.TEMP_FILE)
|
|
self.socket.set_configuration("ui/"+SimpleMidi.TEMP_FILE)
|
|
|
|
+ time.sleep(0.1)
|
|
|
|
+ os.remove(SimpleMidi.TEMP_FILE)
|
|
|
|
|
|
def set_configuration_file(self, padconf):
|
|
def set_configuration_file(self, padconf):
|
|
if not self.is_alive():
|
|
if not self.is_alive():
|