Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MC7000: Fix code style issue in pad buttons handler for 2.3 #4757

Merged
merged 1 commit into from
May 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions res/controllers/Denon-MC7000-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,15 @@ MC7000.PadButtons = function(channel, control, value, status, group) {
var deckOffset = deckNumber - 1;
var i, j;

// The following modes are currently unhandled and could be
// added as if-branches in the future:

// - MC7000.PADModeCueLoop
// - MC7000.PADModeFlip
// - MC7000.PADModeSlicerLoop
// - MC7000.PADModeVelSamp
// - MC7000.PADModePitch

// activate and clear Hot Cues
if (MC7000.PADModeCue[deckNumber] && engine.getValue(group, "track_loaded") === 1) {
for (i = 1; i <= 8; i++) {
Expand All @@ -512,10 +521,6 @@ MC7000.PadButtons = function(channel, control, value, status, group) {
midi.sendShortMsg(0x94 + deckOffset, 0x1C + i - 1, MC7000.padColor.hotcueoff);
}
}
} else if (MC7000.PADModeCueLoop[deckNumber]) {
return;
} else if (MC7000.PADModeFlip[deckNumber]) {
return;
} else if (MC7000.PADModeRoll[deckNumber]) {
// TODO(all): check for actual beatloop_size and apply back after a PAD Roll
i = control - 0x14;
Expand Down Expand Up @@ -560,8 +565,6 @@ MC7000.PadButtons = function(channel, control, value, status, group) {
} else {
midi.sendShortMsg(0x94 + deckOffset, control, MC7000.padColor.sliceron);
}
} else if (MC7000.PADModeSlicerLoop[deckNumber]) {
return;
} else if (MC7000.PADModeSampler[deckNumber]) {
for (i = 1; i <= 8; i++) {
if (control === 0x14 + i - 1 && value >= 0x01) {
Expand All @@ -588,10 +591,6 @@ MC7000.PadButtons = function(channel, control, value, status, group) {
}
}
}
} else if (MC7000.PADModeVelSamp[deckNumber]) {
return;
} else if (MC7000.PADModePitch[deckNumber]) {
return;
}
};

Expand Down