diff options
author | neauoire <[email protected]> | 2020-01-30 11:28:06 -0500 |
---|---|---|
committer | neauoire <[email protected]> | 2020-01-30 11:28:06 -0500 |
commit | 9aca0fc07c1fa8330771f1df376ce82f54d56711 (patch) | |
tree | 232573967c17cba8fbd7e13a59a21d0d262a1979 | |
parent | c85315bd397c4c96871438943428b5b0e901841e (diff) | |
download | Orca-9aca0fc07c1fa8330771f1df376ce82f54d56711.tar.gz Orca-9aca0fc07c1fa8330771f1df376ce82f54d56711.zip |
Improved clock feedback
-rw-r--r-- | desktop/sources/scripts/client.js | 6 | ||||
-rw-r--r-- | desktop/sources/scripts/clock.js | 2 | ||||
-rw-r--r-- | desktop/sources/scripts/core/io/midi.js | 5 |
3 files changed, 5 insertions, 8 deletions
diff --git a/desktop/sources/scripts/client.js b/desktop/sources/scripts/client.js index 29aa9fc..6fcdd38 100644 --- a/desktop/sources/scripts/client.js +++ b/desktop/sources/scripts/client.js @@ -95,7 +95,7 @@ function Client () { this.acels.set('Move', 'Drag South(Leap)', 'CmdOrCtrl+Alt+ArrowDown', () => { this.cursor.drag(0, -this.grid.h) }) this.acels.set('Move', 'Drag West(Leap)', 'CmdOrCtrl+Alt+ArrowLeft', () => { this.cursor.drag(-this.grid.w, 0) }) - this.acels.set('Clock', 'Play/Pause', 'Space', () => { if (this.cursor.ins) { this.cursor.move(1, 0) } else { this.clock.togglePlay() } }) + this.acels.set('Clock', 'Play/Pause', 'Space', () => { if (this.cursor.ins) { this.cursor.move(1, 0) } else { this.clock.togglePlay(false) } }) this.acels.set('Clock', 'Frame By Frame', 'CmdOrCtrl+F', () => { this.clock.touch() }) this.acels.set('Clock', 'Reset Frame', 'CmdOrCtrl+Shift+R', () => { this.clock.setFrame(0) }) this.acels.set('Clock', 'Incr. Speed', '>', () => { this.clock.modSpeed(1) }) @@ -279,6 +279,8 @@ function Client () { if (type === 9) { return { bg: this.theme.active.b_inv, fg: this.theme.active.f_high } } // Reader+Background if (type === 10) { return { bg: this.theme.active.background, fg: this.theme.active.f_high } } + // Clock(yellow fg) + if (type === 11) { return { fg: this.theme.active.b_inv } } // Default return { fg: this.theme.active.f_low } } @@ -331,7 +333,7 @@ function Client () { this.write(this.orca.f < 25 ? `ver${this.version}` : `${Object.keys(this.source.cache).length} mods`, this.grid.w * 0, this.orca.h + 1, this.grid.w) this.write(`${this.orca.w}x${this.orca.h}`, this.grid.w * 1, this.orca.h + 1, this.grid.w) this.write(`${this.grid.w}/${this.grid.h}${this.tile.w !== 10 ? ' ' + (this.tile.w / 10).toFixed(1) : ''}`, this.grid.w * 2, this.orca.h + 1, this.grid.w) - this.write(`${this.clock}`, this.grid.w * 3, this.orca.h + 1, this.grid.w, this.clock.isPuppet ? 3 : this.io.midi.isClock ? 6 : this.clock.isPaused ? 20 : 2) + this.write(`${this.clock}`, this.grid.w * 3, this.orca.h + 1, this.grid.w, this.clock.isPuppet ? 3 : this.io.midi.isClock ? 11 : this.clock.isPaused ? 20 : 2) this.write(`${display(Object.keys(this.orca.variables).join(''), this.orca.f, this.grid.w - 1)}`, this.grid.w * 4, this.orca.h + 1, this.grid.w - 1) this.write(this.orca.f < 250 ? `> ${this.io.midi.toOutputString()}` : '', this.grid.w * 5, this.orca.h + 1, this.grid.w * 4) } diff --git a/desktop/sources/scripts/clock.js b/desktop/sources/scripts/clock.js index 2ce7cb4..1739dd0 100644 --- a/desktop/sources/scripts/clock.js +++ b/desktop/sources/scripts/clock.js @@ -70,7 +70,7 @@ function Clock (client) { if (this.isPaused === true) { return } if (this.isPuppet === true) { console.warn('Clock', 'External Midi control'); return } this.isPaused = true - if (msg === true) { client.io.midi.sendClockStop() } + if (msg === true || client.io.midi.isClock) { client.io.midi.sendClockStop() } client.io.midi.allNotesOff() this.clearTimer() client.io.midi.silence() diff --git a/desktop/sources/scripts/core/io/midi.js b/desktop/sources/scripts/core/io/midi.js index bd08e85..3f98c64 100644 --- a/desktop/sources/scripts/core/io/midi.js +++ b/desktop/sources/scripts/core/io/midi.js @@ -93,11 +93,6 @@ function Midi (client) { this.ticks = [] - this.toggleClock = function () { - this.isClock = !this.isClock - client.clock.stop() - } - this.sendClock = function () { if (!this.outputDevice()) { return } if (this.isClock !== true) { return } |