aboutsummaryrefslogtreecommitdiffhomepage
path: root/desktop/sources/scripts/clock.js
diff options
context:
space:
mode:
authornjanssen <[email protected]>2020-09-25 10:46:16 +0200
committernjanssen <[email protected]>2020-09-25 10:46:16 +0200
commita0f12faee513866c22c04b867ef716df48904223 (patch)
treefed1819946d3321150ef238232d7aeec23058dc8 /desktop/sources/scripts/clock.js
parent47e7107740f9fd4e58deefea309c45ade1034579 (diff)
downloadOrca-a0f12faee513866c22c04b867ef716df48904223.tar.gz
Orca-a0f12faee513866c22c04b867ef716df48904223.zip
Allow Midi.play and Midi.stop to update `Midi.isPaused` when running in Puppeteering mode (thanks @unthingable!)
Diffstat (limited to 'desktop/sources/scripts/clock.js')
-rw-r--r--desktop/sources/scripts/clock.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop/sources/scripts/clock.js b/desktop/sources/scripts/clock.js
index 1739dd0..a170e2c 100644
--- a/desktop/sources/scripts/clock.js
+++ b/desktop/sources/scripts/clock.js
@@ -59,8 +59,8 @@ function Clock (client) {
this.play = function (msg = false) {
console.log('Clock', 'Play', msg)
if (this.isPaused === false) { return }
- if (this.isPuppet === true) { console.warn('Clock', 'External Midi control'); return }
this.isPaused = false
+ if (this.isPuppet === true) { console.warn('Clock', 'External Midi control'); return }
if (msg === true) { client.io.midi.sendClockStart() }
this.setSpeed(this.speed.target, this.speed.target, true)
}
@@ -68,8 +68,8 @@ function Clock (client) {
this.stop = function (msg = false) {
console.log('Clock', 'Stop')
if (this.isPaused === true) { return }
- if (this.isPuppet === true) { console.warn('Clock', 'External Midi control'); return }
this.isPaused = true
+ if (this.isPuppet === true) { console.warn('Clock', 'External Midi control'); return }
if (msg === true || client.io.midi.isClock) { client.io.midi.sendClockStop() }
client.io.midi.allNotesOff()
this.clearTimer()