midi: add path option

This commit is contained in:
jean-emmanuel 2019-07-11 16:43:52 +02:00
parent cddddb5bb2
commit 9110a8b3fc
3 changed files with 8 additions and 2 deletions

View file

@ -3,7 +3,9 @@
## 0.47.1
- bug fixes
- css font faces not loading from absolute/relative paths
- css font faces not loading from absolute/relative paths
- midi
- added `path` option for setting python binary path manually
## 0.47.0

View file

@ -18,6 +18,7 @@ When running the app, the `-m / --midi` switch must be set; it accepts the follo
- `device_name:input,output`: connect to midi ports `input` and `output`; osc messages sent to target `midi:device_name` will be processed as midi events; Multiple devices can be declared. If the `device_name` contains white spaces, the declaration must be enquoted (ie `"spaced name:input,output"`). `device_name` doesn't need to match the actual midi device name, it is just an identifier (see [Widget settings](#widget-settings)).
- `sysex`: parse incomming system exclusive messages (disabled by default)
- `pc_offset`: send program changes with a `-1` offset to match some software/hardware implementations
- `path=/path/to/python`: indicates where to find python or python3 binary in case open stage control doesn't (`Error: spawn python3 ENOENT`)
*Linux only:*

View file

@ -10,11 +10,14 @@ class MidiConverter {
constructor() {
var pythonPath = settings.read('midi').filter(x=>x.includes('path=')).map(x=>x.split('=')[1])[0]
this.py = new PythonShell('python/midi.py', Object.assign({
args: [
settings.read('debug') ? 'debug' : '',
...settings.read('midi')
]
],
pythonPath
}, pythonOptions))
}