diff --git a/src/python/midi.py b/src/python/midi.py index 037532d4..26aa2bd0 100644 --- a/src/python/midi.py +++ b/src/python/midi.py @@ -3,7 +3,9 @@ from list import * from utils import * from mtc import * -ipc_send('version', '1.8.7') +ipc_send('version', '1.9.0') + +argv = argv[argv.index('--params') + 1:] if 'list' in argv: list() @@ -26,11 +28,7 @@ outputs = {} for arg in argv: - if 'python/midi.py' in arg: - - pass # in case we're using pre-compiled binaries - - elif type(arg) == str and ':' in arg: + if type(arg) == str and ':' in arg: name, *ports = arg.split(':') ports = ':'.join(ports) # port names may contain colons diff --git a/src/server/midi.js b/src/server/midi.js index 071d3b0e..0f840348 100644 --- a/src/server/midi.js +++ b/src/server/midi.js @@ -5,7 +5,7 @@ var {PythonShell} = require('python-shell'), // last o-s-c version that changed midi sources // must match version in midi.py / bundled midi executable -var midiVersion = '1.8.7' +var midiVersion = '1.9.0' var pythonOptions = { scriptPath:__dirname, @@ -32,6 +32,7 @@ class MidiConverter { this.py = new PythonShell('python/midi.py', Object.assign({ args: [ + '--params', settings.read('debug') ? 'debug' : '', ...settings.read('midi') ], @@ -111,7 +112,7 @@ class MidiConverter { static list() { - PythonShell.run('python/midi.py', Object.assign({pythonPath: MidiConverter.getPythonPath(), args: ['list-only']}, pythonOptions), function(e, results) { + PythonShell.run('python/midi.py', Object.assign({pythonPath: MidiConverter.getPythonPath(), args: ['--params', 'list-only']}, pythonOptions), function(e, results) { if (e) { if (e.code === 'ENOENT') { console.error(`(ERROR, MIDI) Could not find python binary: ${e.message.replace(/spawn (.*) ENOENT/, '$1')}`)