diff options
author | Devine Lu Linvega <[email protected]> | 2019-04-15 10:15:58 +0900 |
---|---|---|
committer | Devine Lu Linvega <[email protected]> | 2019-04-15 10:15:58 +0900 |
commit | 2b87806f73f25ee77c9854ed849e34913e47f159 (patch) | |
tree | bea0b3453131a7992777e776f21548254ec924db | |
parent | de2a777dde345494cf36767a0a4f9f88f5264926 (diff) | |
download | Orca-2b87806f73f25ee77c9854ed849e34913e47f159.tar.gz Orca-2b87806f73f25ee77c9854ed849e34913e47f159.zip |
Clamp BPM settings
-rw-r--r-- | desktop/sources/index.html | 1 | ||||
-rw-r--r-- | desktop/sources/scripts/clock.js | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/desktop/sources/index.html b/desktop/sources/index.html index 9b84e40..ef9da75 100644 --- a/desktop/sources/index.html +++ b/desktop/sources/index.html @@ -50,7 +50,6 @@ terminal.controller.add("default","Clock","Decr. Speed",() => { terminal.clock.mod(-1) },"<") terminal.controller.add("default","Clock","Incr. Speed(10x)",() => { terminal.clock.mod(10,true) },"CmdOrCtrl+>") terminal.controller.add("default","Clock","Decr. Speed(10x)",() => { terminal.clock.mod(-10,true) },"CmdOrCtrl+<") - terminal.controller.add("default","Clock","Tap",() => { terminal.clock.tap() },"CmdOrCtrl+T") terminal.controller.add("default","View","Zoom In",() => { terminal.modZoom(0.25) },"CmdOrCtrl+=") terminal.controller.add("default","View","Zoom Out",() => { terminal.modZoom(-0.25) },"CmdOrCtrl+-") diff --git a/desktop/sources/scripts/clock.js b/desktop/sources/scripts/clock.js index ccdf1d7..f5d5beb 100644 --- a/desktop/sources/scripts/clock.js +++ b/desktop/sources/scripts/clock.js @@ -71,7 +71,7 @@ function Clock (terminal) { const sum = this.intervals.reduce((sum, interval) => { return sum + interval }) const bpm = parseInt((1000 / sum) * 60) if (Math.abs(bpm - this.speed.target) > 3) { - this.speed.target = bpm + this.speed.target = clamp(bpm,60,300) } } |