aboutsummaryrefslogtreecommitdiffhomepage
path: root/desktop/sources
diff options
context:
space:
mode:
authorFrancisco Requena <[email protected]>2019-04-03 13:11:36 +0200
committerFrancisco Requena <[email protected]>2019-04-03 13:11:36 +0200
commit0bb15a7b9997c0f23823eb4c08a56f4c4594e5db (patch)
treefe14b45c99cf6928b6e1b09317f4dae7aaca11be /desktop/sources
parent1bd2ca718dfe3009c0dd4f26860de064532b1817 (diff)
downloadOrca-0bb15a7b9997c0f23823eb4c08a56f4c4594e5db.tar.gz
Orca-0bb15a7b9997c0f23823eb4c08a56f4c4594e5db.zip
Silence MIDI when the application quits
Otherwise, the last played note will keep triggered.
Diffstat (limited to 'desktop/sources')
-rw-r--r--desktop/sources/index.html2
-rw-r--r--desktop/sources/scripts/terminal.js4
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()