diff options
Diffstat (limited to 'desktop/sources')
-rw-r--r-- | desktop/sources/scripts/clock.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/desktop/sources/scripts/clock.js b/desktop/sources/scripts/clock.js index 8516bf4..41d44de 100644 --- a/desktop/sources/scripts/clock.js +++ b/desktop/sources/scripts/clock.js @@ -44,14 +44,14 @@ function Clock (terminal) { } this.play = function () { - if (!this.isPaused) { console.warn('Already playing'); return } + if (!this.isPaused) { return } console.log('Clock', 'Play') this.isPaused = false this.set(this.speed.target, this.speed.target, true) } this.stop = function () { - if (this.isPaused) { console.warn('Already stopped'); return } + if (this.isPaused) { return } console.log('Clock', 'Stop') terminal.io.midi.silence() this.isPaused = true @@ -69,8 +69,8 @@ function Clock (terminal) { } if (this.intervals.length === 8) { const sum = this.intervals.reduce((sum, interval) => { return sum + interval }) - const bpm = Math.floor((1000 / sum) * 60) - this.set(null, bpm) + const bpm = Math.floor((1000 / sum) * 60) * 2 + this.set(bpm, bpm) } const now = performance.now() |