diff options
author | Francisco Requena <[email protected]> | 2019-04-03 13:11:36 +0200 |
---|---|---|
committer | Francisco Requena <[email protected]> | 2019-04-03 13:11:36 +0200 |
commit | 0bb15a7b9997c0f23823eb4c08a56f4c4594e5db (patch) | |
tree | fe14b45c99cf6928b6e1b09317f4dae7aaca11be | |
parent | 1bd2ca718dfe3009c0dd4f26860de064532b1817 (diff) | |
download | Orca-0bb15a7b9997c0f23823eb4c08a56f4c4594e5db.tar.gz Orca-0bb15a7b9997c0f23823eb4c08a56f4c4594e5db.zip |
Silence MIDI when the application quits
Otherwise, the last played note will keep triggered.
-rw-r--r-- | desktop/sources/index.html | 2 | ||||
-rw-r--r-- | desktop/sources/scripts/terminal.js | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/desktop/sources/index.html b/desktop/sources/index.html index c19b080..b1c9bb4 100644 --- a/desktop/sources/index.html +++ b/desktop/sources/index.html @@ -24,7 +24,7 @@ terminal.controller.add("default","*","Hide",() => { app.toggleVisible() },"CmdOrCtrl+H") terminal.controller.add("default","*","Inspect",() => { app.inspect() },"CmdOrCtrl+.") terminal.controller.add("default","*","Reset",() => { terminal.reset() },"CmdOrCtrl+Backspace") - terminal.controller.add("default","*","Quit",() => { app.exit() },"CmdOrCtrl+Q") + terminal.controller.add("default","*","Quit",() => { terminal.unload(); app.exit() },"CmdOrCtrl+Q") terminal.controller.add("default","File","New",() => { terminal.source.new() },"CmdOrCtrl+N") terminal.controller.add("default","File","Save",() => { terminal.source.save() },"CmdOrCtrl+S") diff --git a/desktop/sources/scripts/terminal.js b/desktop/sources/scripts/terminal.js index 32c35a1..7b88acd 100644 --- a/desktop/sources/scripts/terminal.js +++ b/desktop/sources/scripts/terminal.js @@ -79,6 +79,10 @@ function Terminal () { this.update() } + this.unload = function () { + this.io.midi.silence() + } + this.update = function () { this.clear() this.ports = this.findPorts() |