From 3b7c39cf67616eda57be0b5ab4fa36bae32e7bff Mon Sep 17 00:00:00 2001 From: h67ma Date: Sat, 4 Sep 2021 18:41:57 +0200 Subject: [PATCH] changed the behavior of reloop --- .../Numark-Mixtrack-Pro-FX-scripts.js | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/res/controllers/Numark-Mixtrack-Pro-FX-scripts.js b/res/controllers/Numark-Mixtrack-Pro-FX-scripts.js index 3b8dc70962a..29b9b76d7b3 100644 --- a/res/controllers/Numark-Mixtrack-Pro-FX-scripts.js +++ b/res/controllers/Numark-Mixtrack-Pro-FX-scripts.js @@ -290,21 +290,24 @@ MixtrackProFX.Deck = function(number) { this.loop = new components.Button({ outKey: "loop_enabled", midi: [0x94 + channel, 0x40], - shift: function() { - this.inKey = "loop_in_goto"; - this.input = components.Button.prototype.input; - }, - unshift: function() { - this.input = function(channel, control, value, status, group) { - if (!this.isPress(channel, control, value)) { - return; - } + input: function(channel, control, value, status, group) { + if (!this.isPress(channel, control, value)) { + return; + } + + if (!MixtrackProFX.shifted) { if (engine.getValue(group, "loop_enabled") === 0) { script.triggerControl(group, "beatloop_activate"); } else { script.triggerControl(group, "beatlooproll_activate"); } - }; + } else { + if (engine.getValue(group, "loop_enabled") === 0) { + script.triggerControl(group, "reloop_toggle"); + } else { + script.triggerControl(group, "reloop_andstop"); + } + } }, shiftControl: true, sendShifted: true,