diff options
author | Radu Suciu <radusuciu@gmail.com> | 2017-03-09 20:49:20 -0800 |
---|---|---|
committer | Radu Suciu <radusuciu@gmail.com> | 2017-03-09 20:49:20 -0800 |
commit | 9cd89b10a0dee754ee1b73694c4b4fce0d5754bd (patch) | |
tree | 3438b2a127053d7fc7ec3751d4f12d7e45297d8a /res/controllers/Numark-Mixtrack-3-scripts.js | |
parent | 5d14da2b8e3532ac564076a039f815a243d65996 (diff) |
Misc bug fixes for beatjump/loopmove
Diffstat (limited to 'res/controllers/Numark-Mixtrack-3-scripts.js')
-rw-r--r-- | res/controllers/Numark-Mixtrack-3-scripts.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/res/controllers/Numark-Mixtrack-3-scripts.js b/res/controllers/Numark-Mixtrack-3-scripts.js index 725d5a3785..43068acbb6 100644 --- a/res/controllers/Numark-Mixtrack-3-scripts.js +++ b/res/controllers/Numark-Mixtrack-3-scripts.js @@ -235,7 +235,7 @@ var nextJumpSize = function(currentSize) { var prevJumpSize = function(currentSize) { var index = jumpSize.indexOf(currentSize); - return jumpSize[(index - 1) % (jumpSize.length)]; + return jumpSize.slice(index - 1)[0]; }; // ===================================================================== @@ -1886,7 +1886,7 @@ NumarkMixtrack3.PitchBendPlusButton = function(channel, control, value, status, NumarkMixtrack3.BeatKnob = function(channel, control, value, status, group) { var deck = NumarkMixtrack3.deckFromGroup(group); // beat knobs sends 1 or 127 as value. If value = 127, turn is counterclockwise - var increase = (value === 127); + var increase = (value === 1); // direct interaction with knob, without any button combination @@ -1938,12 +1938,12 @@ NumarkMixtrack3.OnLoopMove = function(value, group, control) { // when the script is reset but the UI is not. NumarkMixtrack3.OnBeatJumpX = function(value, group, control) { if (!value) return; - beatJumpSize = parseInt(control.match(/\d/)[0]); + beatJumpSize = parseInt(control.match(/\d+/)[0]); }; NumarkMixtrack3.OnLoopMoveX = function(value, group, control) { if (!value) return; - loopMoveSize = parseInt(control.match(/\d/)[0]); + loopMoveSize = parseInt(control.match(/\d+/)[0]); }; NumarkMixtrack3.bpmTap = function(channel, control, value, status, group) { |