diff options
author | Tobias <toszlanyi@yahoo.de> | 2020-03-24 11:48:54 +0100 |
---|---|---|
committer | Tobias <toszlanyi@yahoo.de> | 2020-03-24 11:48:54 +0100 |
commit | df9d06004ad639ed43b895f0c0e93a925c8c50bc (patch) | |
tree | 870f47e7d100787fd9c3de7c2619ba593206a648 /res | |
parent | 51b7833c24a7deff0607ada9fcac588eb7f1789f (diff) |
Little chnages as suggested by Holzhaus
Diffstat (limited to 'res')
-rw-r--r-- | res/controllers/Denon-MC7000-scripts.js | 1021 | ||||
-rw-r--r-- | res/controllers/Denon-MC7000.midi.xml | 2 |
2 files changed, 538 insertions, 485 deletions
diff --git a/res/controllers/Denon-MC7000-scripts.js b/res/controllers/Denon-MC7000-scripts.js index f022f2a675..32d2b9e0cb 100644 --- a/res/controllers/Denon-MC7000-scripts.js +++ b/res/controllers/Denon-MC7000-scripts.js @@ -138,10 +138,6 @@ MC7000.padColor = { /* DECK INITIALIZATION */ MC7000.init = function() { - // Decks - MC7000.leftDeck = new MC7000.Deck(1, 3); - MC7000.rightDeck = new MC7000.Deck(2, 4); - // set default Master Volume to 85% to give a little head room for mixing // engine.setValue("[Master]", "gain", 0.85); @@ -209,515 +205,572 @@ MC7000.init = function() { midi.sendSysexMsg(ControllerStatusSysex, ControllerStatusSysex.length); }; -/* CONSTRUCTOR FOR DECK OBJECT */ -MC7000.Deck = function() { - - // PAD Mode Hot Cue - MC7000.padModeCue = function(channel, control, value, status, group) { - var deckNumber = script.deckFromGroup(group); - if (value === 0x00) return; // don't respond to note off messages - if (value === 0x7F) { - // set HotCue Mode true - MC7000.PADModeCue[deckNumber] = true; - MC7000.PADModeCueLoop[deckNumber] = false; - MC7000.PADModeFlip[deckNumber] = false; - MC7000.PADModeRoll[deckNumber] = false; - MC7000.PADModeSavedLoop[deckNumber] = false; - MC7000.PADModeSlicer[deckNumber] = false; - MC7000.PADModeSlicerLoop[deckNumber] = false; - MC7000.PADModeSampler[deckNumber] = false; - MC7000.PADModeVelSamp[deckNumber] = false; - MC7000.PADModePitch[deckNumber] = false; +// PAD Mode Hot Cue +MC7000.padModeCue = function(channel, control, value, status, group) { + var deckNumber = script.deckFromGroup(group); + if (value === 0x00) + return; // don't respond to note off messages + if (value === 0x7F) { + // set HotCue Mode true + MC7000.PADModeCue[deckNumber] = true; + MC7000.PADModeCueLoop[deckNumber] = false; + MC7000.PADModeFlip[deckNumber] = false; + MC7000.PADModeRoll[deckNumber] = false; + MC7000.PADModeSavedLoop[deckNumber] = false; + MC7000.PADModeSlicer[deckNumber] = false; + MC7000.PADModeSlicerLoop[deckNumber] = false; + MC7000.PADModeSampler[deckNumber] = false; + MC7000.PADModeVelSamp[deckNumber] = false; + MC7000.PADModePitch[deckNumber] = false; + } + // change PAD color when switching to Hot Cue Mode + for (var i = 1; i <= 8; i++) { + if (engine.getValue(group, "hotcue_" + i + "_enabled", true)) { + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14 + i - 1, + MC7000.padColor.hotcueon); + } else { + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14 + i - 1, + MC7000.padColor.hotcueoff); + } + } +}; +// PAD Mode Cue Loop +MC7000.padModeCueLoop = function(channel, control, value, status, group) { + var deckNumber = script.deckFromGroup(group); + if (value === 0x00) + return; // don't respond to note off messages + if (value === 0x7F) { + MC7000.PADModeCue[deckNumber] = false; + MC7000.PADModeCueLoop[deckNumber] = true; + MC7000.PADModeFlip[deckNumber] = false; + MC7000.PADModeRoll[deckNumber] = false; + MC7000.PADModeSavedLoop[deckNumber] = false; + MC7000.PADModeSlicer[deckNumber] = false; + MC7000.PADModeSlicerLoop[deckNumber] = false; + MC7000.PADModeSampler[deckNumber] = false; + MC7000.PADModeVelSamp[deckNumber] = false; + MC7000.PADModePitch[deckNumber] = false; + } + for (var i = 1; i <= 8; i++) { + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14 + i - 1, + MC7000.padColor.alloff); + } +}; +// PAD Mode Flip +MC7000.padModeFlip = function(channel, control, value, status, group) { + var deckNumber = script.deckFromGroup(group); + if (value === 0x00) + return; // don't respond to note off messages + if (value === 0x7F) { + MC7000.PADModeCue[deckNumber] = false; + MC7000.PADModeCueLoop[deckNumber] = false; + MC7000.PADModeFlip[deckNumber] = true; + MC7000.PADModeRoll[deckNumber] = false; + MC7000.PADModeSavedLoop[deckNumber] = false; + MC7000.PADModeSlicer[deckNumber] = false; + MC7000.PADModeSlicerLoop[deckNumber] = false; + MC7000.PADModeSampler[deckNumber] = false; + MC7000.PADModeVelSamp[deckNumber] = false; + MC7000.PADModePitch[deckNumber] = false; + } + for (var i = 1; i <= 8; i++) { + midi.sendShortMsg(0x94 + deckNumber - 1, 0x1C + i - 1, + MC7000.padColor.alloff); + } +}; +// PAD Mode Roll +MC7000.padModeRoll = function(channel, control, value, status, group) { + var deckNumber = script.deckFromGroup(group); + if (value === 0x00) + return; // don't respond to note off messages + if (value === 0x7F) { + MC7000.PADModeCue[deckNumber] = false; + MC7000.PADModeCueLoop[deckNumber] = false; + MC7000.PADModeFlip[deckNumber] = false; + MC7000.PADModeRoll[deckNumber] = true; + MC7000.PADModeSavedLoop[deckNumber] = false; + MC7000.PADModeSlicer[deckNumber] = false; + MC7000.PADModeSlicerLoop[deckNumber] = false; + MC7000.PADModeSampler[deckNumber] = false; + MC7000.PADModeVelSamp[deckNumber] = false; + MC7000.PADModePitch[deckNumber] = false; + } + for (var i = 1; i <= 8; i++) { + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14 + i - 1, + MC7000.padColor.rolloff); + } +}; +// PAD Mode Saved Loop +MC7000.padModeSavedLoop = function(channel, control, value, status, group) { + var deckNumber = script.deckFromGroup(group); + if (value === 0x00) + return; // don't respond to note off messages + if (value === 0x7F) { + MC7000.PADModeCue[deckNumber] = false; + MC7000.PADModeCueLoop[deckNumber] = false; + MC7000.PADModeFlip[deckNumber] = false; + MC7000.PADModeRoll[deckNumber] = false; + MC7000.PADModeSavedLoop[deckNumber] = true; + MC7000.PADModeSlicer[deckNumber] = false; + MC7000.PADModeSlicerLoop[deckNumber] = false; + MC7000.PADModeSampler[deckNumber] = false; + MC7000.PADModeVelSamp[deckNumber] = false; + MC7000.PADModePitch[deckNumber] = false; + } + for (var i = 1; i <= 8; i++) { + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14 + i - 1, + MC7000.padColor.alloff); + } +}; +// PAD Mode Slicer +MC7000.padModeSlicer = function(channel, control, value, status, group) { + var deckNumber = script.deckFromGroup(group); + if (value === 0x00) + return; // don't respond to note off messages + if (value === 0x7F) { + MC7000.PADModeCue[deckNumber] = false; + MC7000.PADModeCueLoop[deckNumber] = false; + MC7000.PADModeFlip[deckNumber] = false; + MC7000.PADModeRoll[deckNumber] = false; + MC7000.PADModeSavedLoop[deckNumber] = false; + MC7000.PADModeSlicer[deckNumber] = true; + MC7000.PADModeSlicerLoop[deckNumber] = false; + MC7000.PADModeSampler[deckNumber] = false; + MC7000.PADModeVelSamp[deckNumber] = false; + MC7000.PADModePitch[deckNumber] = false; + } + for (var i = 1; i <= 8; i++) { + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14 + i - 1, + MC7000.padColor.sliceron); + } +}; +// PAD Mode Slicer Loop +MC7000.padModeSlicerLoop = function(channel, control, value, status, group) { + var deckNumber = script.deckFromGroup(group); + if (value === 0x00) + return; // don't respond to note off messages + if (value === 0x7F) { + MC7000.PADModeCue[deckNumber] = false; + MC7000.PADModeCueLoop[deckNumber] = false; + MC7000.PADModeFlip[deckNumber] = false; + MC7000.PADModeRoll[deckNumber] = false; + MC7000.PADModeSavedLoop[deckNumber] = false; + MC7000.PADModeSlicer[deckNumber] = false; + MC7000.PADModeSlicerLoop[deckNumber] = true; + MC7000.PADModeSampler[deckNumber] = false; + MC7000.PADModeVelSamp[deckNumber] = false; + MC7000.PADModePitch[deckNumber] = false; + } + for (var i = 1; i <= 8; i++) { + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14 + i - 1, + MC7000.padColor.alloff); + } +}; +// PAD Mode Sampler +MC7000.padModeSampler = function(channel, control, value, status, group) { + var deckNumber = script.deckFromGroup(group); + if (value === 0x00) + return; // don't respond to note off messages + if (value === 0x7F) { + MC7000.PADModeCue[deckNumber] = false; + MC7000.PADModeCueLoop[deckNumber] = false; + MC7000.PADModeFlip[deckNumber] = false; + MC7000.PADModeRoll[deckNumber] = false; + MC7000.PADModeSavedLoop[deckNumber] = false; + MC7000.PADModeSlicer[deckNumber] = false; + MC7000.PADModeSlicerLoop[deckNumber] = false; + MC7000.PADModeSampler[deckNumber] = true; + MC7000.PADModeVelSamp[deckNumber] = false; + MC7000.PADModePitch[deckNumber] = false; + } + // change PAD color when switching to Sampler Mode + for (var i = 1; i <= 8; i++) { + if (engine.getValue("[Sampler" + i + "]", "play")) { + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14 + i - 1, + MC7000.padColor.samplerplay); + } else if (engine.getValue("[Sampler" + i + "]", "track_loaded") === 0) { + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14 + i - 1, + MC7000.padColor.sampleroff); + } else if (engine.getValue("[Sampler" + i + "]", "track_loaded") === 1 && + engine.getValue("[Sampler" + i + "]", "play") === 0) { + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14 + i - 1, + MC7000.padColor.samplerloaded); } - // change PAD color when switching to Hot Cue Mode + } +}; +// PAD Mode Velocity Sampler +MC7000.padModeVelSamp = function(channel, control, value, status, group) { + var deckNumber = script.deckFromGroup(group); + if (value === 0x00) + return; // don't respond to note off messages + if (value === 0x7F) { + MC7000.PADModeCue[deckNumber] = false; + MC7000.PADModeCueLoop[deckNumber] = false; + MC7000.PADModeFlip[deckNumber] = false; + MC7000.PADModeRoll[deckNumber] = false; + MC7000.PADModeSavedLoop[deckNumber] = false; + MC7000.PADModeSlicer[deckNumber] = false; + MC7000.PADModeSlicerLoop[deckNumber] = false; + MC7000.PADModeSampler[deckNumber] = false; + MC7000.PADModeVelSamp[deckNumber] = true; + MC7000.PADModePitch[deckNumber] = false; + } + for (var i = 1; i <= 8; i++) { + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14 + i - 1, + MC7000.padColor.alloff); + } +}; +// PAD Mode Pitch +MC7000.padModePitch = function(channel, control, value, status, group) { + var deckNumber = script.deckFromGroup(group); + if (value === 0x00) + return; // don't respond to note off messages + if (value === 0x7F) { + MC7000.PADModeCue[deckNumber] = false; + MC7000.PADModeCueLoop[deckNumber] = false; + MC7000.PADModeFlip[deckNumber] = false; + MC7000.PADModeRoll[deckNumber] = false; + MC7000.PADModeSavedLoop[deckNumber] = false; + MC7000.PADModeSlicer[deckNumber] = true; + MC7000.PADModeSlicerLoop[deckNumber] = false; + MC7000.PADModeSampler[deckNumber] = false; + MC7000.PADModeVelSamp[deckNumber] = false; + MC7000.PADModePitch[deckNumber] = true; + } + for (var i = 1; i <= 8; i++) { + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14 + i - 1, + MC7000.padColor.alloff); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x1C + i - 1, + MC7000.padColor.alloff); + } +}; + +// PAD buttons +MC7000.PadButtons = function(channel, control, value, status, group) { + var deckNumber = script.deckFromGroup(group); + + // activate and clear Hot Cues + if (MC7000.PADModeCue[deckNumber] && + engine.getValue(group, "track_loaded") === 1) { for (var i = 1; i <= 8; i++) { - if (engine.getValue(group, "hotcue_"+i+"_enabled", true)) { - midi.sendShortMsg(0x94 + deckNumber -1, 0x14 + i -1, MC7000.padColor.hotcueon); + if (control === 0x14 + i - 1 && value >= 0x01) { + engine.setValue(group, "hotcue_" + i + "_activate", true); } else { - midi.sendShortMsg(0x94 + deckNumber -1, 0x14 + i -1, MC7000.padColor.hotcueoff); + engine.setValue(group, "hotcue_" + i + "_activate", false); } - } - }; - // PAD Mode Cue Loop - MC7000.padModeCueLoop = function(channel, control, value, status, group) { - var deckNumber = script.deckFromGroup(group); - if (value === 0x00) return; // don't respond to note off messages - if (value === 0x7F) { - MC7000.PADModeCue[deckNumber] = false; - MC7000.PADModeCueLoop[deckNumber] = true; - MC7000.PADModeFlip[deckNumber] = false; - MC7000.PADModeRoll[deckNumber] = false; - MC7000.PADModeSavedLoop[deckNumber] = false; - MC7000.PADModeSlicer[deckNumber] = false; - MC7000.PADModeSlicerLoop[deckNumber] = false; - MC7000.PADModeSampler[deckNumber] = false; - MC7000.PADModeVelSamp[deckNumber] = false; - MC7000.PADModePitch[deckNumber] = false; - } - for (var i = 1; i <= 8; i++) { - midi.sendShortMsg(0x94 + deckNumber -1, 0x14 + i -1, MC7000.padColor.alloff); - } - }; - // PAD Mode Flip - MC7000.padModeFlip = function(channel, control, value, status, group) { - var deckNumber = script.deckFromGroup(group); - if (value === 0x00) return; // don't respond to note off messages - if (value === 0x7F) { - MC7000.PADModeCue[deckNumber] = false; - MC7000.PADModeCueLoop[deckNumber] = false; - MC7000.PADModeFlip[deckNumber] = true; - MC7000.PADModeRoll[deckNumber] = false; - MC7000.PADModeSavedLoop[deckNumber] = false; - MC7000.PADModeSlicer[deckNumber] = false; - MC7000.PADModeSlicerLoop[deckNumber] = false; - MC7000.PADModeSampler[deckNumber] = false; - MC7000.PADModeVelSamp[deckNumber] = false; - MC7000.PADModePitch[deckNumber] = false; - } - for (var i = 1; i <= 8; i++) { - midi.sendShortMsg(0x94 + deckNumber -1, 0x1C + i -1, MC7000.padColor.alloff); - } - }; - // PAD Mode Roll - MC7000.padModeRoll = function(channel, control, value, status, group) { - var deckNumber = script.deckFromGroup(group); - if (value === 0x00) return; // don't respond to note off messages - if (value === 0x7F) { - MC7000.PADModeCue[deckNumber] = false; - MC7000.PADModeCueLoop[deckNumber] = false; - MC7000.PADModeFlip[deckNumber] = false; - MC7000.PADModeRoll[deckNumber] = true; - MC7000.PADModeSavedLoop[deckNumber] = false; - MC7000.PADModeSlicer[deckNumber] = false; - MC7000.PADModeSlicerLoop[deckNumber] = false; - MC7000.PADModeSampler[deckNumber] = false; - MC7000.PADModeVelSamp[deckNumber] = false; - MC7000.PADModePitch[deckNumber] = false; - } - for (var i = 1; i <= 8; i++) { - midi.sendShortMsg(0x94 + deckNumber -1, 0x14 + i -1, MC7000.padColor.rolloff); - } - }; - // PAD Mode Saved Loop - MC7000.padModeSavedLoop = function(channel, control, value, status, group) { - var deckNumber = script.deckFromGroup(group); - if (value === 0x00) return; // don't respond to note off messages - if (value === 0x7F) { - MC7000.PADModeCue[deckNumber] = false; - MC7000.PADModeCueLoop[deckNumber] = false; - MC7000.PADModeFlip[deckNumber] = false; - MC7000.PADModeRoll[deckNumber] = false; - MC7000.PADModeSavedLoop[deckNumber] = true; - MC7000.PADModeSlicer[deckNumber] = false; - MC7000.PADModeSlicerLoop[deckNumber] = false; - MC7000.PADModeSampler[deckNumber] = false; - MC7000.PADModeVelSamp[deckNumber] = false; - MC7000.PADModePitch[deckNumber] = false; - } - for (var i = 1; i <= 8; i++) { - midi.sendShortMsg(0x94 + deckNumber -1, 0x14 + i -1, MC7000.padColor.alloff); - } - }; - // PAD Mode Slicer - MC7000.padModeSlicer = function(channel, control, value, status, group) { - var deckNumber = script.deckFromGroup(group); - if (value === 0x00) return; // don't respond to note off messages - if (value === 0x7F) { - MC7000.PADModeCue[deckNumber] = false; - MC7000.PADModeCueLoop[deckNumber] = false; - MC7000.PADModeFlip[deckNumber] = false; - MC7000.PADModeRoll[deckNumber] = false; - MC7000.PADModeSavedLoop[deckNumber] = false; - MC7000.PADModeSlicer[deckNumber] = true; - MC7000.PADModeSlicerLoop[deckNumber] = false; - MC7000.PADModeSampler[deckNumber] = false; - MC7000.PADModeVelSamp[deckNumber] = false; - MC7000.PADModePitch[deckNumber] = false; - } - for (var i = 1; i <= 8; i++) { - midi.sendShortMsg(0x94 + deckNumber -1, 0x14 + i -1, MC7000.padColor.sliceron); - } - }; - // PAD Mode Slicer Loop - MC7000.padModeSlicerLoop = function(channel, control, value, status, group) { - var deckNumber = script.deckFromGroup(group); - if (value === 0x00) return; // don't respond to note off messages - if (value === 0x7F) { - MC7000.PADModeCue[deckNumber] = false; - MC7000.PADModeCueLoop[deckNumber] = false; - MC7000.PADModeFlip[deckNumber] = false; - MC7000.PADModeRoll[deckNumber] = false; - MC7000.PADModeSavedLoop[deckNumber] = false; - MC7000.PADModeSlicer[deckNumber] = false; - MC7000.PADModeSlicerLoop[deckNumber] = true; - MC7000.PADModeSampler[deckNumber] = false; - MC7000.PADModeVelSamp[deckNumber] = false; - MC7000.PADModePitch[deckNumber] = false; - } - for (var i = 1; i <= 8; i++) { - midi.sendShortMsg(0x94 + deckNumber -1, 0x14 + i -1, MC7000.padColor.alloff); - } - }; - // PAD Mode Sampler - MC7000.padModeSampler = function(channel, control, value, status, group) { - var deckNumber = script.deckFromGroup(group); - if (value === 0x00) return; // don't respond to note off messages - if (value === 0x7F) { - MC7000.PADModeCue[deckNumber] = false; - MC7000.PADModeCueLoop[deckNumber] = false; - MC7000.PADModeFlip[deckNumber] = false; - MC7000.PADModeRoll[deckNumber] = false; - MC7000.PADModeSavedLoop[deckNumber] = false; - MC7000.PADModeSlicer[deckNumber] = false; - MC7000.PADModeSlicerLoop[deckNumber] = false; - MC7000.PADModeSampler[deckNumber] = true; - MC7000.PADModeVelSamp[deckNumber] = false; - MC7000.PADModePitch[deckNumber] = false; - } - // change PAD color when switching to Sampler Mode - for (var i = 1; i <= 8; i++) { - if (engine.getValue("[Sampler"+i+"]", "play")) { - midi.sendShortMsg(0x94 + deckNumber - 1, 0x14 + i -1, MC7000.padColor.samplerplay); - } else if (engine.getValue("[Sampler"+i+"]", "track_loaded") === 0) { - midi.sendShortMsg(0x94 + deckNumber - 1, 0x14 + i -1, MC7000.padColor.sampleroff); - } else if (engine.getValue("[Sampler"+i+"]", "track_loaded") === 1 && engine.getValue("[Sampler"+i+"]", "play") === 0) { - midi.sendShortMsg(0x94 + deckNumber - 1, 0x14 + i -1, MC7000.padColor.samplerloaded); + if (control === 0x1C + i - 1 && value >= 0x01) { + engine.setValue(group, "hotcue_" + i + "_clear", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x1C + i - 1, + MC7000.padColor.hotcueoff); } } - }; - // PAD Mode Velocity Sampler - MC7000.padModeVelSamp = function(channel, control, value, status, group) { - var deckNumber = script.deckFromGroup(group); - if (value === 0x00) return; // don't respond to note off messages - if (value === 0x7F) { - MC7000.PADModeCue[deckNumber] = false; - MC7000.PADModeCueLoop[deckNumber] = false; - MC7000.PADModeFlip[deckNumber] = false; - MC7000.PADModeRoll[deckNumber] = false; - MC7000.PADModeSavedLoop[deckNumber] = false; - MC7000.PADModeSlicer[deckNumber] = false; - MC7000.PADModeSlicerLoop[deckNumber] = false; - MC7000.PADModeSampler[deckNumber] = false; - MC7000.PADModeVelSamp[deckNumber] = true; - MC7000.PADModePitch[deckNumber] = false; - } - for (var i = 1; i <= 8; i++) { - midi.sendShortMsg(0x94 + deckNumber -1, 0x14 + i -1, MC7000.padColor.alloff); - } - }; - // PAD Mode Pitch - MC7000.padModePitch = function(channel, control, value, status, group) { - var deckNumber = script.deckFromGroup(group); - if (value === 0x00) return; // don't respond to note off messages - if (value === 0x7F) { - MC7000.PADModeCue[deckNumber] = false; - MC7000.PADModeCueLoop[deckNumber] = false; - MC7000.PADModeFlip[deckNumber] = false; - MC7000.PADModeRoll[deckNumber] = false; - MC7000.PADModeSavedLoop[deckNumber] = false; - MC7000.PADModeSlicer[deckNumber] = true; - MC7000.PADModeSlicerLoop[deckNumber] = false; - MC7000.PADModeSampler[deckNumber] = false; - MC7000.PADModeVelSamp[deckNumber] = false; - MC7000.PADModePitch[deckNumber] = true; - } - for (var i = 1; i <= 8; i++) { - midi.sendShortMsg(0x94 + deckNumber -1, 0x14 + i -1, MC7000.padColor.alloff); - midi.sendShortMsg(0x94 + deckNumber -1, 0x1C + i -1, MC7000.padColor.alloff); - } - }; - - // PAD buttons - MC7000.PadButtons = function(channel, control, value, status, group) { - var deckNumber = script.deckFromGroup(group); - - // activate and clear Hot Cues - if (MC7000.PADModeCue[deckNumber] && engine.getValue(group, "track_loaded") === 1) { - for (var i = 1; i <= 8; i++) { - if (control === 0x14 + i -1 && value >= 0x01) { - engine.setValue(group, "hotcue_"+i+"_activate", true); - } else { - engine.setValue(group, "hotcue_"+i+"_activate", false); - } - if (control === 0x1C + i -1 && value >= 0x01) { - engine.setValue(group, "hotcue_"+i+"_clear", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x1C + i -1, MC7000.padColor.hotcueoff); + } else if (MC7000.PADModeFlip[deckNumber]) { + return; + } else if (MC7000.PADModeFlip[deckNumber]) { + return; + } else if (MC7000.PADModeRoll[deckNumber]) { + if (control === 0x14 && value >= 0x01) { + engine.setValue(group, "beatlooproll_0.0625_activate", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14, MC7000.padColor.rollon); + } else if (control === 0x14 && value >= 0x00) { + engine.setValue(group, "beatlooproll_0.0625_activate", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14, MC7000.padColor.rolloff); + } else if (control === 0x15 && value >= 0x01) { + engine.setValue(group, "beatlooproll_0.125_activate", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x15, MC7000.padColor.rollon); + } else if (control === 0x15 && value >= 0x00) { + engine.setValue(group, "beatlooproll_0.125_activate", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x15, MC7000.padColor.rolloff); + } else if (control === 0x16 && value >= 0x01) { + engine.setValue(group, "beatlooproll_0.25_activate", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x16, MC7000.padColor.rollon); + } else if (control === 0x16 && value >= 0x00) { + engine.setValue(group, "beatlooproll_0.25_activate", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x16, MC7000.padColor.rolloff); + } else if (control === 0x17 && value >= 0x01) { + engine.setValue(group, "beatlooproll_0.5_activate", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x17, MC7000.padColor.rollon); + } else if (control === 0x17 && value >= 0x00) { + engine.setValue(group, "beatlooproll_0.5_activate", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x17, MC7000.padColor.rolloff); + } else if (control === 0x18 && value >= 0x01) { + engine.setValue(group, "beatlooproll_1_activate", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x18, MC7000.padColor.rollon); + } else if (control === 0x18 && value >= 0x00) { + engine.setValue(group, "beatlooproll_1_activate", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x18, MC7000.padColor.rolloff); + } else if (control === 0x19 && value >= 0x01) { + engine.setValue(group, "beatlooproll_2_activate", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x19, MC7000.padColor.rollon); + } else if (control === 0x19 && value >= 0x00) { + engine.setValue(group, "beatlooproll_2_activate", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x19, MC7000.padColor.rolloff); + } else if (control === 0x1A && value >= 0x01) { + engine.setValue(group, "beatlooproll_4_activate", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x1A, MC7000.padColor.rollon); + } else if (control === 0x1A && value >= 0x00) { + engine.setValue(group, "beatlooproll_4_activate", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x1A, MC7000.padColor.rolloff); + } else if (control === 0x1B && value >= 0x01) { + engine.setValue(group, "beatlooproll_8_activate", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x1B, MC7000.padColor.rollon); + } else if (control === 0x1B && value >= 0x00) { + engine.setValue(group, "beatlooproll_8_activate", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x1B, MC7000.padColor.rolloff); + } + } else if (MC7000.PADModeSavedLoop[deckNumber]) { + return; + } else if (MC7000.PADModeSlicer[deckNumber]) { + if (control === 0x14 && value >= 0x01) { + engine.setValue(group, "beatjump_1_forward", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14, + MC7000.padColor.slicerJumpFwd); + } else if (control === 0x14 && value >= 0x00) { + engine.setValue(group, "beatjump_1_forward", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x14, MC7000.padColor.sliceron); + } else if (control === 0x15 && value >= 0x01) { + engine.setValue(group, "beatjump_2_forward", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x15, + MC7000.padColor.slicerJumpFwd); + } else if (control === 0x15 && value >= 0x00) { + engine.setValue(group, "beatjump_2_forward", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x15, MC7000.padColor.sliceron); + } else if (control === 0x16 && value >= 0x01) { + engine.setValue(group, "beatjump_4_forward", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x16, + MC7000.padColor.slicerJumpFwd); + } else if (control === 0x16 && value >= 0x00) { + engine.setValue(group, "beatjump_4_forward", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x16, MC7000.padColor.sliceron); + } else if (control === 0x17 && value >= 0x01) { + engine.setValue(group, "beatjump_8_forward", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x17, + MC7000.padColor.slicerJumpFwd); + } else if (control === 0x17 && value >= 0x00) { + engine.setValue(group, "beatjump_8_forward", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x17, MC7000.padColor.sliceron); + } else if (control === 0x18 && value >= 0x01) { + engine.setValue(group, "beatjump_1_backward", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x18, + MC7000.padColor.slicerJumpBack); + } else if (control === 0x18 && value >= 0x00) { + engine.setValue(group, "beatjump_1_backward", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x18, MC7000.padColor.sliceron); + } else if (control === 0x19 && value >= 0x01) { + engine.setValue(group, "beatjump_2_backward", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x19, + MC7000.padColor.slicerJumpBack); + } else if (control === 0x19 && value >= 0x00) { + engine.setValue(group, "beatjump_2_backward", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x19, MC7000.padColor.sliceron); + } else if (control === 0x1A && value >= 0x01) { + engine.setValue(group, "beatjump_4_backward", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x1A, + MC7000.padColor.slicerJumpBack); + } else if (control === 0x1A && value >= 0x00) { + engine.setValue(group, "beatjump_4_backward", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x1A, MC7000.padColor.sliceron); + } else if (control === 0x1B && value >= 0x01) { + engine.setValue(group, "beatjump_8_backward", true); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x1B, + MC7000.padColor.slicerJumpBack); + } else if (control === 0x1B && value >= 0x00) { + engine.setValue(group, "beatjump_8_backward", false); + midi.sendShortMsg(0x94 + deckNumber - 1, 0x1B, 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) { + if (engine.getValue("[Sampler" + i + "]", "track_loaded") === 0) { + engine.setValue("[Sampler" + i + "]", "LoadSelectedTrack", 1); + } else if (engine.getValue("[Sampler" + i + "]", "track_loaded") === + 1) { + engine.setValue("[Sampler" + i + "]", "cue_gotoandplay", 1); } - } - } else if (MC7000.PADModeFlip[deckNumber]) { - return; - } else if (MC7000.PADModeFlip[deckNumber]) { - return; - } else if (MC7000.PADModeRoll[deckNumber]) { - if (control === 0x14 && value >= 0x01) { - engine.setValue(group, "beatlooproll_0.0625_activate", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x14, MC7000.padColor.rollon); - } else if (control === 0x14 && value >= 0x00) { - engine.setValue(group, "beatlooproll_0.0625_activate", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x14, MC7000.padColor.rolloff); - } else if (control === 0x15 && value >= 0x01) { - engine.setValue(group, "beatlooproll_0.125_activate", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x15, MC7000.padColor.rollon); - } else if (control === 0x15 && value >= 0x00) { - engine.setValue(group, "beatlooproll_0.125_activate", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x15, MC7000.padColor.rolloff); - } else if (control === 0x16 && value >= 0x01) { - engine.setValue(group, "beatlooproll_0.25_activate", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x16, MC7000.padColor.rollon); - } else if (control === 0x16 && value >= 0x00) { - engine.setValue(group, "beatlooproll_0.25_activate", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x16, MC7000.padColor.rolloff); - } else if (control === 0x17 && value >= 0x01) { - engine.setValue(group, "beatlooproll_0.5_activate", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x17, MC7000.padColor.rollon); - } else if (control === 0x17 && value >= 0x00) { - engine.setValue(group, "beatlooproll_0.5_activate", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x17, MC7000.padColor.rolloff); - } else if (control === 0x18 && value >= 0x01) { - engine.setValue(group, "beatlooproll_1_activate", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x18, MC7000.padColor.rollon); - } else if (control === 0x18 && value >= 0x00) { - engine.setValue(group, "beatlooproll_1_activate", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x18, MC7000.padColor.rolloff); - } else if (control === 0x19 && value >= 0x01) { - engine.setValue(group, "beatlooproll_2_activate", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x19, MC7000.padColor.rollon); - } else if (control === 0x19 && value >= 0x00) { - engine.setValue(group, "beatlooproll_2_activate", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x19, MC7000.padColor.rolloff); - } else if (control === 0x1A && value >= 0x01) { - engine.setValue(group, "beatlooproll_4_activate", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x1A, MC7000.padColor.rollon); - } else if (control === 0x1A && value >= 0x00) { - engine.setValue(group, "beatlooproll_4_activate", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x1A, MC7000.padColor.rolloff); - } else if (control === 0x1B && value >= 0x01) { - engine.setValue(group, "beatlooproll_8_activate", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x1B, MC7000.padColor.rollon); - } else if (control === 0x1B && value >= 0x00) { - engine.setValue(group, "beatlooproll_8_activate", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x1B, MC7000.padColor.rolloff); - } - } else if (MC7000.PADModeSavedLoop[deckNumber]) { - return; - } else if (MC7000.PADModeSlicer[deckNumber]) { - if (control === 0x14 && value >= 0x01) { - engine.setValue(group, "beatjump_1_forward", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x14, MC7000.padColor.slicerJumpFwd); - } else if (control === 0x14 && value >= 0x00) { - engine.setValue(group, "beatjump_1_forward", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x14, MC7000.padColor.sliceron); - } else if (control === 0x15 && value >= 0x01) { - engine.setValue(group, "beatjump_2_forward", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x15, MC7000.padColor.slicerJumpFwd); - } else if (control === 0x15 && value >= 0x00) { - engine.setValue(group, "beatjump_2_forward", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x15, MC7000.padColor.sliceron); - } else if (control === 0x16 && value >= 0x01) { - engine.setValue(group, "beatjump_4_forward", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x16, MC7000.padColor.slicerJumpFwd); - } else if (control === 0x16 && value >= 0x00) { - engine.setValue(group, "beatjump_4_forward", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x16, MC7000.padColor.sliceron); - } else if (control === 0x17 && value >= 0x01) { - engine.setValue(group, "beatjump_8_forward", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x17, MC7000.padColor.slicerJumpFwd); - } else if (control === 0x17 && value >= 0x00) { - engine.setValue(group, "beatjump_8_forward", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x17, MC7000.padColor.sliceron); - } else if (control === 0x18 && value >= 0x01) { - engine.setValue(group, "beatjump_1_backward", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x18, MC7000.padColor.slicerJumpBack); - } else if (control === 0x18 && value >= 0x00) { - engine.setValue(group, "beatjump_1_backward", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x18, MC7000.padColor.sliceron); - } else if (control === 0x19 && value >= 0x01) { - engine.setValue(group, "beatjump_2_backward", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x19, MC7000.padColor.slicerJumpBack); - } else if (control === 0x19 && value >= 0x00) { - engine.setValue(group, "beatjump_2_backward", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x19, MC7000.padColor.sliceron); - } else if (control === 0x1A && value >= 0x01) { - engine.setValue(group, "beatjump_4_backward", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x1A, MC7000.padColor.slicerJumpBack); - } else if (control === 0x1A && value >= 0x00) { - engine.setValue(group, "beatjump_4_backward", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x1A, MC7000.padColor.sliceron); - } else if (control === 0x1B && value >= 0x01) { - engine.setValue(group, "beatjump_8_backward", true); - midi.sendShortMsg(0x94 + deckNumber -1, 0x1B, MC7000.padColor.slicerJumpBack); - } else if (control === 0x1B && value >= 0x00) { - engine.setValue(group, "beatjump_8_backward", false); - midi.sendShortMsg(0x94 + deckNumber -1, 0x1B, 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) { - if (engine.getValue("[Sampler"+i+"]", "track_loaded") === 0) { - engine.setValue("[Sampler"+i+"]", "LoadSelectedTrack", 1); - } else if (engine.getValue("[Sampler"+i+"]", "track_loaded") === 1) { - engine.setValue("[Sampler"+i+"]", "cue_gotoandplay", 1); - } - } else if (control === 0x1C + i -1 && value >= 0x01) { - if (engine.getValue("[Sampler"+i+"]", "play") === 1) { - engine.setValue("[Sampler"+i+"]", "cue_gotoandstop", 1); - midi.sendShortMsg(0x94 + deckNumber - 1, 0x1C + i - 1, MC7000.padColor.samplerloaded); - } else { - engine.setValue("[Sampler"+i+"]", "eject", 1); - midi.sendShortMsg(0x94 + deckNumber - 1, 0x1C + i -1, MC7000.padColor.sampleroff); - engine.setValue("[Sampler"+i+"]", "eject", 0); - } + } else if (control === 0x1C + i - 1 && value >= 0x01) { + if (engine.getValue("[Sampler" + i + "]", "play") === 1) { + engine.setValue("[Sampler" + i + "]", "cue_gotoandstop", 1); + |