summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--SConstruct10
-rw-r--r--res/controllers/Stanton SCS.3d.midi.xml4
-rw-r--r--res/controllers/Stanton-SCS3d-scripts.js317
-rw-r--r--res/controllers/common-controller-scripts.js2
-rw-r--r--src/SConscript6
5 files changed, 244 insertions, 95 deletions
diff --git a/SConstruct b/SConstruct
index 6c4f62d7ba..8c7180cfe1 100644
--- a/SConstruct
+++ b/SConstruct
@@ -103,15 +103,5 @@ mixxxminimal_plugins = SConscript(
SConscript(File('src/SConscript'), variant_dir=Dir(build.build_dir), duplicate=0,
exports=['build', 'sources', 'soundsource_plugins', 'mixxxminimal_plugins'])
-# For convenience, copy the Mixxx binary out of the build directory to the
-# root. Don't do it on windows because the binary can't run on its own and needs
-# the DLLs present with it.
-if build.platform_is_osx:
- Command("mixxx", os.path.join(build.build_dir, "Mixxx"), Copy("$TARGET", "$SOURCE"))
-elif not build.platform_is_windows:
- Command("mixxx", os.path.join(build.build_dir, "mixxx"), Copy("$TARGET", "$SOURCE"))
-
-
-
#On OS X, if the bundle has been built, copy it up:
#Command("Mixxx.app", os.path.join(build.build_dir, "Mixxx.app"), Copy("$TARGET", "$SOURCE"))
diff --git a/res/controllers/Stanton SCS.3d.midi.xml b/res/controllers/Stanton SCS.3d.midi.xml
index 1166bbeb8b..1af1274db6 100644
--- a/res/controllers/Stanton SCS.3d.midi.xml
+++ b/res/controllers/Stanton SCS.3d.midi.xml
@@ -3,10 +3,10 @@
<info>
<name>Stanton SCS.3d</name>
<author>Sean M. Pappalardo</author>
- <description>This is a complete mapping for a single Stanton SCS.3d touch controller controlling two virtual decks. Requires scripting.</description>
+ <description>This is a preset for a single Stanton SCS.3d touch controller controlling four virtual decks.</description>
<wiki>http://mixxx.org/wiki/doku.php/stanton_scs.3d</wiki>
</info>
- <controller id="Stanton SCS.3d" port="">
+ <controller id="Stanton SCS.3d">
<scriptfiles>
<file filename="Stanton-SCS3d-scripts.js" functionprefix="StantonSCS3d"/>
</scriptfiles>
diff --git a/res/controllers/Stanton-SCS3d-scripts.js b/res/controllers/Stanton-SCS3d-scripts.js
index 785eb5a63f..85ed088434 100644
--- a/res/controllers/Stanton-SCS3d-scripts.js
+++ b/res/controllers/Stanton-SCS3d-scripts.js
@@ -1,6 +1,6 @@
/****************************************************************/
-/* Stanton SCS.3d MIDI controller script v1.80 */
-/* Copyright (C) 2009-2015, Sean M. Pappalardo */
+/* Stanton SCS.3d MIDI controller script v1.90 */
+/* Copyright (C) 2009-2016, Sean M. Pappalardo */
/* but feel free to tweak this to your heart's content! */
/* For Mixxx version 2.0.x */
/****************************************************************/
@@ -35,13 +35,15 @@ StantonSCS3d.revtime = 1.8; // Time in seconds for the virtual record to spin on
StantonSCS3d.buttons = { "fx":0x20, "eq":0x26, "loop":0x22, "trig":0x28, "vinyl":0x24, "deck":0x2A };
StantonSCS3d.buttonLEDs = { 0x48:0x62, 0x4A:0x61, 0x4C:0x60, 0x4e:0x5f, 0x4f:0x67, 0x51:0x68, 0x53:0x69, 0x55:0x6a,
0x56:0x64, 0x58:0x65, 0x5A:0x6C, 0x5C:0x5D }; // Maps surface buttons to corresponding circle LEDs
-StantonSCS3d.mode_store = { "[Channel1]":"vinyl", "[Channel2]":"vinyl", "[Channel3]":"vinyl", "[Channel4]":"vinyl" }; // Set vinyl mode on all decks
+StantonSCS3d.mode_store = { "[Channel1]":"vinyl", "[Channel2]":"vinyl", // Set vinyl mode on all decks
+ "[Channel3]":"vinyl", "[Channel4]":"vinyl" };
StantonSCS3d.scratchncue = [ false, false, false, false, false ]; // Scratch + cue mode for each deck (starts at zero)
StantonSCS3d.deck = 1; // Currently active virtual deck
StantonSCS3d.modifier = { "cue":0, "play":0 }; // Modifier buttons (allowing alternate controls) defined on-the-fly if needed
StantonSCS3d.state = { "pitchAbs":0, "jog":0, "changedDeck":false, "deckPrev":"vinyl", "logoLit":true}; // Temporary state variables
StantonSCS3d.timer = [-1]; // Temporary storage of timer IDs
-StantonSCS3d.modeSurface = { "deck":"S3+S5", "fx":"S3+S5", "eq":"S3+S5",
+StantonSCS3d.modeSurface = { "deck":"S3+S5", "eq":"S3+S5",
+ "fx":"S3+S5", "fx2":"S3+S5", "fx3":"S3+S5",
"loop":"Buttons", "loop2":"Buttons", "loop3":"Buttons",
"trig":"Buttons", "trig2":"Buttons", "trig3":"Buttons",
"vinyl":"C1", "vinyl2":"C1", "vinyl3":"C1"};
@@ -51,7 +53,7 @@ StantonSCS3d.trackDuration = [0,0]; // Duration of the song on each deck (used f
StantonSCS3d.lastLight = [-1,-1,-1,-1]; // Last circle LED values
StantonSCS3d.lastLoop = 0; // Last-used loop LED
// Loop button controls
-StantonSCS3d.loopButtons = { 0x48: 0.125, 0x4A: 0.25, 0x4C: 0.5, 0x4E: 1,
+StantonSCS3d.loopButtons = { 0x4E: 0.125, 0x4C: 0.25, 0x4A: 0.5, 0x48: 1,
0x4F: 2 , 0x51: 4 , 0x53: 8 , 0x55: 16 };
// Pitch values for key change mode
StantonSCS3d.pitchPoints = { 1:{ 0x48:-0.1998, 0x4A:-0.1665, 0x4C:-0.1332, 0x4E:-0.0999, 0x56:-0.0666, 0x58:-0.0333,
@@ -70,11 +72,22 @@ StantonSCS3d.hotCues = { 1:{ 0x48: 1, 0x4A: 2, 0x4C: 3, 0x4E: 4, 0x4F: 5, 0x5
StantonSCS3d.triggerS4 = 0xFF;
// Signals to (dis)connect by mode: Group, Key, Function name
-StantonSCS3d.modeSignals = {"fx":[ ["[Flanger]", "lfoDepth", "StantonSCS3d.FXDepthLEDs"],
- ["[Flanger]", "lfoDelay", "StantonSCS3d.FXDelayLEDs"],
- ["[Flanger]", "lfoPeriod", "StantonSCS3d.FXPeriodLEDs"],
- ["CurrentChannel", "reverse", "StantonSCS3d.B11LED"],
- ["CurrentChannel", "flanger", "StantonSCS3d.B12LED"] ],
+StantonSCS3d.modeSignals = {
+ "fx":[ ["[EffectRack1_EffectUnit1_Effect1]", "parameter1", "StantonSCS3d.FXS3LEDs"],
+ ["[EffectRack1_EffectUnit1_Effect1]", "parameter2", "StantonSCS3d.FXS4LEDs"],
+ ["[EffectRack1_EffectUnit1_Effect1]", "parameter3", "StantonSCS3d.FXS5LEDs"],
+ ["CurrentChannel", "reverseroll", "StantonSCS3d.B11LED"],
+ ["[EffectRack1_EffectUnit1]", "group_CurrentChannel_enable", "StantonSCS3d.B12LED"] ],
+ "fx2":[ ["[EffectRack1_EffectUnit2_Effect1]", "parameter1", "StantonSCS3d.FXS3LEDs"],
+ ["[EffectRack1_EffectUnit2_Effect1]", "parameter2", "StantonSCS3d.FXS4LEDs"],
+ ["[EffectRack1_EffectUnit2_Effect1]", "parameter3", "StantonSCS3d.FXS5LEDs"],
+ ["CurrentChannel", "reverseroll", "StantonSCS3d.B11LED"],
+ ["[EffectRack1_EffectUnit2]", "group_CurrentChannel_enable", "StantonSCS3d.B12LED"] ],
+ "fx3":[ ["[EffectRack1_EffectUnit3_Effect1]", "parameter1", "StantonSCS3d.FXS3LEDs"],
+ ["[EffectRack1_EffectUnit3_Effect1]", "parameter2", "StantonSCS3d.FXS4LEDs"],
+ ["[EffectRack1_EffectUnit3_Effect1]", "parameter3", "StantonSCS3d.FXS5LEDs"],
+ ["CurrentChannel", "reverseroll", "StantonSCS3d.B11LED"],
+ ["[EffectRack1_EffectUnit3]", "group_CurrentChannel_enable", "StantonSCS3d.B12LED"] ],
"eq":[ ["CurrentChannelEQ", "parameter1", "StantonSCS3d.EQLowLEDs"],
["CurrentChannelEQ", "parameter2", "StantonSCS3d.EQMidLEDs"],
["CurrentChannelEQ", "parameter3", "StantonSCS3d.EQHighLEDs"],
@@ -86,18 +99,18 @@ StantonSCS3d.modeSignals = {"fx":[ ["[Flanger]", "lfoDepth", "StantonSCS3d.FX
["CurrentChannel", "loop_enabled", "StantonSCS3d.ReLoopLEDs"],
["CurrentChannel", "loop_halve", "StantonSCS3d.B11LED"],
["CurrentChannel", "loop_double", "StantonSCS3d.B12LED"],
- ["CurrentChannel", "beatloop_0.125_enabled", "StantonSCS3d.BsALED"],
- ["CurrentChannel", "beatloop_0.25_enabled", "StantonSCS3d.BsBLED"],
- ["CurrentChannel", "beatloop_0.5_enabled", "StantonSCS3d.BsCLED"],
- ["CurrentChannel", "beatloop_1_enabled", "StantonSCS3d.BsDLED"],
+ ["CurrentChannel", "beatloop_0.125_enabled", "StantonSCS3d.BsDLED"],
+ ["CurrentChannel", "beatloop_0.25_enabled", "StantonSCS3d.BsCLED"],
+ ["CurrentChannel", "beatloop_0.5_enabled", "StantonSCS3d.BsBLED"],
+ ["CurrentChannel", "beatloop_1_enabled", "StantonSCS3d.BsALED"],
["CurrentChannel", "beatloop_2_enabled", "StantonSCS3d.BsELED"],
["CurrentChannel", "beatloop_4_enabled", "StantonSCS3d.BsFLED"],
["CurrentChannel", "beatloop_8_enabled", "StantonSCS3d.BsGLED"],
["CurrentChannel", "beatloop_16_enabled", "StantonSCS3d.BsHLED"],
- ["CurrentChannel", "beatloop_0.125_toggle", "StantonSCS3d.BsAaLED"],
- ["CurrentChannel", "beatloop_0.25_toggle", "StantonSCS3d.BsBaLED"],
- ["CurrentChannel", "beatloop_0.5_toggle", "StantonSCS3d.BsCaLED"],
- ["CurrentChannel", "beatloop_1_toggle", "StantonSCS3d.BsDaLED"],
+ ["CurrentChannel", "beatloop_0.125_toggle", "StantonSCS3d.BsDaLED"],
+ ["CurrentChannel", "beatloop_0.25_toggle", "StantonSCS3d.BsCaLED"],
+ ["CurrentChannel", "beatloop_0.5_toggle", "StantonSCS3d.BsBaLED"],
+ ["CurrentChannel", "beatloop_1_toggle", "StantonSCS3d.BsAaLED"],
["CurrentChannel", "beatloop_2_toggle", "StantonSCS3d.BsEaLED"],
["CurrentChannel", "beatloop_4_toggle", "StantonSCS3d.BsFaLED"],
["CurrentChannel", "beatloop_8_toggle", "StantonSCS3d.BsGaLED"],
@@ -191,7 +204,7 @@ StantonSCS3d.modeSignals = {"fx":[ ["[Flanger]", "lfoDepth", "StantonSCS3d.FX
["[Master]","headMix","StantonSCS3d.headMixLEDs"],
["[Master]","headVolume","StantonSCS3d.headVolLEDs"],
["[Master]","crossfader","StantonSCS3d.crossFaderLEDs"] ],
- "none":[] // To avoid an error on forced mode changes
+ "none":[] // Avoids an error on forced mode changes
};
StantonSCS3d.commonSignals = [ ["CurrentChannel", "rate", "StantonSCS3d.pitchLEDs"],
["CurrentChannel", "rateRange", "StantonSCS3d.pitchSliderLED"]
@@ -201,6 +214,7 @@ StantonSCS3d.deckSignals = [ ["CurrentChannel", "volume", "StantonSCS3d.gainL
["CurrentChannel", "play_indicator", "StantonSCS3d.playLED"],
["CurrentChannel", "cue_indicator", "StantonSCS3d.cueLED"],
["CurrentChannel", "sync_enabled", "StantonSCS3d.syncLED"],
+ ["CurrentChannel", "beat_active", "StantonSCS3d.tapLED"],
["CurrentChannel", "back", "StantonSCS3d.B13LED"],
["CurrentChannel", "fwd", "StantonSCS3d.B14LED"]
];
@@ -251,8 +265,11 @@ StantonSCS3d.init2 = function () {
// Initialize the spinning platter LEDs if the mapping is loaded after a song is
StantonSCS3d.durationChange1(engine.getValue("[Channel1]","duration"));
StantonSCS3d.durationChange2(engine.getValue("[Channel2]","duration"));
+ StantonSCS3d.durationChange3(engine.getValue("[Channel3]","duration"));
+ StantonSCS3d.durationChange4(engine.getValue("[Channel4]","duration"));
- print ("StantonSCS3d: \""+StantonSCS3d.id+"\" on MIDI channel "+(StantonSCS3d.channel+1)+" initialized.");
+// print ("StantonSCS3d: \""+StantonSCS3d.id+"\" on MIDI channel "+(StantonSCS3d.channel+1)+" initialized.");
+ print ("StantonSCS3d: \""+StantonSCS3d.id+"\" initialized.");
}
StantonSCS3d.statusResponse = function (data, length) {
@@ -290,7 +307,8 @@ StantonSCS3d.shutdown = function () { // called when the MIDI device is closed
for (i=0x48; i<=0x5c; i++) midi.sendShortMsg(No,i,0x40); // Set surface LEDs to black default
midi.sendShortMsg(CC,0x7B,0x00); // Extinguish all LEDs
- print ("StantonSCS3d: \""+StantonSCS3d.id+"\" on MIDI channel "+(StantonSCS3d.channel+1)+" shut down.");
+// print ("StantonSCS3d: \""+StantonSCS3d.id+"\" on MIDI channel "+(StantonSCS3d.channel+1)+" shut down.");
+ print ("StantonSCS3d: \""+StantonSCS3d.id+"\" shut down.");
}
StantonSCS3d.stopTimers = function () {
@@ -310,19 +328,23 @@ StantonSCS3d.connectSurfaceSignals = function (channel, disconnect) {
var group = signalList[i][0];
if (group=="CurrentChannel") group = "[Channel"+StantonSCS3d.deck+"]";
if (group=="CurrentChannelEQ") group = "[EqualizerRack1_[Channel"+StantonSCS3d.deck+"]_Effect1]";
- engine.connectControl(group,signalList[i][1],signalList[i][2],disconnect);
+
+ var item = signalList[i][1];
+ item = item.replace("CurrentChannel","[Channel"+StantonSCS3d.deck+"]");
+
+ engine.connectControl(group,item,signalList[i][2],disconnect);
// If connecting a signal, cause it to fire to update the LEDs
- if (!disconnect) engine.trigger(group,signalList[i][1]);
+ if (!disconnect) engine.trigger(group,item);
// if (!disconnect) {
// // Alternate:
-// var command = signalList[i][2]+"("+engine.getValue(group,signalList[i][1])+")";
+// var command = signalList[i][2]+"("+engine.getValue(group,item)+")";
// // print("StantonSCS3d: command="+command);
// eval(command);
// }
if (StantonSCS3d.debug) {
- if (disconnect) print("StantonSCS3d: "+group+","+signalList[i][1]+" disconnected from "+signalList[i][2]);
- else print("StantonSCS3d: "+group+","+signalList[i][1]+" connected to "+signalList[i][2]);
+ if (disconnect) print("StantonSCS3d: "+group+","+item+" disconnected from "+signalList[i][2]);
+ else print("StantonSCS3d: "+group+","+item+" connected to "+signalList[i][2]);
}
}
// If disconnecting signals, darken the LEDs on the control surface & soft buttons
@@ -364,12 +386,12 @@ StantonSCS3d.connectDeckSignals = function (channel, disconnect, list) {
StantonSCS3d.syncLED(currentValue);
break;
default: // Cause the signal to fire to update LEDs
- engine.trigger(group,name);
+ engine.trigger(group,name);
// // Alternate:
-// var command = signalList[i][2]+"("+engine.getValue(group,name)+")";
-// // print("StantonSCS3d: command="+command);
-// eval(command);
- break;
+// var command = signalList[i][2]+"("+engine.getValue(group,name)+")";
+// // print("StantonSCS3d: command="+command);
+// eval(command);
+ break;
}
}
if (StantonSCS3d.debug) {
@@ -584,11 +606,18 @@ StantonSCS3d.syncButton = function (channel, control, value, status) {
if (StantonSCS3d.debug) print("StantonSCS3d: Switching to single-deck control mode");
StantonSCS3d.singleDeck = true;
}
+ } else if (currentMode != "deck" && StantonSCS3d.modifier[currentMode]==1) {
+ // If the current mode button is held down (and it's not DECK mode)
+ var curval = engine.getValue("[Channel"+StantonSCS3d.deck+"]","quantize");
+ engine.setValue("[Channel"+StantonSCS3d.deck+"]", "quantize",
+ !curval);
+ StantonSCS3d.syncLED(!curval);
}
- else
+ else {
engine.setValue("[Channel"+StantonSCS3d.deck+"]","sync_enabled",1);
StantonSCS3d.modifier["masterSync"] = new Date();
- return;
+ return;
+ }
}
// If button up
// Don't touch sync_enabled if we toggled modes
@@ -608,11 +637,11 @@ StantonSCS3d.tapButton = function (channel, control, value, status) {
}
if ((status & 0xF0) == 0x90) { // If button down
if (StantonSCS3d.debug) print("StantonSCS3d: TAP");
- midi.sendShortMsg(byte1,control,0x01); // TAP button red
+// midi.sendShortMsg(byte1,control,0x01); // TAP button red
bpm.tapButton(StantonSCS3d.deck);
return;
}
- midi.sendShortMsg(byte1,control,0x00); // TAP button blue
+// midi.sendShortMsg(byte1,control,0x00); // TAP button blue
}
StantonSCS3d.B11 = function (channel, control, value, status) {
@@ -625,7 +654,7 @@ StantonSCS3d.B11 = function (channel, control, value, status) {
(currentMode != "deck" || StantonSCS3d.singleDeck)) {
midi.sendShortMsg(byte1,control,0x01); // Make button red
// Reset channel pre-fader gain to center
- engine.setValue("[Channel"+StantonSCS3d.deck+"]","pregain",1.0);
+ engine.reset("[Channel"+StantonSCS3d.deck+"]","pregain");
// Update the LEDs
var add = StantonSCS3d.BoostCut(9,1.0, 0.0, 1.0, 4.0, 5, 4);
midi.sendShortMsg(0xB0 + channel,0x07,0x15+add);
@@ -639,7 +668,7 @@ StantonSCS3d.B11 = function (channel, control, value, status) {
break;
case "deck":
midi.sendShortMsg(byte1,control,0x01); // Make button red
- engine.setValue("[Master]","volume",1.0);
+ engine.reset("[Master]","volume");
break;
case "fx":
case "loop":
@@ -665,7 +694,7 @@ StantonSCS3d.B11 = function (channel, control, value, status) {
switch (currentMode) { // In either case (for toggling)
case "fx":
- engine.setValue("[Channel"+StantonSCS3d.deck+"]","reverse",!engine.getValue("[Channel"+StantonSCS3d.deck+"]","reverse"));
+ engine.setValue("[Channel"+StantonSCS3d.deck+"]","reverseroll",!engine.getValue("[Channel"+StantonSCS3d.deck+"]","reverseroll"));
break;
case "loop":
engine.setValue("[Channel"+StantonSCS3d.deck+"]","loop_halve",!engine.getValue("[Channel"+StantonSCS3d.deck+"]","loop_halve"));
@@ -685,17 +714,26 @@ StantonSCS3d.B12 = function (channel, control, value, status, group) {
engine.setValue("[Channel"+StantonSCS3d.deck+"]","rate",0);
return;
}
+ var modeIndex = currentMode.charAt(currentMode.length-1);
+ if (modeIndex != "2" && modeIndex != "3") modeIndex = "1";
+
switch (currentMode) {
case "deck":
midi.sendShortMsg(byte1,control,0x01); // Make button red
- engine.setValue("[Master]","balance",0.0); // Reset master balance to center
+ engine.reset("[Master]","balance"); // Reset master balance to center
break;
case "fx":
- engine.setValue("[Channel"+StantonSCS3d.deck+"]","flanger",!engine.getValue("[Channel"+StantonSCS3d.deck+"]","flanger"));
+ case "fx2":
+ case "fx3":
+ engine.setValue("[EffectRack1_EffectUnit"+modeIndex+"]",
+ "group_[Channel"+StantonSCS3d.deck+"]_enable",
+ !engine.getValue("[EffectRack1_EffectUnit"+modeIndex+"]",
+ "group_[Channel"+StantonSCS3d.deck+"]_enable"));
break;
case "vinyl":
case "vinyl2":
- engine.setValue("[Channel"+StantonSCS3d.deck+"]","keylock",!engine.getValue("[Channel"+StantonSCS3d.deck+"]","keylock"));
+ engine.setValue("[Channel"+StantonSCS3d.deck+"]","keylock",
+ !engine.getValue("[Channel"+StantonSCS3d.deck+"]","keylock"));
break;
case "vinyl3":
midi.sendShortMsg(byte1,control,0x01); // Make button red
@@ -705,7 +743,7 @@ StantonSCS3d.B12 = function (channel, control, value, status, group) {
case "loop2":
case "loop3":
midi.sendShortMsg(byte1,control,0x01); // Make button red
- engine.setValue("[Channel"+StantonSCS3d.deck+"]","rate",0);
+ engine.reset("[Channel"+StantonSCS3d.deck+"]","rate");
default:
// Pitch range toggle
midi.sendShortMsg(byte1,control,0x01); // Make button red
@@ -740,6 +778,8 @@ StantonSCS3d.B12 = function (channel, control, value, status, group) {
}
switch (currentMode) {
case "fx":
+ case "fx2":
+ case "fx3":
case "vinyl":
case "vinyl2":
case "loop":
@@ -755,7 +795,8 @@ StantonSCS3d.B12 = function (channel, control, value, status, group) {
switch (currentMode) { // In either case (for toggling)
case "loop":
- engine.setValue("[Channel"+StantonSCS3d.deck+"]","loop_double",!engine.getValue("[Channel"+StantonSCS3d.deck+"]","loop_double"));
+ engine.setValue("[Channel"+StantonSCS3d.deck+"]","loop_double",
+ !engine.getValue("[Channel"+StantonSCS3d.deck+"]","loop_double"));
break;
}
}
@@ -835,6 +876,11 @@ StantonSCS3d.modeButton = function (channel, control, status, modeName) {
// Set Gain LEDs to pregain value
var add = StantonSCS3d.BoostCut(9,engine.getValue("[Channel"+StantonSCS3d.deck+"]","pregain"), 0.0, 1.0, 4.0, 5, 4);
midi.sendShortMsg(0xB0+channel,0x07,0x15+add);
+ // Set SYNC button to value of quantize control
+ if (currentMode != "deck") {
+ StantonSCS3d.syncLED(
+ engine.getValue("[Channel"+StantonSCS3d.deck+"]","quantize"));
+ }
}
else StantonSCS3d.modifier["time"] = 0.0;
return;
@@ -842,6 +888,7 @@ StantonSCS3d.modeButton = function (channel, control, status, modeName) {
StantonSCS3d.modifier[currentMode] = StantonSCS3d.modifier[modeName] = 0; // Clear mode modifier flags
StantonSCS3d.gainLEDs(engine.getValue("[Channel"+StantonSCS3d.deck+"]","volume")); // Restore Gain LEDs
StantonSCS3d.modeButtonsColor(channel,0x02); // Make all mode buttons blue
+ engine.trigger("[Channel"+StantonSCS3d.deck+"]","sync_enabled"); // U pdate SYNC LED
// If trying to switch to the same mode, or the same button was held down for over 1/3 of a second, stay in the current mode
if (currentMode == modeName || (StantonSCS3d.modifier["time"] != 0.0 && ((new Date() - StantonSCS3d.modifier["time"])>300))) {
switch (currentMode.charAt(currentMode.length-1)) { // Return the button to its original color
@@ -934,7 +981,25 @@ StantonSCS3d.modeButton = function (channel, control, status, modeName) {
}
StantonSCS3d.FX = function (channel, control, value, status) {
- StantonSCS3d.modeButton(channel, control, status, "fx");
+ var mode;
+ var currentMode = StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"];
+
+ switch (currentMode) {
+ case "fx":
+ if ((status & 0xF0) == 0x80) mode = "fx2";
+ else mode = "fx";
+ break;
+ case "fx2":
+ if ((status & 0xF0) == 0x80) mode = "fx3";
+ else mode = "fx2";
+ break;
+ case "fx3":
+ if ((status & 0xF0) == 0x80) mode = "fx";
+ else mode = "fx3";
+ break;
+ default: mode = "fx";
+ }
+ StantonSCS3d.modeButton(channel, control, status, mode);
}
StantonSCS3d.EQ = function (channel, control, value, status) {
@@ -1163,23 +1228,50 @@ StantonSCS3d.DeckChangeP2 = function (channel, value) {
StantonSCS3d.modifier["time"] = 0.0; // Reset the mode-modifier time
StantonSCS3d.state["changedDeck"]= true; // Mark that we just changed decks so the surface LEDs can update correctly for TRIG & LOOP
switch (newMode) { // Call the appropriate mode change function to set the control surface & connect signals on the now-current deck
- case "fx": StantonSCS3d.FX(channel, StantonSCS3d.buttons["fx"], value, 0x80 + channel); break;
- case "eq": StantonSCS3d.EQ(channel, StantonSCS3d.buttons["eq"], value, 0x80 + channel); break;
- case "loop2": StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"] = "loop"; // force correct change
+ // Effects
+ case "fx2":
+ StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"] = "fx"; // force correct change
+ case "fx3":
+ if (StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"] == "none")
+ StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"] = "fx2"; // force correct change
+ case "fx":
+ StantonSCS3d.FX(channel, StantonSCS3d.buttons["fx"], value, 0x80 + channel);
+ break;
+
+ // EQ
+ case "eq":
+ StantonSCS3d.EQ(channel, StantonSCS3d.buttons["eq"], value, 0x80 + channel);
+ break;
+
+ // Loop
+ case "loop2":
+ StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"] = "loop"; // force correct change
case "loop3":
if (StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"] == "none")
StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"] = "loop2"; // force correct change
- case "loop": StantonSCS3d.Loop(channel, StantonSCS3d.buttons["loop"], value, 0x80 + channel); break;
- case "trig2": StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"] = "trig"; // force correct change
+ case "loop":
+ StantonSCS3d.Loop(channel, StantonSCS3d.buttons["loop"], value, 0x80 + channel);
+ break;
+
+ // Trig
+ case "trig2":
+ StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"] = "trig"; // force correct change
case "trig3":
if (StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"] == "none")
StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"] = "trig2"; // force correct change
- case "trig": StantonSCS3d.Trig(channel, StantonSCS3d.buttons["trig"], value, 0x80 + channel); break;
- case "vinyl2": StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"] = "vinyl"; // force correct change
+ case "trig":
+ StantonSCS3d.Trig(channel, StantonSCS3d.buttons["trig"], value, 0x80 + channel);
+ break;
+
+ // Vinyl
+ case "vinyl2":
+ StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"] = "vinyl"; // force correct change
case "vinyl3":
if (StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"] == "none")
StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"] = "vinyl2"; // force correct change
- case "vinyl": StantonSCS3d.Vinyl(channel, StantonSCS3d.buttons["vinyl"], value, 0x80 + channel); break;
+ case "vinyl":
+ StantonSCS3d.Vinyl(channel, StantonSCS3d.buttons["vinyl"], value, 0x80 + channel);
+ break;
}
} // End Deck Change function
@@ -1200,14 +1292,22 @@ StantonSCS3d.S4relative = function (channel, control, value) {
StantonSCS3d.S3absolute = function (channel, control, value) {
var currentMode = StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"];
+ var modeIndex = currentMode.charAt(currentMode.length-1);
+ if (modeIndex != "2" && modeIndex != "3") modeIndex = "1";
switch (currentMode) {
case "fx":
- if (StantonSCS3d.modifier[currentMode]==1) return; // Ignore if mode button is held down (wanting to reset)
- script.absoluteSlider("[Flanger]","lfoDepth",value,0,1);
+ case "fx2":
+ case "fx3":
+ // Ignore if mode button is held down (wanting to reset)
+ if (StantonSCS3d.modifier[currentMode]==1) return;
+ engine.setParameter("[EffectRack1_EffectUnit"+modeIndex+"_Effect1]",
+ "parameter1",script.absoluteLin(value,0,1));
break;
case "eq":
- if (StantonSCS3d.modifier[currentMode]==1) return; // Ignore if mode button is held down (wanting to reset)
- engine.setParameter("[EqualizerRack1_[Channel"+StantonSCS3d.deck+"]_Effect1]","parameter1",script.absoluteLin(value,0,1));
+ // Ignore if mode button is held down (wanting to reset)
+ if (StantonSCS3d.modifier[currentMode]==1) return;
+ engine.setParameter("[EqualizerRack1_[Channel"+StantonSCS3d.deck+"]_Effect1]",
+ "parameter1",script.absoluteLin(value,0,1));
break;
case "deck": engine.setValue("[Master]","headMix",(value-64)/63); break;
}
@@ -1220,10 +1320,17 @@ StantonSCS3d.S4absolute = function (channel, control, value) {
return;
}
var currentMode = StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"];
+ var modeIndex = currentMode.charAt(currentMode.length-1);
+ if (modeIndex != "2" && modeIndex != "3") modeIndex = "1";
switch (currentMode) {
case "fx":
- if (StantonSCS3d.modifier[currentMode]==1) return; // Ignore if mode button is held down (wanting to reset)
- script.absoluteSlider("[Flanger]","lfoDelay",value,50,10000); break;
+ case "fx2":
+ case "fx3":
+ // Ignore if mode button is held down (wanting to reset)
+ if (StantonSCS3d.modifier[currentMode]==1) return;
+ engine.setParameter("[EffectRack1_EffectUnit"+modeIndex+"_Effect1]",
+ "parameter2",script.absoluteLin(value,0,1));
+ break;
case "eq":
if (StantonSCS3d.modifier[currentMode]==1) return; // Ignore if mode button is held down (wanting to reset)
engine.setParameter("[EqualizerRack1_[Channel"+StantonSCS3d.deck+"]_Effect1]","parameter2",script.absoluteLin(value,0,1));
@@ -1308,8 +1415,17 @@ StantonSCS3d.S5absolute = function (channel, control, value) {
if (StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"]=="deck") return; // Ignore if in DECK mode
var currentMode = StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"];
if (StantonSCS3d.modifier[currentMode]==1) return; // Ignore if mode button is held down (wanting to reset)
- switch (StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"]) {
- case "fx": script.absoluteSlider("[Flanger]","lfoPeriod",value,50000,2000000); break;
+ var modeIndex = currentMode.charAt(currentMode.length-1);
+ if (modeIndex != "2" && modeIndex != "3") modeIndex = "1";
+ switch (currentMode) {
+ case "fx":
+ case "fx2":
+ case "fx3":
+ // Ignore if mode button is held down (wanting to reset)
+ if (StantonSCS3d.modifier[currentMode]==1) return;
+ engine.setParameter("[EffectRack1_EffectUnit"+modeIndex+"_Effect1]",
+ "parameter3",script.absoluteLin(value,0,1));
+ break;
case "eq":
engine.setParameter("[EqualizerRack1_[Channel"+StantonSCS3d.deck+"]_Effect1]","parameter3",script.absoluteLin(value,0,1));
break;
@@ -1359,8 +1475,15 @@ StantonSCS3d.S3touch = function (channel, control, value, status) {
// Reset the value to center if the slider is touched while the mode button is held down
var currentMode = StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"];
if (StantonSCS3d.modifier[currentMode]==1) {
+ var modeIndex = currentMode.charAt(currentMode.length-1);
+ if (modeIndex != "2" && modeIndex != "3") modeIndex = "1";
switch (currentMode) {
- case "fx": engine.setValue("[Flanger]","lfoDepth",0.5); break;
+ case "fx":
+ case "fx2":
+ case "fx3":
+ engine.reset("[EffectRack1_EffectUnit"+modeIndex+"_Effect1]",
+ "parameter1");
+ break;
case "eq":
engine.reset("[EqualizerRack1_[Channel"+StantonSCS3d.deck+"]_Effect1]","parameter1");
break;
@@ -1382,8 +1505,15 @@ StantonSCS3d.S4touch = function (channel, control, value, status) {
var currentMode = StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"];
// If the current mode button is held down, reset the control to center
if (StantonSCS3d.modifier[currentMode]==1) {
+ var modeIndex = currentMode.charAt(currentMode.length-1);
+ if (modeIndex != "2" && modeIndex != "3") modeIndex = "1";
switch (currentMode) {
- case "fx": engine.setValue("[Flanger]","lfoDelay",4950); break;
+ case "fx":
+ case "fx2":
+ case "fx3":
+ engine.reset("[EffectRack1_EffectUnit"+modeIndex+"_Effect1]",
+ "parameter2");
+ break;
case "eq":
engine.reset("[EqualizerRack1_[Channel"+StantonSCS3d.deck+"]_Effect1]","parameter2");
break;
@@ -1480,8 +1610,15 @@ StantonSCS3d.S5touch = function (channel, control, value, status) {
// Reset the value to center if the slider is touched while the mode button is held down
var currentMode = StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"];
if (StantonSCS3d.modifier[currentMode]==1){
+ var modeIndex = currentMode.charAt(currentMode.length-1);
+ if (modeIndex != "2" && modeIndex != "3") modeIndex = "1";
switch (currentMode) {
- case "fx": engine.setValue("[Flanger]","lfoPeriod",1025000); break;
+ case "fx":
+ case "fx2":
+ case "fx3":
+ engine.reset("[EffectRack1_EffectUnit"+modeIndex+"_Effect1]",
+ "parameter3");
+ break;
case "eq":
engine.reset("[EqualizerRack1_[Channel"+StantonSCS3d.deck+"]_Effect1]","parameter3");
break;
@@ -1698,6 +1835,10 @@ StantonSCS3d.syncLED = function (value) {
StantonSCS3d.buttonLED(value, 0x6F, 0x01, 0x00);
}
+StantonSCS3d.tapLED = function (value) {
+ StantonSCS3d.buttonLED(value, 0x70, 0x01, 0x00);
+}
+
// ---- Soft buttons ----
StantonSCS3d.B11LED = function (value) {
@@ -1877,40 +2018,49 @@ StantonSCS3d.crossFaderLEDs = function (value) {
midi.sendShortMsg(byte1,0x01,0x15+add);
}
-StantonSCS3d.EQLEDs = function (value,control) {
- var add = StantonSCS3d.BoostCut(7,value, 0, 1, 4, 3, 3);
+StantonSCS3d.EQLEDs = function (value,control,item) {
+ var group = "[EqualizerRack1_[Channel"+StantonSCS3d.deck+"]_Effect1]";
+// var add = StantonSCS3d.BoostCut(7,value, 0, 1, 4, 3, 3);
+ var add = StantonSCS3d.BoostCut(7,
+ engine.getParameterForValue(group, item, value),
+ 0.0, 0.5, 1.0, 3, 3);
var byte1 = 0xB0 + StantonSCS3d.channel;
midi.sendShortMsg(byte1,control,0x15+add);
}
StantonSCS3d.EQLowLEDs = function (value) {
- StantonSCS3d.EQLEDs(value,0x0C);
+ StantonSCS3d.EQLEDs(value,0x0C,"parameter1");
}
StantonSCS3d.EQMidLEDs = function (value) {
- StantonSCS3d.EQLEDs(value,0x01);
+ StantonSCS3d.EQLEDs(value,0x01,"parameter2");
}
StantonSCS3d.EQHighLEDs = function (value) {
- StantonSCS3d.EQLEDs(value,0x0E);
+ StantonSCS3d.EQLEDs(value,0x0E,"parameter3");
}
-StantonSCS3d.FXDepthLEDs = function (value) {
- var add = StantonSCS3d.Peak7(value,0,1);
+StantonSCS3d.FXSliderLEDs = function (value,control,item) {
+ var currentMode = StantonSCS3d.mode_store["[Channel"+StantonSCS3d.deck+"]"];
+ var index = currentMode.charAt(currentMode.length-1);
+ if (index != "2" && index != "3") index = "1";
+ var group = "[EffectRack1_EffectUnit"+index+"_Effect1]";
+ var add = StantonSCS3d.Peak7(engine.getParameterForValue(group, item, value),
+ 0.0, 1.0);
var byte1 = 0xB0 + StantonSCS3d.channel;
- midi.sendShortMsg(byte1,0x0C,0x28+add);
+ midi.sendShortMsg(byte1,control,0x28+add);
}
-StantonSCS3d.FXDelayLEDs = function (value) {
- var add = StantonSCS3d.Peak7(value,50,10000);
- var byte1 = 0xB0 + StantonSCS3d.channel;
- midi.sendShortMsg(byte1,0x01,0x28+add);
+StantonSCS3d.FXS3LEDs = function (value) {
+ StantonSCS3d.FXSliderLEDs(value,0x0C,"parameter1");
}
-StantonSCS3d.FXPeriodLEDs = function (value) {
- var add = StantonSCS3d.Peak7(value,50000,2000000);
- var byte1 = 0xB0 + StantonSCS3d.channel;
- midi.sendShortMsg(byte1,0x0E,0x28+add);
+StantonSCS3d.FXS4LEDs = function (value) {
+ StantonSCS3d.FXSliderLEDs(value,0x01,"parameter2");
+}
+
+StantonSCS3d.FXS5LEDs = function (value) {
+ StantonSCS3d.FXSliderLEDs(value,0x0E,"parameter3");
}
StantonSCS3d.VUMeterLEDs = function (value) {
@@ -2124,9 +2274,12 @@ StantonSCS3d.circleLEDs = function (value) {
}
/* TODO:
- * - Update effects mode
- * - Replace deprecated controls
- * - Alter Loop mode buttons so circle swiping results in incremental loop size changes
* - Alter Trig mode to combine sets of two buttons (top two and bottom two on each row)
+ * - Change fine pitch mode to key adjust mode
*
+ * Changes:
+ * - FX1,2,3 control that effect unit
+ * - FX B11 is now reverseroll (censor) instead of regular reverse
+ * - FX B12 toggles this effect unit on this deck
+ * - Mode + SYNC = toggle quantize
*/ \ No newline at end of file
diff --git a/res/controllers/common-controller-scripts.js b/res/controllers/common-controller-scripts.js
index 153518ab6d..4a95154b79 100644
--- a/res/controllers/common-controller-scripts.js
+++ b/res/controllers/common-controller-scripts.js
@@ -356,7 +356,7 @@ bpm.tapButton = function(deck) {
fRateScale = (fRateScale-1.)/engine.getValue("[Channel"+deck+"]","rateRange");
engine.setValue("[Channel"+deck+"]","rate",fRateScale * engine.getValue("[Channel"+deck+"]","rate_dir"));
-// print("Script: BPM="+average);
+// print("Script: BPM="+average+" setting to "+fRateScale);
}
// ----------------- Object definitions --------------------------
diff --git a/src/SConscript b/src/SConscript
index 26478bbfdd..5acd191a45 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -74,6 +74,12 @@ elif build.platform_is_osx:
else:
mixxx_bin = env.Program('mixxx', sources)
+# For convenience, copy the Mixxx binary out of the build directory to the
+# root. Don't do it on windows because the binary can't run on its own and needs
+# the DLLs present with it.
+if not build.platform_is_windows:
+ Command("../mixxx", mixxx_bin, Copy("$TARGET", "$SOURCE"))
+
test_bin = None
def build_tests():
global test_bin