diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ee048dd..61029659 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,11 @@ ## 1.8.4 +- midi + - display an error when the midi bridge process crashes and prevent further errors when attempting to send messages + - ui - - hide the console toggle button when the bottom panel is minimized and the editor is disabled + - hide the console toggle button when the bottom panel is minimized and the editor is disabled - widgets - file: add `mode` property, for choosing between `open` and `save` modes diff --git a/src/server/midi.js b/src/server/midi.js index f33d626c..a1017459 100644 --- a/src/server/midi.js +++ b/src/server/midi.js @@ -43,10 +43,18 @@ class MidiConverter { } }) + this.running = true + this.py.childProcess.on('exit', (code)=>{ + if (code === null) console.error(`(ERROR, MIDI) Midi bridge process crashed`) + this.running = false + }) + } send(data) { + if (!this.running) return + var args = [] for (let i in data.args) { args.push(data.args[i].value)