summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortoszlanyi <toszlanyi@yahoo.de>2021-04-07 18:52:15 +0200
committertoszlanyi <toszlanyi@yahoo.de>2021-04-07 18:52:15 +0200
commit0e12d1cfda0f50492fbe2d804cf34a567e14c43e (patch)
tree193741ccffcbcaa2ed09db75114bbbbe37a623ba
parent5cda43ca18f581cf7e9ef91d7d63caddf8aa3461 (diff)
revised PAD mode beatjump equations
-rw-r--r--res/controllers/Denon-MC7000-scripts.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/res/controllers/Denon-MC7000-scripts.js b/res/controllers/Denon-MC7000-scripts.js
index 5c58b62260..1d59243494 100644
--- a/res/controllers/Denon-MC7000-scripts.js
+++ b/res/controllers/Denon-MC7000-scripts.js
@@ -523,21 +523,21 @@ MC7000.PadButtons = function(channel, control, value, status, group) {
if (value > 0) {
i = control - 0x14; // unshifted button
j = control - 0x1C; // shifted button
- // forward buttons
- if (control < 0x18) {
- engine.setValue(group, "beatjump_" + MC7000.fixedLoop[i] + "_forward", true);
+ // forward buttons (PAD buttons upper row)
+ if (control >= 0x14 && control <= 0x17) {
+ engine.setValue(group, "beatjump_" + MC7000.beatJump[i] + "_forward", true);
midi.sendShortMsg(0x94 + deckNumber - 1, control, MC7000.padColor.slicerJumpFwd);
- // backward buttons
- } else if (control > 0x17 && control < 0x1C) {
- engine.setValue(group, "beatjump_" + MC7000.fixedLoop[i - 4] + "_backward", true);
+ // backward buttons (PAD buttons lower row)
+ } else if (control >= 0x18 && control <= 0x1B) {
+ engine.setValue(group, "beatjump_" + MC7000.beatJump[i - 4] + "_backward", true);
midi.sendShortMsg(0x94 + deckNumber - 1, control, MC7000.padColor.slicerJumpBack);
- // forward buttons (shifted controls)
- } else if (control > 0x1B && control < 0x20) {
- engine.setValue(group, "beatjump_" + MC7000.fixedLoop[j + 4] + "_forward", true);
+ // forward buttons (PAD buttons upper row - shifted controls)
+ } else if (control >= 0x1C && control <= 0x1F) {
+ engine.setValue(group, "beatjump_" + MC7000.beatJump[j + 4] + "_forward", true);
midi.sendShortMsg(0x94 + deckNumber - 1, control, MC7000.padColor.slicerJumpFwd);
- // backward buttons (shifted controls)
- } else if (control > 0x1F) {
- engine.setValue(group, "beatjump_" + MC7000.fixedLoop[j] + "_backward", true);
+ // backward buttons (PAD buttons lower row - shifted controls)
+ } else if (control >= 0x20 && control <= 0x23) {
+ engine.setValue(group, "beatjump_" + MC7000.beatJump[j] + "_backward", true);
midi.sendShortMsg(0x94 + deckNumber - 1, control, MC7000.padColor.slicerJumpBack);
}
} else {