summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Klotz <uklotz@mixxx.org>2020-02-03 22:25:38 +0100
committerGitHub <noreply@github.com>2020-02-03 22:25:38 +0100
commit4cd59cae55c07afcba12fc249af76915ad2c7c90 (patch)
tree59b34ae187094e2a18388d88ae9f57cdb02ca471
parentcb99327f633046fddf1be6f771c3d2028038a548 (diff)
parent30470622ce7cf913d7e452ae408eef291d5eea25 (diff)
Merge branch '2.2' into lp1857806
-rw-r--r--.eslintignore1
-rw-r--r--.eslintrc.json52
-rw-r--r--CHANGELOG7
-rw-r--r--build/features.py29
-rw-r--r--res/controllers/.eslintrc.json10
-rw-r--r--res/controllers/Denon-MC6000MK2-scripts.js566
-rw-r--r--res/controllers/Soundless_joyMIDI.midi.xml1227
-rw-r--r--res/controllers/Soundless_joyMIDI_scripts.js710
-rw-r--r--res/controllers/Traktor-Kontrol-S2-MK3-hid-scripts.js34
-rw-r--r--res/controllers/novation-launchpad/.eslintrc.yaml57
-rw-r--r--script/.eslintrc.json7
-rw-r--r--src/library/crate/cratefeature.cpp27
-rw-r--r--src/library/crate/cratefeaturehelper.cpp29
-rw-r--r--src/mixxx.cpp6
-rw-r--r--src/util/db/dbnamedentity.h31
-rw-r--r--src/waveform/renderers/waveformrendererfilteredsignal.cpp1
-rw-r--r--src/waveform/renderers/waveformrendererhsv.cpp1
-rw-r--r--src/waveform/renderers/waveformrendererrgb.cpp1
-rw-r--r--src/widget/wspinny.cpp1
19 files changed, 2356 insertions, 441 deletions
diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 0000000000..ecba16da63
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1 @@
+res/controllers/lodash.mixxx.js
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 0000000000..52b5325fe5
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,52 @@
+{
+ "extends": "eslint:recommended",
+ "parserOptions": {
+ "ecmaVersion": 5,
+ "sourceType": "script"
+ },
+ "rules": {
+ "array-bracket-spacing" : "warn",
+ "block-spacing": "warn",
+ "brace-style": ["warn", "1tbs", {
+ "allowSingleLine": true
+ }],
+ "camelcase": "warn",
+ "comma-spacing": "warn",
+ "computed-property-spacing" : ["warn", "never", {
+ "enforceForClassMembers": true
+ }],
+ "dot-location": "warn",
+ "eqeqeq": ["error", "always"],
+ "func-style": ["error", "expression", {
+ "allowArrowFunctions": true
+ }],
+ "indent": ["warn", 4],
+ "key-spacing": "warn",
+ "keyword-spacing": "warn",
+ "linebreak-style": ["warn", "unix"],
+ "no-trailing-spaces": "warn",
+ "no-unneeded-ternary": ["warn", {
+ "defaultAssignment": false
+ }],
+ "no-unused-vars": ["error", {
+ "argsIgnorePattern": "^_"
+ }],
+ "object-curly-newline" : ["warn", {
+ "consistent": true,
+ "multiline": true
+ }],
+ "object-curly-spacing" : "warn",
+ "quotes": ["warn", "double"],
+ "require-atomic-updates": "error",
+ "semi": "warn",
+ "semi-spacing": "warn",
+ "space-before-blocks": ["warn", "always"],
+ "space-before-function-paren": ["warn", "never"],
+ "space-in-parens": "warn"
+ },
+ "globals": {
+ "console": "writable",
+ "svg": "writable",
+ "print": "readonly"
+ }
+}
diff --git a/CHANGELOG b/CHANGELOG
index d2ff761f13..0014407d48 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,11 @@
==== 2.2.4 2020-mm-dd ====
-* Prevent infinite loop when decoding corrupt MP3 files #2417
* Store default recording format after "Restore Defaults" lp:1857806 #2414
+* Prevent infinite loop when decoding corrupt MP3 files #2417
+* Add workaround for broken libshout versions #2040 #2438
+* Speed up purging of tracks lp:1845837 #2393
+* Prevent infinite loop when decoding corrupt MP3 files #2417
+* Add controller mapping for Native Instruments Traktor Kontrol S2 MK3 #2348
+* Add controller mapping for Soundless joyMIDI #2425
==== 2.2.3 2019-11-24 ====
* Don't make users reconfigure sound hardware when it has not changed #2253
diff --git a/build/features.py b/build/features.py
index 3a558e53c3..f632623e16 100644
--- a/build/features.py
+++ b/build/features.py
@@ -814,6 +814,8 @@ class TestSuite(Feature):
class LiveBroadcasting(Feature):
+ INTERNAL_LINK = False
+
def description(self):
return "Live Broadcasting Support"
@@ -825,7 +827,6 @@ class LiveBroadcasting(Feature):
def add_options(self, build, vars):
vars.Add('shoutcast', 'Set to 1 to enable live broadcasting support', 1)
- vars.Add('shoutcast_internal', 'Set to 1 to use internal libshout', 0)
def configure(self, build, conf):
if not self.enabled(build):
@@ -833,34 +834,28 @@ class LiveBroadcasting(Feature):
build.env.Append(CPPDEFINES='__BROADCAST__')
- build.flags['shoutcast_internal'] = util.get_flags(build.env, 'shoutcast_internal', 0)
- if build.platform_is_linux and not int(build.flags['shoutcast_internal']):
- # Check if system lib is lower 2.4.2 or 2.4.3 and not suffering bug
+ if build.platform_is_linux:
+ # Check if system lib is lower at least 2.4.4 and not suffering bug
# https://bugs.launchpad.net/mixxx/+bug/1833225
- if not conf.CheckForPKG('shout', '2.4.3'):
- if conf.CheckForPKG('shout', '2.4.2'):
- print("System's libshout 2.4.2 suffers lp1833225, using internal shout_mixxx")
- build.flags['shoutcast_internal'] = 1
- else:
- print("(no) here is fine here we just don't want 2.4.2")
+ if not conf.CheckForPKG('shout', '2.4.4'):
+ self.INTERNAL_LINK = True
+
+ if not self.INTERNAL_LINK:
+ self.INTERNAL_LINK = not conf.CheckLib(['libshout', 'shout'])
- if int(build.flags['shoutcast_internal']):
+ if self.INTERNAL_LINK:
+ print("Using internal shout_mixxx from lib/libshout")
build.env.Append(CPPPATH='include')
build.env.Append(CPPPATH='src')
return
- libshout_found = conf.CheckLib(['libshout', 'shout'])
-
- if not libshout_found:
- raise Exception('Could not find libshout or its development headers. Please install it or compile Mixxx without Shoutcast support using the shoutcast=0 flag.')
-
if build.platform_is_windows and build.static_dependencies:
conf.CheckLib('winmm')
conf.CheckLib('ws2_32')
conf.CheckLib('gdi32')
def sources(self, build):
- if int(build.flags['shoutcast_internal']):
+ if self.INTERNAL_LINK:
# Clone our main environment so we don't change any settings in the
# Mixxx environment
libshout_env = build.env.Clone()
diff --git a/res/controllers/.eslintrc.json b/res/controllers/.eslintrc.json
new file mode 100644
index 0000000000..a5f60376e3
--- /dev/null
+++ b/res/controllers/.eslintrc.json
@@ -0,0 +1,10 @@
+{
+ "globals": {
+ "_": "readonly",
+ "color": "readonly",
+ "components": "readonly",
+ "engine": "readonly",
+ "midi": "readonly",
+ "script": "readonly"
+ }
+}
diff --git a/res/controllers/Denon-MC6000MK2-scripts.js b/res/controllers/Denon-MC6000MK2-scripts.js
index fccb95cae2..02f7547c94 100644
--- a/res/controllers/Denon-MC6000MK2-scripts.js
+++ b/res/controllers/Denon-MC6000MK2-scripts.js
@@ -1,21 +1,9 @@
////////////////////////////////////////////////////////////////////////
-// JSHint configuration //
-////////////////////////////////////////////////////////////////////////
-/* global engine */
-/* global script */
-/* global print */
-/* global midi */
-/* global components */
-////////////////////////////////////////////////////////////////////////
-
-
-////////////////////////////////////////////////////////////////////////
// Controller: Denon MC6000MK2
// URL: http://www.mixxx.org/wiki/doku.php/denon_mc6000mk2
-// Author: Uwe Klotz a/k/a tapir
+// Author: Uwe Klotz <uklotz@mixxx.org>
////////////////////////////////////////////////////////////////////////
-
var DenonMC6000MK2 = {};
////////////////////////////////////////////////////////////////////////
@@ -109,21 +97,21 @@ DenonMC6000MK2.MIDI_CH3 = 0x03;
// Logging functions //
////////////////////////////////////////////////////////////////////////
-DenonMC6000MK2.logDebug = function (msg) {
+DenonMC6000MK2.logDebug = function(msg) {
if (DenonMC6000MK2.debug) {
print("[" + DenonMC6000MK2.id + " DEBUG] " + msg);
}
};
-DenonMC6000MK2.logInfo = function (msg) {
+DenonMC6000MK2.logInfo = function(msg) {
print("[" + DenonMC6000MK2.id + " INFO] " + msg);
};
-DenonMC6000MK2.logWarning = function (msg) {
+DenonMC6000MK2.logWarning = function(msg) {
print("[" + DenonMC6000MK2.id + " WARNING] " + msg);
};
-DenonMC6000MK2.logError = function (msg) {
+DenonMC6000MK2.logError = function(msg) {
print("[" + DenonMC6000MK2.id + " ERROR] " + msg);
};
@@ -135,15 +123,15 @@ DenonMC6000MK2.logError = function (msg) {
DenonMC6000MK2.MIDI_BUTTON_ON = 0x40;
DenonMC6000MK2.MIDI_BUTTON_OFF = 0x00;
-DenonMC6000MK2.isButtonPressed = function (midiValue) {
+DenonMC6000MK2.isButtonPressed = function(midiValue) {
switch (midiValue) {
- case DenonMC6000MK2.MIDI_BUTTON_ON:
- return true;
- case DenonMC6000MK2.MIDI_BUTTON_OFF:
- return false;
- default:
- DenonMC6000MK2.logError("Unexpected MIDI button value: " + midiValue);
- return undefined;
+ case DenonMC6000MK2.MIDI_BUTTON_ON:
+ return true;
+ case DenonMC6000MK2.MIDI_BUTTON_OFF:
+ return false;
+ default:
+ DenonMC6000MK2.logError("Unexpected MIDI button value: " + midiValue);
+ return undefined;
}
};
@@ -155,15 +143,15 @@ DenonMC6000MK2.isButtonPressed = function (midiValue) {
DenonMC6000MK2.MIDI_KNOB_INC = 0x00;
DenonMC6000MK2.MIDI_KNOB_DEC = 0x7F;
-DenonMC6000MK2.getKnobDelta = function (midiValue) {
+DenonMC6000MK2.getKnobDelta = function(midiValue) {
switch (midiValue) {
- case DenonMC6000MK2.MIDI_KNOB_INC:
- return 1;
- case DenonMC6000MK2.MIDI_KNOB_DEC:
- return -1;
- default:
- DenonMC6000MK2.logError("Unexpected MIDI knob value: " + midiValue);
- return 0;
+ case DenonMC6000MK2.MIDI_KNOB_INC:
+ return 1;
+ case DenonMC6000MK2.MIDI_KNOB_DEC:
+ return -1;
+ default:
+ DenonMC6000MK2.logError("Unexpected MIDI knob value: " + midiValue);
+ return 0;
}
};
@@ -175,25 +163,25 @@ DenonMC6000MK2.getKnobDelta = function (midiValue) {
DenonMC6000MK2.MIDI_LED_ON = 0x50;
DenonMC6000MK2.MIDI_LED_OFF = 0x51;
-DenonMC6000MK2.LedState = function (midiCtrl) {
+DenonMC6000MK2.LedState = function(midiCtrl) {
this.midiCtrl = midiCtrl;
};
DenonMC6000MK2.LED_ON = new DenonMC6000MK2.LedState(DenonMC6000MK2.MIDI_LED_ON);
DenonMC6000MK2.LED_OFF = new DenonMC6000MK2.LedState(DenonMC6000MK2.MIDI_LED_OFF);
-DenonMC6000MK2.Led = function (midiChannel, midiValue) {
+DenonMC6000MK2.Led = function(midiChannel, midiValue) {
this.midiChannel = midiChannel;
this.midiValue = midiValue;
this.state = undefined;
};
-DenonMC6000MK2.Led.prototype.setState = function (ledState) {
+DenonMC6000MK2.Led.prototype.setState = function(ledState) {
this.state = ledState;
this.trigger();
};
-DenonMC6000MK2.Led.prototype.setStateBoolean = function (booleanValue) {
+DenonMC6000MK2.Led.prototype.setStateBoolean = function(booleanValue) {
if (booleanValue) {
this.setState(DenonMC6000MK2.LED_ON);
} else {
@@ -201,11 +189,11 @@ DenonMC6000MK2.Led.prototype.setStateBoolean = function (booleanValue) {
}
};
-DenonMC6000MK2.Led.prototype.trigger = function () {
+DenonMC6000MK2.Led.prototype.trigger = function() {
midi.sendShortMsg(0xB0 + this.midiChannel, this.state.midiCtrl, this.midiValue);
};
-DenonMC6000MK2.Led.prototype.reset = function () {
+DenonMC6000MK2.Led.prototype.reset = function() {
this.setStateBoolean(false);
};
@@ -213,7 +201,7 @@ DenonMC6000MK2.MIDI_TRI_LED_ON = 0x4A;
DenonMC6000MK2.MIDI_TRI_LED_OFF = 0x4B;
DenonMC6000MK2.MIDI_TRI_LED_BLINK = 0x4C;
-DenonMC6000MK2.TriLedState = function (midiCtrl) {
+DenonMC6000MK2.TriLedState = function(midiCtrl) {
this.midiCtrl = midiCtrl;
};
@@ -221,18 +209,18 @@ DenonMC6000MK2.TRI_LED_ON = new DenonMC6000MK2.TriLedState(DenonMC6000MK2.MIDI_T
DenonMC6000MK2.TRI_LED_OFF = new DenonMC6000MK2.TriLedState(DenonMC6000MK2.MIDI_TRI_LED_OFF);
DenonMC6000MK2.TRI_LED_BLINK = new DenonMC6000MK2.TriLedState(DenonMC6000MK2.MIDI_TRI_LED_BLINK);
-DenonMC6000MK2.TriLed = function (midiChannel, midiValue) {
+DenonMC6000MK2.TriLed = function(midiChannel, midiValue) {
this.midiChannel = midiChannel;
this.midiValue = midiValue;
this.state = undefined;
};
-DenonMC6000MK2.TriLed.prototype.setTriState = function (ledState) {
+DenonMC6000MK2.TriLed.prototype.setTriState = function(ledState) {
this.state = ledState;
this.trigger();
};
-DenonMC6000MK2.TriLed.prototype.setStateBoolean = function (booleanValue) {
+DenonMC6000MK2.TriLed.prototype.setStateBoolean = function(booleanValue) {
if (booleanValue) {
this.setTriState(DenonMC6000MK2.TRI_LED_ON);
} else {
@@ -240,31 +228,31 @@ DenonMC6000MK2.TriLed.prototype.setStateBoolean = function (booleanValue) {
}
};
-DenonMC6000MK2.TriLed.prototype.trigger = function () {
+DenonMC6000MK2.TriLed.prototype.trigger = function() {
midi.sendShortMsg(0xB0 + this.midiChannel, this.state.midiCtrl, this.midiValue);
};
-DenonMC6000MK2.TriLed.prototype.reset = function () {
+DenonMC6000MK2.TriLed.prototype.reset = function() {
this.setStateBoolean(false);
};
DenonMC6000MK2.connectedLeds = [];
-DenonMC6000MK2.connectLed = function (midiChannel, midiValue) {
+DenonMC6000MK2.connectLed = function(midiChannel, midiValue) {
var led = new DenonMC6000MK2.Led(midiChannel, midiValue);
led.reset();
DenonMC6000MK2.connectedLeds.push(led);
return led;
};
-DenonMC6000MK2.connectTriLed = function (midiChannel, midiValue) {
+DenonMC6000MK2.connectTriLed = function(midiChannel, midiValue) {
var led = new DenonMC6000MK2.TriLed(midiChannel, midiValue);
led.reset();
DenonMC6000MK2.connectedLeds.push(led);
return led;
};
-DenonMC6000MK2.disconnectLeds = function () {
+DenonMC6000MK2.disconnectLeds = function() {
for (var index in DenonMC6000MK2.connectedLeds) {
DenonMC6000MK2.connectedLeds[index].reset();
}
@@ -276,14 +264,14 @@ DenonMC6000MK2.disconnectLeds = function () {
// Controls //
////////////////////////////////////////////////////////////////////////
-DenonMC6000MK2.Control = function (group, ctrl, func) {
+DenonMC6000MK2.Control = function(group, ctrl, func) {
this.group = group;
this.ctrl = ctrl;
this.func = func;
this.isConnected = false;
};
-DenonMC6000MK2.Control.prototype.connect = function () {
+DenonMC6000MK2.Control.prototype.connect = function() {
if (this.isConnected) {
DenonMC6000MK2.logWarning("Control is already connected: group=" + this.group + ", ctrl=" + this.ctrl + ", func=" + this.func);
return true;
@@ -297,7 +285,7 @@ DenonMC6000MK2.Control.prototype.connect = function () {
return this.isConnected;
};
-DenonMC6000MK2.Control.prototype.disconnect = function () {
+DenonMC6000MK2.Control.prototype.disconnect = function() {
if (this.isConnected) {
if (engine.connectControl(this.group, this.ctrl, this.func, true)) {
this.isConnected = false;
@@ -309,13 +297,13 @@ DenonMC6000MK2.Control.prototype.disconnect = function () {
}
};
-DenonMC6000MK2.Control.prototype.trigger = function () {
+DenonMC6000MK2.Control.prototype.trigger = function() {
engine.trigger(this.group, this.ctrl);
};
DenonMC6000MK2.connectedControls = [];
-DenonMC6000MK2.connectControl = function (group, ctrl, func) {
+DenonMC6000MK2.connectControl = function(group, ctrl, func) {
var control = new DenonMC6000MK2.Control(group, ctrl, func);
if (control.connect()) {
DenonMC6000MK2.connectedControls.push(control);
@@ -325,7 +313,7 @@ DenonMC6000MK2.connectControl = function (group, ctrl, func) {
}
};
-DenonMC6000MK2.disconnectControls = function () {
+DenonMC6000MK2.disconnectControls = function() {
for (var index in DenonMC6000MK2.connectedControls) {
DenonMC6000MK2.connectedControls[index].disconnect();
}
@@ -341,7 +329,7 @@ DenonMC6000MK2.samplerCount = 0;
DenonMC6000MK2.samplersByGroup = {};
-DenonMC6000MK2.getSamplerByGroup = function (group) {
+DenonMC6000MK2.getSamplerByGroup = function(group) {
var sampler = DenonMC6000MK2.samplersByGroup[group];
if (undefined === sampler) {
DenonMC6000MK2.logError("No sampler found for " + group);
@@ -349,7 +337,7 @@ DenonMC6000MK2.getSamplerByGroup = function (group) {
return sampler;
};
-DenonMC6000MK2.Sampler = function (side, midiChannel, midiLedValue, midiDimmerLedValue) {
+DenonMC6000MK2.Sampler = function(side, midiChannel, midiLedValue, midiDimmerLedValue) {
this.side = side;
this.number = ++DenonMC6000MK2.samplerCount;
this.group = "[Sampler" + this.number + "]";
@@ -359,67 +347,67 @@ DenonMC6000MK2.Sampler = function (side, midiChannel, midiLedValue, midiDimmerLe
DenonMC6000MK2.samplersByGroup[this.group] = this;
};
-DenonMC6000MK2.Sampler.prototype.isTrackLoaded = function () {
+DenonMC6000MK2.Sampler.prototype.isTrackLoaded = function() {
return DenonMC6000MK2.isTrackLoaded(engine.getValue(this.group, "track_samples"));
};
-DenonMC6000MK2.Sampler.prototype.loadSelectedTrack = function () {
+DenonMC6000MK2.Sampler.prototype.loadSelectedTrack = function() {
engine.setValue(this.group, "LoadSelectedTrack", true);
};
-DenonMC6000MK2.Sampler.prototype.loadSelectedTrackAndPlay = function () {
+DenonMC6000MK2.Sampler.prototype.loadSelectedTrackAndPlay = function() {
engine.setValue(this.group, "LoadSelectedTrackAndPlay", true);
};
-DenonMC6000MK2.Sampler.prototype.isPlaying = function () {
+DenonMC6000MK2.Sampler.prototype.isPlaying = function() {
return engine.getValue(this.group, "play");
};
-DenonMC6000MK2.Sampler.prototype.onButton = function (isButtonPressed) {
+DenonMC6000MK2.Sampler.prototype.onButton = function(isButtonPressed) {
switch (DenonMC6000MK2.DEFAULT_SAMPLER_MODE) {
- case DenonMC6000MK2.SAMPLER_MODE.TRIGGER:
- if (isButtonPressed) {
- if (this.isTrackLoaded()) {
- if (this.side.getShiftState()) {
- engine.setValue(this.group, "start_stop", true);
- } else {
- engine.setValue(this.group, "start_play", true);
- }
+ case DenonMC6000MK2.SAMPLER_MODE.TRIGGER:
+ if (isButtonPressed) {
+ if (this.isTrackLoaded()) {
+ if (this.side.getShiftState()) {
+ engine.setValue(this.group, "start_stop", true);
} else {
- this.loadSelectedTrack();
+ engine.setValue(this.group, "start_play", true);
}
+ } else {
+ this.loadSelectedTrack();
}
- break;
- case DenonMC6000MK2.SAMPLER_MODE.HOLD:
- if (this.isTrackLoaded()) {
- if (isButtonPressed) {
- if (this.side.getShiftState()) {
- engine.setValue(this.group, "eject", true);
- } else {
- engine.setValue(this.group, "start_play", true);
- }
+ }
+ break;
+ case DenonMC6000MK2.SAMPLER_MODE.HOLD:
+ if (this.isTrackLoaded()) {
+ if (isButtonPressed) {
+ if (this.side.getShiftState()) {
+ engine.setValue(this.group, "eject", true);
} else {
- // continue playing if shift is pressed when
- // releasing the pressed button
- if (!this.side.getShiftState()) {
- engine.setValue(this.group, "start_stop", true);
- }
+ engine.setValue(this.group, "start_play", true);
}
} else {
- if (isButtonPressed) {
- this.loadSelectedTrack();
+ // continue playing if shift is pressed when
+ // releasing the pressed button
+ if (!this.side.getShiftState()) {
+ engine.setValue(this.group, "start_stop", true);
}
}
- break;
+ } else {
+ if (isButtonPressed) {
+ this.loadSelectedTrack();
+ }
+ }
+ break;
}
};
-DenonMC6000MK2.Sampler.prototype.connectLeds = function () {
+DenonMC6000MK2.Sampler.prototype.connectLeds = function() {
this.led = DenonMC6000MK2.connectTriLed(this.midiChannel, this.midiLedValue);
this.dimmerLed = DenonMC6000MK2.connectTriLed(this.midiChannel, this.midiDimmerLedValue);
};
-DenonMC6000MK2.Sampler.prototype.updateLeds = function () {
+DenonMC6000MK2.Sampler.prototype.updateLeds = function() {
if (this.isPlaying()) {
this.led.setStateBoolean(true);
} else {
@@ -427,7 +415,7 @@ DenonMC6000MK2.Sampler.prototype.updateLeds = function () {
}
};
-DenonMC6000MK2.Sampler.prototype.connectControls = function () {
+DenonMC6000MK2.Sampler.prototype.connectControls = function() {
DenonMC6000MK2.connectControl(this.group, "play", DenonMC6000MK2.ctrlSampler);
DenonMC6000MK2.connectControl(this.group, "track_samples", DenonMC6000MK2.ctrlSampler);
};
@@ -441,7 +429,7 @@ DenonMC6000MK2.Sampler.prototype.connectControls = function () {
DenonMC6000MK2.decksByGroup = {};
-DenonMC6000MK2.getDeckByGroup = function (group) {
+DenonMC6000MK2.getDeckByGroup = function(group) {
var deck = DenonMC6000MK2.decksByGroup[group];
if (undefined === deck) {
DenonMC6000MK2.logError("No deck found for " + group);
@@ -451,7 +439,7 @@ DenonMC6000MK2.getDeckByGroup = function (group) {
/* Constructor */
-DenonMC6000MK2.OldDeck = function (number, midiChannel) {
+DenonMC6000MK2.OldDeck = function(number, midiChannel) {
this.side = undefined;
this.number = number;
this.group = "[Channel" + number + "]";
@@ -467,105 +455,105 @@ DenonMC6000MK2.OldDeck = function (number, midiChannel) {
/* Shift */
-DenonMC6000MK2.OldDeck.prototype.getShiftState = function (group) {
+DenonMC6000MK2.OldDeck.prototype.getShiftState = function(_group) {
return this.side.getShiftState();
};
/* Values & Parameters */
-DenonMC6000MK2.OldDeck.prototype.getValue = function (key) {
+DenonMC6000MK2.OldDeck.prototype.getValue = function(key) {
return engine.getValue(this.group, key);
};
-DenonMC6000MK2.OldDeck.prototype.setValue = function (key, value) {
+DenonMC6000MK2.OldDeck.prototype.setValue = function(key, value) {
engine.setValue(this.group, key, value);
};
-DenonMC6000MK2.OldDeck.prototype.toggleValue = function (key) {
+DenonMC6000MK2.OldDeck.prototype.toggleValue = function(key) {
this.setValue(key, !this.getValue(key));
};
-DenonMC6000MK2.OldDeck.prototype.setParameter = function (key, param) {
+DenonMC6000MK2.OldDeck.prototype.setParameter = function(key, param) {
engine.setParameter(this.group, key, param);
};
-DenonMC6000MK2.OldDeck.prototype.triggerValue = function (key) {
+DenonMC6000MK2.OldDeck.prototype.triggerValue = function(key) {
engine.trigger(this.group, key);
};
/* Xfader */
-DenonMC6000MK2.OldDeck.prototype.assignXfaderLeft = function () {
+DenonMC6000MK2.OldDeck.prototype.assignXfaderLeft = function() {
this.setValue("orientation", DenonMC6000MK2.MIXXX_XFADER_LEFT);
};
-DenonMC6000MK2.OldDeck.prototype.assignXfaderCenter = function () {
+DenonMC6000MK2.OldDeck.prototype.assignXfaderCenter = function() {
this.setValue("orientation", DenonMC6000MK2.MIXXX_XFADER_CENTER);
};
-DenonMC6000MK2.OldDeck.prototype.assignXfaderRight = function () {
+DenonMC6000MK2.OldDeck.prototype.assignXfaderRight = function() {
this.setValue("orientation", DenonMC6000MK2.MIXXX_XFADER_RIGHT);
};
/* Tracks */
-DenonMC6000MK2.OldDeck.prototype.loadSelectedTrack = function () {
+DenonMC6000MK2.OldDeck.prototype.loadSelectedTrack = function() {
this.setValue("LoadSelectedTrack", true);
if (!this.isPlaying()) {
this.setCueMixSolo(); // just for convenience ;)
}
};
-DenonMC6000MK2.OldDeck.prototype.loadSelectedTrackAndPlay = function () {
+DenonMC6000MK2.OldDeck.prototype.loadSelectedTrackAndPlay = function() {
this.setValue("LoadSelectedTrackAndPlay", true);
};
-DenonMC6000MK2.OldDeck.prototype.unloadTrack = function () {
+DenonMC6000MK2.OldDeck.prototype.unloadTrack = function() {
this.setValue("eject", true);
};
/* Key Lock Mode */
-DenonMC6000MK2.OldDeck.prototype.onKeyLockButton = function (isButtonPressed) {
+DenonMC6000MK2.OldDeck.prototype.onKeyLockButton = function(isButtonPressed) {
if (isButtonPressed) {
this.toggleValue("keylock");
}
};
-DenonMC6000MK2.OldDeck.prototype.enableKeyLock = function () {
+DenonMC6000MK2.OldDeck.prototype.enableKeyLock = function() {
this.setValue("keylock", true);
};
-DenonMC6000MK2.OldDeck.prototype.disableKeyLock = function () {
+DenonMC6000MK2.OldDeck.prototype.disableKeyLock = function() {
this.setValue("keylock", false);
};
-DenonMC6000MK2.OldDeck.prototype.onKeyLockValue = function (value) {
+DenonMC6000MK2.OldDeck.prototype.onKeyLockValue = function(value) {
this.keyLockLed.setStateBoolean(value);
};
/* Key Control */
-DenonMC6000MK2.OldDeck.prototype.resetKey = function () {
+DenonMC6000MK2.OldDeck.prototype.resetKey = function() {
this.setValue("reset_key", true);
};
/* Sync Mode */
-DenonMC6000MK2.OldDeck.prototype.disableSyncMode = function () {
+DenonMC6000MK2.OldDeck.prototype.disableSyncMode = function() {
this.setValue("sync_mode", DenonMC6000MK2.MIXXX_SYNC_NONE);
};
/* Cue Mix */
-DenonMC6000MK2.OldDeck.prototype.setCueMixSolo = function () {
+DenonMC6000MK2.OldDeck.prototype.setCueMixSolo = function() {
for (var deckGroup in DenonMC6000MK2.decksByGroup) {
var deck = DenonMC6000MK2.getDeckByGroup(deckGroup);
deck.setValue("pfl", this === deck);
}
};
-DenonMC6000MK2.OldDeck.prototype.onCueMixButton = function (isButtonPressed) {
+DenonMC6000MK2.OldDeck.prototype.onCueMixButton = function(isButtonPressed) {
if (isButtonPressed) {
if (this.getShiftState()) {
this.setCueMixSolo();
@@ -575,7 +563,7 @@ DenonMC6000MK2.OldDeck.prototype.onCueMixButton = function (isButtonPressed) {
}
};
-DenonMC6000MK2.OldDeck.prototype.updateCueMixValue = function (pflValue, isTrackLoaded) {
+DenonMC6000MK2.OldDeck.prototype.updateCueMixValue = function(pflValue, isTrackLoaded) {
if (pflValue) {
this.cueMixLed.setStateBoolean(pflValue);
} else {
@@ -583,33 +571,33 @@ DenonMC6000MK2.OldDeck.prototype.updateCueMixValue = function (pflValue, isTrack
}
};
-DenonMC6000MK2.OldDeck.prototype.onCueMixValue = function (pflValue) {
+DenonMC6000MK2.OldDeck.prototype.onCueMixValue = function(pflValue) {
this.updateCueMixValue(pflValue, this.isTrackLoaded());
};
/* Track Load */
-DenonMC6000MK2.isTrackLoaded = function (trackSamples) {
+DenonMC6000MK2.isTrackLoaded = function(trackSamples) {
return 0 < trackSamples;
};
-DenonMC6000MK2.OldDeck.prototype.isTrackLoaded = function () {
+DenonMC6000MK2.OldDeck.prototype.isTrackLoaded = function() {
return DenonMC6000MK2.isTrackLoaded(this.getValue("track_samples"));
};
-DenonMC6000MK2.OldDeck.prototype.onTrackSamplesValue = function (value) {
+DenonMC6000MK2.OldDeck.prototype.onTrackSamplesValue = function(value) {
this.updateCueMixValue(this.getValue("pfl"), DenonMC6000MK2.isTrackLoaded(value));
};
/* Cue & Play */
-DenonMC6000MK2.OldDeck.prototype.isPlaying = function () {
+DenonMC6000MK2.OldDeck.prototype.isPlaying = function() {
return this.getValue("play");
};
/* Pitch Bend / Track Search */
-DenonMC6000MK2.OldDeck.prototype.onBendPlusButton = function (isButtonPressed) {
+DenonMC6000MK2.OldDeck.prototype.onBendPlusButton = function(isButtonPressed) {
if (this.isPlaying()) {
this.setValue("fwd", false);
if (this.getShiftState()) {
@@ -622,7 +610,7 @@ DenonMC6000MK2.OldDeck.prototype.onBendPlusButton = function (isButtonPressed) {
}
};
-DenonMC6000MK2.OldDeck.prototype.onBendMinusButton = function (isButtonPressed) {
+DenonMC6000MK2.OldDeck.prototype.onBendMinusButton = function(isButtonPressed) {
if (this.isPlaying()) {
this.setValue("back", false);
if (this.getShiftState()) {
@@ -638,35 +626,35 @@ DenonMC6000MK2.OldDeck.prototype.onBendMinusButton = function (isButtonPressed)
/* Censor / Slip Mode */
-DenonMC6000MK2.OldDeck.prototype.onCensorButton = function (buttonPressed) {
+DenonMC6000MK2.OldDeck.prototype.onCensorButton = function(buttonPressed) {
if (this.getShiftState()) {
// Please note that reverseroll seems to have side effects on
// slip_enabled so better leave it alone while shift is pressed!
if (buttonPressed) {
- this.toggleValue('slip_enabled');
+ this.toggleValue("slip_enabled");
}
} else {
- this.setValue('reverseroll', buttonPressed);
+ this.setValue("reverseroll", buttonPressed);
}
};
-DenonMC6000MK2.OldDeck.prototype.onSlipModeValue = function (value) {
+DenonMC6000MK2.OldDeck.prototype.onSlipModeValue = function(value) {
this.slipModeLed.setStateBoolean(value);
};
/* Vinyl Mode (Scratching) */
-DenonMC6000MK2.OldDeck.prototype.onVinylModeValue = function () {
+DenonMC6000MK2.OldDeck.prototype.onVinylModeValue = function() {
this.vinylModeLed.setStateBoolean(this.vinylMode);
};
-DenonMC6000MK2.OldDeck.prototype.enableScratching = function () {
+DenonMC6000MK2.OldDeck.prototype.enableScratching = function() {
};
-DenonMC6000MK2.OldDeck.prototype.disableScratching = function () {
+DenonMC6000MK2.OldDeck.prototype.disableScratching = function() {
};
-DenonMC6000MK2.OldDeck.prototype.updateVinylMode = function () {
+DenonMC6000MK2.OldDeck.prototype.updateVinylMode = function() {
if (this.vinylMode && this.jogTouchState) {
engine.scratchEnable(this.number,
DenonMC6000MK2.JOG_RESOLUTION,
@@ -681,35 +669,35 @@ DenonMC6000MK2.OldDeck.prototype.updateVinylMode = function () {
this.onVinylModeValue();
};
-DenonMC6000MK2.OldDeck.prototype.setVinylMode = function (vinylMode) {
+DenonMC6000MK2.OldDeck.prototype.setVinylMode = function(vinylMode) {
this.vinylMode = vinylMode;
this.updateVinylMode();
};
-DenonMC6000MK2.OldDeck.prototype.toggleVinylMode = function () {
+DenonMC6000MK2.OldDeck.prototype.toggleVinylMode = function() {
this.setVinylMode(!this.vinylMode);
};
-DenonMC6000MK2.OldDeck.prototype.enableVinylMode = function () {
+DenonMC6000MK2.OldDeck.prototype.enableVinylMode = function() {
this.setVinylMode(true);
};
-DenonMC6000MK2.OldDeck.prototype.disableVinylMode = function () {
+DenonMC6000MK2.OldDeck.prototype.disableVinylMode = function() {
this.setVinylMode(false);
};
-DenonMC6000MK2.OldDeck.prototype.onVinylButton = function (isButtonPressed) {
+DenonMC6000MK2.OldDeck.prototype.onVinylButton = function(_isButtonPressed) {
this.toggleVinylMode();
};
/* Jog Wheel */
-DenonMC6000MK2.OldDeck.prototype.touchJog = function (isJogTouched) {
+DenonMC6000MK2.OldDeck.prototype.touchJog = function(isJogTouched) {
this.jogTouchState = isJogTouched;
this.updateVinylMode();
};
-DenonMC6000MK2.OldDeck.prototype.spinJog = function (jogDelta) {
+DenonMC6000MK2.OldDeck.prototype.spinJog = function(jogDelta) {
if (this.getShiftState() && this.jogTouchState && !this.isPlaying()) {
// fast track seek (strip search)
var playPos = engine.getValue(this.group, "playposition");
@@ -751,68 +739,68 @@ DenonMC6000MK2.OldDeck.prototype.spinJog = function (jogDelta) {