summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Schürmann <daschuer@mixxx.org>2019-01-30 22:46:46 +0100
committerDaniel Schürmann <daschuer@mixxx.org>2019-01-30 22:46:46 +0100
commit97d1a4c99754ea61eb7899f9c0ca23e4667820e0 (patch)
tree27c0da5172b005a7990e67116eec0230cb6c56c9
parent0ed93a9a3236d81829bac431f6b5ae6c6c748648 (diff)
parent1e193407fda806d9cc44116ff439de47bf2cbf70 (diff)
Merge remote-tracking branch 'upstream/2.2'
Conflicts: res/controllers/American-Audio-RADIUS-2000-scripts.js res/controllers/Behringer-BCD3000-Advanced-scripts.js res/controllers/Behringer-BCD3000-scripts.js res/controllers/Hercules-DJ-Console-Mk4-scripts.js res/controllers/common-hid-packet-parser.js res/skins/Tango/style.qss
-rw-r--r--.gitignore1
-rw-r--r--res/controllers/Akai-LPD8-RK-scripts.js580
-rw-r--r--res/controllers/Akai-LPD8-RK.midi.xml72
-rw-r--r--res/controllers/American Audio RADIUS 2000 CH1.midi.xml4
-rw-r--r--res/controllers/American Audio RADIUS 2000 CH2.midi.xml4
-rw-r--r--res/controllers/American Audio VMS2.midi.xml3150
-rw-r--r--res/controllers/American-Audio-RADIUS-2000-scripts.js302
-rw-r--r--res/controllers/Behringer BCD3000 Advanced.midi.xml4
-rw-r--r--res/controllers/Behringer-BCD3000-Advanced-scripts.js290
-rw-r--r--res/controllers/Behringer-BCD3000-scripts.js132
-rw-r--r--res/controllers/Behringer-CMDStudio4a-scripts.js32
-rw-r--r--res/controllers/DJ-Tech CDJ-101.midi.xml42
-rw-r--r--res/controllers/DJ-Tech DJM-101.midi.xml48
-rw-r--r--res/controllers/DJ-Tech Mix-101.midi.xml24
-rw-r--r--res/controllers/DJ-Tech Mixer One.midi.xml290
-rw-r--r--res/controllers/DJ-Tech i-Mix Reload.midi.xml38
-rw-r--r--res/controllers/DJ-Tech-CDJ-101-scripts.js188
-rw-r--r--res/controllers/DJ-Tech-DJM-101-scripts.js68
-rw-r--r--res/controllers/DJ-Tech-Kontrol-One-scripts.js2038
-rw-r--r--res/controllers/DJ-Tech-Mixer-One-scripts.js110
-rw-r--r--res/controllers/DJ-Tech-i-Mix-Reload-scripts.js170
-rw-r--r--res/controllers/Denon DN HS5500.midi.xml10
-rw-r--r--res/controllers/Denon DN SC2000.midi.xml384
-rw-r--r--res/controllers/Denon MC3000.midi.xml1134
-rw-r--r--res/controllers/Denon-DN-SC2000.midi.js686
-rw-r--r--res/controllers/Denon-MC3000-scripts.js678
-rw-r--r--res/controllers/Denon-MC4000-scripts.js8
-rw-r--r--res/controllers/EKS-Otus.js28
-rw-r--r--res/controllers/FaderFoxDJ2.midi.xml88
-rw-r--r--res/controllers/Gemini-FirstMix-scripts.js96
-rw-r--r--res/controllers/Hercules DJ Console Mac Edition.midi.xml28
-rw-r--r--res/controllers/Hercules DJ Console Mk2.midi.xml6
-rw-r--r--res/controllers/Hercules DJ Console Mk4.midi.xml658
-rw-r--r--res/controllers/Hercules DJ Console RMX 2.midi.xml3282
-rw-r--r--res/controllers/Hercules DJ Console RMX Advanced.midi.xml58
-rw-r--r--res/controllers/Hercules DJ Console RMX.midi.xml58
-rw-r--r--res/controllers/Hercules DJ Control Instinct.midi.xml2
-rw-r--r--res/controllers/Hercules DJ Control MP3 e2-scripts.js152
-rw-r--r--res/controllers/Hercules DJ Control MP3.midi.xml844
-rw-r--r--res/controllers/Hercules DJ Control Steel.midi.xml32
-rw-r--r--res/controllers/Hercules DJControl Compact.midi.xml16
-rw-r--r--res/controllers/Hercules-DJ-Console-Mk1-hid-scripts.js1008
-rw-r--r--res/controllers/Hercules-DJ-Console-Mk2-hid-scripts.js972
-rw-r--r--res/controllers/Hercules-DJ-Console-Mk2-scripts.js554
-rw-r--r--res/controllers/Hercules-DJ-Console-Mk4-scripts.js444
-rw-r--r--res/controllers/Hercules-DJ-Console-RMX-scripts.js76
-rw-r--r--res/controllers/Hercules-DJ-Control-AIR-scripts.js172
-rw-r--r--res/controllers/Hercules-DJ-Control-Instinct-scripts.js166
-rw-r--r--res/controllers/Hercules-DJ-Control-MP3-hid-scripts.js1036
-rw-r--r--res/controllers/Hercules-DJ-Control-MP3-scripts.js6
-rw-r--r--res/controllers/Hercules-DJ-Control-Steel-scripts.js1124
-rw-r--r--res/controllers/Ion-Discover-DJ-scripts.js54
-rw-r--r--res/controllers/KANE_QuNeo.midi.xml6784
-rw-r--r--res/controllers/KANE_QuNeo_scripts.js1740
-rw-r--r--res/controllers/Kontrol Dj KDJ500.midi.xml4
-rw-r--r--res/controllers/Korg nanoKONTROL 2.midi.xml2
-rw-r--r--res/controllers/Korg nanoPAD2.midi.xml24
-rw-r--r--res/controllers/Korg-nanoKONTROL-2-scripts.js1586
-rw-r--r--res/controllers/Korg-nanoPAD2-scripts.js190
-rw-r--r--res/controllers/Midi_for_light.midi.xml28
-rw-r--r--res/controllers/Nintendo-Wiimote.js30
-rw-r--r--res/controllers/Pioneer-CDJ-HID.js10
-rw-r--r--res/controllers/Traktor-Kontrol-F1-scripts.js53
-rw-r--r--res/controllers/Traktor-Kontrol-S4-MK2-hid-scripts.js34
-rw-r--r--res/controllers/common-controller-scripts.js465
-rw-r--r--res/controllers/common-hid-devices.js70
-rw-r--r--res/controllers/common-hid-packet-parser.js2145
-rw-r--r--res/controllers/korg_nanokontrol2.mixco.output.js6
-rw-r--r--res/controllers/maudio_xponent.mixco.output.js6
-rw-r--r--res/skins/LateNight/style.qss7
-rw-r--r--res/skins/Tango/style.qss12
-rw-r--r--src/library/previewbuttondelegate.cpp38
-rw-r--r--src/library/previewbuttondelegate.h25
-rw-r--r--src/library/tableitemdelegate.cpp2
-rw-r--r--src/widget/wspinny.cpp5
75 files changed, 17369 insertions, 17344 deletions
diff --git a/.gitignore b/.gitignore
index 84df7f16ac..ba9739c668 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,5 +58,6 @@ lib/*/lib/*.lib
lib/qtscript-bytearray/*.cc
+.idea
*.vscode
compile_commands.json
diff --git a/res/controllers/Akai-LPD8-RK-scripts.js b/res/controllers/Akai-LPD8-RK-scripts.js
index f52b2e9bd3..35950bb273 100644
--- a/res/controllers/Akai-LPD8-RK-scripts.js
+++ b/res/controllers/Akai-LPD8-RK-scripts.js
@@ -240,356 +240,356 @@ LPD8RK.loops["b33"] = new Array("[Sampler2]", "8", 0xB3, 0x03);
LPD8RK.init = function (id, debug) { // called when the device is opened & set up
- if (LPD8RK.debug){print("###init##############")};
- //soft takeovers
- engine.softTakeover("[Master]","crossfader",true);
- engine.softTakeover("[Channel1]","volume",true);
- engine.softTakeover("[Channel1]","rate",true);
- engine.softTakeover("[Channel2]","volume",true);
- engine.softTakeover("[Channel2]","rate",true);
- engine.softTakeover("[Sampler1]","volume",true);
- engine.softTakeover("[Sampler1]","rate",true);
- engine.softTakeover("[Sampler2]","volume",true);
- engine.softTakeover("[Sampler2]","rate",true);
-
- //set LED timer
- LPD8RK.ledTimer = engine.beginTimer(LPD8RK.LEDinterval, "LPD8RK.setLeds()");
+ if (LPD8RK.debug){print("###init##############")};
+ //soft takeovers
+ engine.softTakeover("[Master]","crossfader",true);
+ engine.softTakeover("[Channel1]","volume",true);
+ engine.softTakeover("[Channel1]","rate",true);
+ engine.softTakeover("[Channel2]","volume",true);
+ engine.softTakeover("[Channel2]","rate",true);
+ engine.softTakeover("[Sampler1]","volume",true);
+ engine.softTakeover("[Sampler1]","rate",true);
+ engine.softTakeover("[Sampler2]","volume",true);
+ engine.softTakeover("[Sampler2]","rate",true);
+
+ //set LED timer
+ LPD8RK.ledTimer = engine.beginTimer(LPD8RK.LEDinterval, "LPD8RK.setLeds()");
};
LPD8RK.shutdown = function () {
- engine.stopTimer(LPD8RK.ledTimer);
+ engine.stopTimer(LPD8RK.ledTimer);
};
LPD8RK.resetLEDTimer = function () {
- engine.stopTimer(LPD8RK.ledTimer);
- LPD8RK.setLeds()
- LPD8RK.ledTimer = engine.beginTimer(LPD8RK.LEDinterval, "LPD8RK.setLeds()");
+ engine.stopTimer(LPD8RK.ledTimer);
+ LPD8RK.setLeds()
+ LPD8RK.ledTimer = engine.beginTimer(LPD8RK.LEDinterval, "LPD8RK.setLeds()");
};
LPD8RK.setLeds = function () {
- //runs repeatedly on a timer set in init()
- //has to run on a timer because you apparently can only set LEDs on the current prog selection on the LPD8
- //ie: leds on a PAD or CC other than the one you're currently using can't be set.
- //and no midi messages are sent when you change a PROG or pad. No way of telling MIXXX which LEDs are currently active
- //so, this runs 4x a second to make sure LEDs are updated. Kludge, but so it goes.
-
- //hotcues
- for (var id in LPD8RK.hotcues){
- for (var bank in LPD8RK.hotcues[id]){
- //iterate through hotcues for current bank, set hotcue leds
- var status = LPD8RK.hotcues[id][LPD8RK.hotcueBank][2];
- var ctrl = LPD8RK.hotcues[id][LPD8RK.hotcueBank][3];
- var state = engine.getValue(LPD8RK.hotcues[id][LPD8RK.hotcueBank][0], "hotcue_"+LPD8RK.hotcues[id][LPD8RK.hotcueBank][1]+"_enabled");
-
- //if (LPD8RK.debug){print("midi.sendShortMsg("+status+", "+ctrl+", "+state+")")};
-
- LPD8RK.lightLED(status, ctrl, state);
- };
- };
-
- //loops
- for (var id in LPD8RK.loops){
- //iterate through hotcues, set hotcue leds
- var status = LPD8RK.loops[id][2];
- var ctrl = LPD8RK.loops[id][3];
- var state = engine.getValue(LPD8RK.loops[id][0], "beatloop_"+LPD8RK.loops[id][1]+"_enabled");
-
- //if (LPD8RK.debug){print("midi.sendShortMsg("+status+", "+ctrl+", "+state+")")};
-
- LPD8RK.lightLED(status, ctrl, state);
- };
-
- //reloop buttons
- LPD8RK.lightLED(0xb0, 0x01, engine.getValue("[Channel1]", "loop_enabled"));
- LPD8RK.lightLED(0xb1, 0x01, engine.getValue("[Channel2]", "loop_enabled"));
- LPD8RK.lightLED(0xb2, 0x01, engine.getValue("[Sampler1]", "loop_enabled"));
- LPD8RK.lightLED(0xb3, 0x01, engine.getValue("[Sampler2]", "loop_enabled"));
- };
+ //runs repeatedly on a timer set in init()
+ //has to run on a timer because you apparently can only set LEDs on the current prog selection on the LPD8
+ //ie: leds on a PAD or CC other than the one you're currently using can't be set.
+ //and no midi messages are sent when you change a PROG or pad. No way of telling MIXXX which LEDs are currently active
+ //so, this runs 4x a second to make sure LEDs are updated. Kludge, but so it goes.
+
+ //hotcues
+ for (var id in LPD8RK.hotcues){
+ for (var bank in LPD8RK.hotcues[id]){
+ //iterate through hotcues for current bank, set hotcue leds
+ var status = LPD8RK.hotcues[id][LPD8RK.hotcueBank][2];
+ var ctrl = LPD8RK.hotcues[id][LPD8RK.hotcueBank][3];
+ var state = engine.getValue(LPD8RK.hotcues[id][LPD8RK.hotcueBank][0], "hotcue_"+LPD8RK.hotcues[id][LPD8RK.hotcueBank][1]+"_enabled");
+
+ //if (LPD8RK.debug){print("midi.sendShortMsg("+status+", "+ctrl+", "+state+")")};
+
+ LPD8RK.lightLED(status, ctrl, state);
+ };
+ };
+
+ //loops
+ for (var id in LPD8RK.loops){
+ //iterate through hotcues, set hotcue leds
+ var status = LPD8RK.loops[id][2];
+ var ctrl = LPD8RK.loops[id][3];
+ var state = engine.getValue(LPD8RK.loops[id][0], "beatloop_"+LPD8RK.loops[id][1]+"_enabled");
+
+ //if (LPD8RK.debug){print("midi.sendShortMsg("+status+", "+ctrl+", "+state+")")};
+
+ LPD8RK.lightLED(status, ctrl, state);
+ };
+
+ //reloop buttons
+ LPD8RK.lightLED(0xb0, 0x01, engine.getValue("[Channel1]", "loop_enabled"));
+ LPD8RK.lightLED(0xb1, 0x01, engine.getValue("[Channel2]", "loop_enabled"));
+ LPD8RK.lightLED(0xb2, 0x01, engine.getValue("[Sampler1]", "loop_enabled"));
+ LPD8RK.lightLED(0xb3, 0x01, engine.getValue("[Sampler2]", "loop_enabled"));
+ };
LPD8RK.lightLED = function (status, ctrl, state){
- //function to check for valid LED lighting messages - LPD8 seems to go into a weird nonresponsive mode when some unknown code is sent to it
- //don't know what the messed code is, but this function checks for valid LED addresses. Hopefully this will prevent problems.
- if (LPD8RK.validLEDS[status][ctrl] !== true){
- print("######## INVALID STATUS ########");
- return false;
- } else {
- if (state > 0 || state === true){state=1;}//make sure state is valid
- midi.sendShortMsg(status, ctrl, state);
- }
- };
-
+ //function to check for valid LED lighting messages - LPD8 seems to go into a weird nonresponsive mode when some unknown code is sent to it
+ //don't know what the messed code is, but this function checks for valid LED addresses. Hopefully this will prevent problems.
+ if (LPD8RK.validLEDS[status][ctrl] !== true){
+ print("######## INVALID STATUS ########");
+ return false;
+ } else {
+ if (state > 0 || state === true){state=1;}//make sure state is valid
+ midi.sendShortMsg(status, ctrl, state);
+ }
+ };
+
LPD8RK.clear = function (){//enables hotcue clearing
- if (LPD8RK.debug){print("###hotcueclear##############")};
- LPD8RK.hotcueClear=true;
- };
+ if (LPD8RK.debug){print("###hotcueclear##############")};
+ LPD8RK.hotcueClear=true;
+ };
LPD8RK.noclear = function (){//disables hotcue clearing
- LPD8RK.hotcueClear=false;
- };
+ LPD8RK.hotcueClear=false;
+ };
LPD8RK.hotcueButton = function (channel, control, value, status, group) {
- //weird status bug workaround
- if (channel==0 && status != 0x90){status = 0x90};
- if (channel==1 && status != 0x91){status = 0x91};
- if (channel==2 && status != 0x92){status = 0x92};
- if (channel==3 && status != 0x93){status = 0x93};
-
- if (LPD8RK.debug){print("###hotcueButton##############")};
- if (LPD8RK.debug){print("status:"+status)};
- if (LPD8RK.debug){print("channel:"+channel)};
- if (LPD8RK.debug){print("control:"+control)};
- if (LPD8RK.debug){print("hotcuebank:"+LPD8RK.hotcueBank)};
- if (LPD8RK.debug){print("phrase:#"+status.toString(16).toLowerCase()+control.toString(16).toLowerCase()+"#")};
- //activate or clear depending on whether clear button is pressed
- var thecue = LPD8RK.hotcues[status.toString(16).toLowerCase()+control.toString(16).toLowerCase()][LPD8RK.hotcueBank];
- if (LPD8RK.hotcueClear){
- engine.setValue(thecue[0], "hotcue_"+thecue[1]+"_clear", 1);
- engine.setValue(thecue[0], "hotcue_"+thecue[1]+"_clear", 0);
- if (LPD8RK.debug){print("cleared")};
- } else {
- engine.setValue(thecue[0], "hotcue_"+thecue[1]+"_activate", 1);
- engine.setValue(thecue[0], "hotcue_"+thecue[1]+"_activate", 0);
- if (LPD8RK.debug){print("###"+status.toString(16).toLowerCase()+control.toString(16).toLowerCase()+"--activated")};
- };
-
- };
+ //weird status bug workaround
+ if (channel==0 && status != 0x90){status = 0x90};
+ if (channel==1 && status != 0x91){status = 0x91};
+ if (channel==2 && status != 0x92){status = 0x92};
+ if (channel==3 && status != 0x93){status = 0x93};
+
+ if (LPD8RK.debug){print("###hotcueButton##############")};
+ if (LPD8RK.debug){print("status:"+status)};
+ if (LPD8RK.debug){print("channel:"+channel)};
+ if (LPD8RK.debug){print("control:"+control)};
+ if (LPD8RK.debug){print("hotcuebank:"+LPD8RK.hotcueBank)};
+ if (LPD8RK.debug){print("phrase:#"+status.toString(16).toLowerCase()+control.toString(16).toLowerCase()+"#")};
+ //activate or clear depending on whether clear button is pressed
+ var thecue = LPD8RK.hotcues[status.toString(16).toLowerCase()+control.toString(16).toLowerCase()][LPD8RK.hotcueBank];
+ if (LPD8RK.hotcueClear){
+ engine.setValue(thecue[0], "hotcue_"+thecue[1]+"_clear", 1);
+ engine.setValue(thecue[0], "hotcue_"+thecue[1]+"_clear", 0);
+ if (LPD8RK.debug){print("cleared")};
+ } else {
+ engine.setValue(thecue[0], "hotcue_"+thecue[1]+"_activate", 1);
+ engine.setValue(thecue[0], "hotcue_"+thecue[1]+"_activate", 0);
+ if (LPD8RK.debug){print("###"+status.toString(16).toLowerCase()+control.toString(16).toLowerCase()+"--activated")};
+ };
+
+ };
LPD8RK.loopButton = function (channel, control, value, status, group) {
- if (LPD8RK.debug){print(LPD8RK.looplen+"len");}
- if (LPD8RK.debug){print(LPD8RK.looptype+"type");}
- //activate beatloop
- var theloop = LPD8RK.loops[status.toString(16).toLowerCase()+control.toString(16).toLowerCase()];
- if (value>0){//button was pressed
- LPD8RK.loopbuttonDown=true;
- engine.setValue(group, LPD8RK.looptype+"_"+theloop[1]+"_activate", 1);
- } else {//button was released
- LPD8RK.loopbuttonDown=false;
- };
-
- };
+ if (LPD8RK.debug){print(LPD8RK.looplen+"len");}
+ if (LPD8RK.debug){print(LPD8RK.looptype+"type");}
+ //activate beatloop
+ var theloop = LPD8RK.loops[status.toString(16).toLowerCase()+control.toString(16).toLowerCase()];
+ if (value>0){//button was pressed
+ LPD8RK.loopbuttonDown=true;
+ engine.setValue(group, LPD8RK.looptype+"_"+theloop[1]+"_activate", 1);
+ } else {//button was released
+ LPD8RK.loopbuttonDown=false;
+ };
+
+ };
LPD8RK.reloopButton = function (channel, control, value, status, group) {
- if (LPD8RK.debug){print(LPD8RK.looplen+"len");}
- if (LPD8RK.debug){print(LPD8RK.looptype+"type");}
-
- if (value>0){//button was pressed
- engine.stopTimer(LPD8RK.reloopTimer);
- LPD8RK.loopbuttonDown=true;
- LPD8RK.doreloop=true;
- LPD8RK.reloopTimer = engine.beginTimer(500, "LPD8RK.disablereloop()", true);
- } else {//button was released
- LPD8RK.loopbuttonDown=false;
- if (LPD8RK.doreloop===true) {engine.setValue(group, "reloop_exit", 1);};
- LPD8RK.doreloop=true;
- engine.stopTimer(LPD8RK.reloopTimer);
- };
-
- };
+ if (LPD8RK.debug){print(LPD8RK.looplen+"len");}
+ if (LPD8RK.debug){print(LPD8RK.looptype+"type");}
+
+ if (value>0){//button was pressed
+ engine.stopTimer(LPD8RK.reloopTimer);
+ LPD8RK.loopbuttonDown=true;
+ LPD8RK.doreloop=true;
+ LPD8RK.reloopTimer = engine.beginTimer(500, "LPD8RK.disablereloop()", true);
+ } else {//button was released
+ LPD8RK.loopbuttonDown=false;
+ if (LPD8RK.doreloop===true) {engine.setValue(group, "reloop_exit", 1);};
+ LPD8RK.doreloop=true;
+ engine.stopTimer(LPD8RK.reloopTimer);
+ };
+
+ };
LPD8RK.disablereloop = function () {
- //timed function - fires half a second after pressing reloop. Don't do the reloop if you hold down the button (so you can move the loop without exiting)
- LPD8RK.doreloop=false;
- };
+ //timed function - fires half a second after pressing reloop. Don't do the reloop if you hold down the button (so you can move the loop without exiting)
+ LPD8RK.doreloop=false;
+ };
LPD8RK.looptypeDial = function (channel, control, value, status, group) {
- //activates variable length type depending on dial position
- //beatlooproll only works in 1.11 or above - script is a placeholder, knob used to select hotcue bank for now
- //if(value>63){LPD8RK.looptype="beatlooproll";}else{LPD8RK.looptype="beatloop";}
- //if (LPD8RK.debug){print(LPD8RK.looptype);}
- };
+ //activates variable length type depending on dial position
+ //beatlooproll only works in 1.11 or above - script is a placeholder, knob used to select hotcue bank for now
+ //if(value>63){LPD8RK.looptype="beatlooproll";}else{LPD8RK.looptype="beatloop";}
+ //if (LPD8RK.debug){print(LPD8RK.looptype);}
+ };
LPD8RK.resetOldBank = function () {
- //clears stored old hotcue bank
- LPD8RK.oldHotcueBank=0;
- };
+ //clears stored old hotcue bank
+ LPD8RK.oldHotcueBank=0;
+ };
LPD8RK.hotcueBankDial = function (channel, control, value, status, group) {
- //sets which hotcue bank to display (separate this out on dedicated controller)
-
- //pause LED resets, so bank indicator lights will be visible
- engine.stopTimer(LPD8RK.ledTimer);
-
- //select hotcue bank
- if (value>=0 && value <=12){LPD8RK.hotcueBank=1;};
- if (value>12 && value <=46){LPD8RK.hotcueBank=2;};
- if (value>46 && value <=80){LPD8RK.hotcueBank=3;};
- if (value>80 && value <=114){LPD8RK.hotcueBank=4;};
- if (value>114 && value <=128){LPD8RK.hotcueBank=5;};
-
- //light up indicator light
- if (LPD8RK.oldHotcueBank != LPD8RK.hotcueBank){//check if the bank's changed. If it has, change the LEDs - LPD8RK.oldHotcueBank != LPD8RK.hotcueBank
- for (var id in LPD8RK.hotcues){
- for (var bank in LPD8RK.hotcues[id][1]){
- var status = LPD8RK.hotcues[id][1][2];
- var ctrl = LPD8RK.hotcues[id][1][3];
- //find bank number indicator light
- if (LPD8RK.hotcues[id][1][1]==LPD8RK.hotcueBank){
- var state = 1;
- }else{
- var state = 0;
- };
-
- LPD8RK.lightLED(status, ctrl, state);
- };
- };
- };
- //record last hotcue bank
- LPD8RK.oldHotcueBank=LPD8RK.hotcueBank;
- //set timer to clear old bank number after 500 msec, so bank indicator light will light up
- engine.stopTimer(LPD8RK.oldbanktimer);
- LPD8RK.oldbanktimer = engine.beginTimer(500, "LPD8RK.resetOldBank()", true);
-
- //set timer to restart LED updates in 500 msec
- engine.stopTimer(LPD8RK.LEDPauseTimer);
- LPD8RK.LEDPauseTimer = engine.beginTimer(LPD8RK.LEDinterval, "LPD8RK.resetLEDTimer()", true);
- };
+ //sets which hotcue bank to display (separate this out on dedicated controller)
+
+ //pause LED resets, so bank indicator lights will be visible
+ engine.stopTimer(LPD8RK.ledTimer);
+
+ //select hotcue bank
+ if (value>=0 && value <=12){LPD8RK.hotcueBank=1;};
+ if (value>12 && value <=46){LPD8RK.hotcueBank=2;};
+ if (value>46 && value <=80){LPD8RK.hotcueBank=3;};
+ if (value>80 && value <=114){LPD8RK.hotcueBank=4;};
+ if (value>114 && value <=128){LPD8RK.hotcueBank=5;};
+
+ //light up indicator light
+ if (LPD8RK.oldHotcueBank != LPD8RK.hotcueBank){//check if the bank's changed. If it has, change the LEDs - LPD8RK.oldHotcueBank != LPD8RK.hotcueBank
+ for (var id in LPD8RK.hotcues){
+ for (var bank in LPD8RK.hotcues[id][1]){
+ var status = LPD8RK.hotcues[id][1][2];
+ var ctrl = LPD8RK.hotcues[id][1][3];
+ //find bank number indicator light
+