Skip to content

Commit

Permalink
Hercules DJ Console 4 Mx: use console.log instead of engine.log
Browse files Browse the repository at this point in the history
This was the only script directly using engine.log instead of
the print wrapper in common-controller-scripts.js.
  • Loading branch information
Be-ing authored and Holzhaus committed Nov 16, 2021
1 parent a602dba commit 6d3b4c5
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions res/controllers/Hercules-DJ-Console-4-Mx-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ Hercules4Mx.shutdown = function() {
//Set all leds to off
Hercules4Mx.allLedsOff = function() {
if (Hercules4Mx.debuglog) {
engine.log("Hercules4Mx.allLedsOff: switching leds off");
console.log("Hercules4Mx.allLedsOff: switching leds off");
}
// Switch off all LEDs
// +0x20 -> the other deck
Expand Down Expand Up @@ -471,7 +471,7 @@ Hercules4Mx.onEnableLed = function(value, group, control) {
//A change in the loop position or loop state has happened.
Hercules4Mx.onLoopStateChange = function(value, group, control) {
if (Hercules4Mx.debuglog) {
engine.log("Hercules4Mx.onLoopStateChange: value, group, control: " + value + ", " + group + ", " + control);
console.log("Hercules4Mx.onLoopStateChange: value, group, control: " + value + ", " + group + ", " + control);
}
var deck = script.deckFromGroup(group);
var messageto = (deck === 1 || deck === 2) ? Hercules4Mx.NOnC1 : Hercules4Mx.NOnC2;
Expand Down Expand Up @@ -1210,20 +1210,20 @@ Hercules4Mx.effectKnob = function(midichan, control, value, status, group) {
//This is used in conjunction with the keypad button mapping. It's the default "no-operation" action.
Hercules4Mx.FxActionNoOp = function(group, fxbutton, value, extraparam) {
if (Hercules4Mx.debuglog) {
engine.log("entering Hercules4Mx.FxActionNoOp");
console.log("entering Hercules4Mx.FxActionNoOp");
}
};
//This is used in conjunction with the keypad button mapping. A keypad button has been pushed
Hercules4Mx.buttonPush = function(group, fxbutton, value, extraparam) {
if (Hercules4Mx.debuglog) {
engine.log("entering Hercules4Mx.buttonPush");
console.log("entering Hercules4Mx.buttonPush");
}
engine.setValue(group, extraparam, value);
};
//This is used in conjunction with the keypad button mapping. A keypad button for an audio effect has been pushed
Hercules4Mx.FxSwitchDown = function(group, fxbutton, value, extraparam) {
if (Hercules4Mx.debuglog) {
engine.log("entering Hercules4Mx.FxSwitchDown");
console.log("entering Hercules4Mx.FxSwitchDown");
}
if (Hercules4Mx.editModeStatus.mode !== Hercules4Mx.editModes.disabled) {
Hercules4Mx.deactivateEditModeAction();
Expand All @@ -1234,7 +1234,7 @@ Hercules4Mx.FxSwitchDown = function(group, fxbutton, value, extraparam) {
//This is used in conjunction with the keypad button mapping. A keypad button for an audio effect has been released
Hercules4Mx.FxSwitchUp = function(group, fxbutton, value, extraparam) {
if (Hercules4Mx.debuglog) {
engine.log("entering Hercules4Mx.FxSwitchUp");
console.log("entering Hercules4Mx.FxSwitchUp");
}
if (Hercules4Mx.editModeStatus.used === false) {
var deck = script.deckFromGroup(group);
Expand All @@ -1246,7 +1246,7 @@ Hercules4Mx.FxSwitchUp = function(group, fxbutton, value, extraparam) {
//This is used in conjunction with the keypad button mapping. A keypad button for an audio effect has been released
Hercules4Mx.FxSamplerPush = function(group, fxbutton, value, extraparam) {
if (Hercules4Mx.debuglog) {
engine.log("entering Hercules4Mx.FxSamplerPush");
console.log("entering Hercules4Mx.FxSamplerPush");
}
var deck = script.deckFromGroup(group);
//Since the sampler does not depend on the deck, buttons on deck
Expand Down Expand Up @@ -1296,7 +1296,7 @@ Hercules4Mx.FxSamplerPush = function(group, fxbutton, value, extraparam) {
*/
Hercules4Mx.LoopEditPress = function(group, fxbutton, value, extraparam) {
if (Hercules4Mx.debuglog) {
engine.log("entering Hercules4Mx.LoopEditPress");
console.log("entering Hercules4Mx.LoopEditPress");
}
if (Hercules4Mx.editModeStatus.mode !== Hercules4Mx.editModes.disabled) {
Hercules4Mx.deactivateEditModeAction();
Expand All @@ -1306,7 +1306,7 @@ Hercules4Mx.LoopEditPress = function(group, fxbutton, value, extraparam) {
};
Hercules4Mx.LoopEditRelease = function(group, fxbutton, value, extraparam) {
if (Hercules4Mx.debuglog) {
engine.log("entering Hercules4Mx.LoopEditRelease");
console.log("entering Hercules4Mx.LoopEditRelease");
}
if (Hercules4Mx.editModeStatus.used === false) {
var deck = script.deckFromGroup(group);
Expand All @@ -1333,7 +1333,7 @@ Hercules4Mx.LoopEditRelease = function(group, fxbutton, value, extraparam) {
};
Hercules4Mx.LoopEditComplete = function(group, button) {
if (Hercules4Mx.debuglog) {
engine.log("Hercules4Mx.LoopEditComplete");
console.log("Hercules4Mx.LoopEditComplete");
}
switch (button) {
case 1:
Expand Down Expand Up @@ -1362,7 +1362,7 @@ Hercules4Mx.LoopEditComplete = function(group, button) {
};
Hercules4Mx.LoopButtonPush = function(group, fxbutton, value, extraparam) {
if (Hercules4Mx.debuglog) {
engine.log("Hercules4Mx.LoopButtonPush");
console.log("Hercules4Mx.LoopButtonPush");
}
var splitted = extraparam.split(";");
if (splitted[0] === "roll" && splitted.length === 2) {
Expand Down Expand Up @@ -1405,8 +1405,8 @@ Hercules4Mx.FXButton = function(midichan, control, value, status, groupInitial)
}
} else if (value) {
if (Hercules4Mx.debuglog === true) {
engine.log(JSON.stringify(mapping));
engine.log(JSON.stringify(Hercules4Mx.noActionButtonMap));
console.log(JSON.stringify(mapping));
console.log(JSON.stringify(Hercules4Mx.noActionButtonMap));
}
mapping.buttonPressAction(group, fxbutton, 1, mapping.extraParameter);
} else if (mapping.buttonReleaseAction !== null) {
Expand Down

0 comments on commit 6d3b4c5

Please sign in to comment.