From 697e7cb008d40f4f93a09b6edca1e3fa71b98f3c Mon Sep 17 00:00:00 2001 From: Robert Hendrickx Date: Fri, 3 Feb 2023 18:35:17 +0100 Subject: [PATCH 01/14] Pioneer DDJ-FLX4: New mapping base on DDJ-400 --- res/controllers/Pioneer-DDJ-FLX4-script.js | 780 +++++ res/controllers/Pioneer-DDJ-FLX4.midi.xml | 3228 ++++++++++++++++++++ 2 files changed, 4008 insertions(+) create mode 100644 res/controllers/Pioneer-DDJ-FLX4-script.js create mode 100644 res/controllers/Pioneer-DDJ-FLX4.midi.xml diff --git a/res/controllers/Pioneer-DDJ-FLX4-script.js b/res/controllers/Pioneer-DDJ-FLX4-script.js new file mode 100644 index 00000000000..a6c9fbd1ce1 --- /dev/null +++ b/res/controllers/Pioneer-DDJ-FLX4-script.js @@ -0,0 +1,780 @@ +// Pioneer-DDJ-FLX4-script.js +// **************************************************************************** +// * Mixxx mapping script file for the Pioneer DDJ-FLX4. +// * Mostly adapted from the DDJ-400 mapping script +// * Authors: Warker, nschloe, dj3730, jusko, Robert904 +// * Reviewers: Be-ing, Holzhaus +// * Manual: https://manual.mixxx.org/2.3/en/hardware/controllers/ +// **************************************************************************** +// +// Implemented (as per manufacturer's manual): +// * Mixer Section (Faders, EQ, Filter, Gain, Cue) +// * Browsing and loading + Waveform zoom (shift) +// * Jogwheels, Scratching, Bending, Loop adjust +// * Cycle Temporange +// * Beat Sync +// * Hot Cue Mode +// * Beat Loop Mode +// * Beat Jump Mode +// * Sampler Mode +// +// Custom (Mixxx specific mappings): +// * BeatFX: Assigned Effect Unit 1 +// v FX_SELECT focus EFFECT1. +// < LEFT focus EFFECT2 +// > RIGHT focus EFFECT3 +// ON/OFF toggles focused effect slot +// SHIFT + ON/OFF disables all three effect slots. +// SHIFT + < loads previous effect +// SHIFT + > loads next effect +// +// * 32 beat jump forward & back (Shift + CUE/LOOP CALL arrows) +// * Toggle quantize (Shift + channel cue) +// +// Not implemented (after discussion and trial attempts): +// * Loop Section: +// * -4BEAT auto loop (hacky---prefer a clean way to set a 4 beat loop +// from a previous position on long press) +// +// * CUE/LOOP CALL - memory & delete (complex and not useful. Hot cues are sufficient) +// +// * Secondary pad modes (trial attempts complex and too experimental) +// * Keyboard mode +// * Pad FX1 +// * Pad FX2 +// * Keyshift mode +// +// Not implemented yet (but might be in the future): +// * Smart CFX +// * Smart fader + +var PioneerDDJFLX4 = {}; + +PioneerDDJFLX4.lights = { + beatFx: { + status: 0x94, + data1: 0x47, + }, + shiftBeatFx: { + status: 0x94, + data1: 0x43, + }, + deck1: { + vuMeter: { + status: 0xB0, + data1: 0x02, + }, + playPause: { + status: 0x90, + data1: 0x0B, + }, + shiftPlayPause: { + status: 0x90, + data1: 0x47, + }, + cue: { + status: 0x90, + data1: 0x0C, + }, + shiftCue: { + status: 0x90, + data1: 0x48, + }, + hotcueMode: { + status: 0x90, + data1: 0x1B, + }, + keyboardMode: { + status: 0x90, + data1: 0x69, + }, + padFX1Mode: { + status: 0x90, + data1: 0x1E, + }, + padFX2Mode: { + status: 0x90, + data1: 0x6B, + }, + beatJumpMode: { + status: 0x90, + data1: 0x20, + }, + beatLoopMode: { + status: 0x90, + data1: 0x6D, + }, + samplerMode: { + status: 0x90, + data1: 0x22, + }, + keyShiftMode: { + status: 0x90, + data1: 0x6F, + }, + }, + deck2: { + vuMeter: { + status: 0xB0, + data1: 0x02, + }, + playPause: { + status: 0x91, + data1: 0x0B, + }, + shiftPlayPause: { + status: 0x91, + data1: 0x47, + }, + cue: { + status: 0x91, + data1: 0x0C, + }, + shiftCue: { + status: 0x91, + data1: 0x48, + }, + hotcueMode: { + status: 0x91, + data1: 0x1B, + }, + keyboardMode: { + status: 0x91, + data1: 0x69, + }, + padFX1Mode: { + status: 0x91, + data1: 0x1E, + }, + padFX2Mode: { + status: 0x91, + data1: 0x6B, + }, + beatJumpMode: { + status: 0x91, + data1: 0x20, + }, + beatLoopMode: { + status: 0x91, + data1: 0x6D, + }, + samplerMode: { + status: 0x91, + data1: 0x22, + }, + keyShiftMode: { + status: 0x91, + data1: 0x6F, + }, + }, +}; + +// Store timer IDs +PioneerDDJFLX4.timers = {}; + +// Jog wheel constants +PioneerDDJFLX4.vinylMode = true; +PioneerDDJFLX4.alpha = 1.0/8; +PioneerDDJFLX4.beta = PioneerDDJFLX4.alpha/32; + +// Multiplier for fast seek through track using SHIFT+JOGWHEEL +PioneerDDJFLX4.fastSeekScale = 150; +PioneerDDJFLX4.bendScale = 0.8; + +PioneerDDJFLX4.tempoRanges = [0.06, 0.10, 0.16, 0.25]; + +PioneerDDJFLX4.shiftButtonDown = [false, false]; + +// Jog wheel loop adjust +PioneerDDJFLX4.loopAdjustIn = [false, false]; +PioneerDDJFLX4.loopAdjustOut = [false, false]; +PioneerDDJFLX4.loopAdjustMultiply = 50; + +// Beatjump pad (beatjump_size values) +PioneerDDJFLX4.beatjumpSizeForPad = { + 0x20: -1, // PAD 1 + 0x21: 1, // PAD 2 + 0x22: -2, // PAD 3 + 0x23: 2, // PAD 4 + 0x24: -4, // PAD 5 + 0x25: 4, // PAD 6 + 0x26: -8, // PAD 7 + 0x27: 8 // PAD 8 +}; + +PioneerDDJFLX4.quickJumpSize = 32; + +// Used for tempo slider +PioneerDDJFLX4.highResMSB = { + "[Channel1]": {}, + "[Channel2]": {} +}; + +PioneerDDJFLX4.trackLoadedLED = function(value, group, _control) { + midi.sendShortMsg( + 0x9F, + group.match(script.channelRegEx)[1] - 1, + value > 0 ? 0x7F : 0x00 + ); +}; + +PioneerDDJFLX4.toggleLight = function(midiIn, active) { + midi.sendShortMsg(midiIn.status, midiIn.data1, active ? 0x7F : 0); +}; + +// +// Init +// + +PioneerDDJFLX4.init = function() { + engine.setValue("[EffectRack1_EffectUnit1]", "show_focus", 1); + + engine.makeConnection("[Channel1]", "VuMeter", PioneerDDJFLX4.vuMeterUpdate); + engine.makeConnection("[Channel2]", "VuMeter", PioneerDDJFLX4.vuMeterUpdate); + + PioneerDDJFLX4.toggleLight(PioneerDDJFLX4.lights.deck1.vuMeter, false); + PioneerDDJFLX4.toggleLight(PioneerDDJFLX4.lights.deck2.vuMeter, false); + + engine.softTakeover("[Channel1]", "rate", true); + engine.softTakeover("[Channel2]", "rate", true); + engine.softTakeover("[EffectRack1_EffectUnit1_Effect1]", "meta", true); + engine.softTakeover("[EffectRack1_EffectUnit1_Effect2]", "meta", true); + engine.softTakeover("[EffectRack1_EffectUnit1_Effect3]", "meta", true); + engine.softTakeover("[EffectRack1_EffectUnit1]", "mix", true); + + for (var i = 1; i <= 16; ++i) { + engine.makeConnection("[Sampler" + i + "]", "play", PioneerDDJFLX4.samplerPlayOutputCallbackFunction); + } + + engine.makeConnection("[Channel1]", "track_loaded", PioneerDDJFLX4.trackLoadedLED); + engine.makeConnection("[Channel2]", "track_loaded", PioneerDDJFLX4.trackLoadedLED); + + // play the "track loaded" animation on both decks at startup + midi.sendShortMsg(0x9F, 0x00, 0x7F); + midi.sendShortMsg(0x9F, 0x01, 0x7F); + + PioneerDDJFLX4.setLoopButtonLights(0x90, 0x7F); + PioneerDDJFLX4.setLoopButtonLights(0x91, 0x7F); + + engine.makeConnection("[Channel1]", "loop_enabled", PioneerDDJFLX4.loopToggle); + engine.makeConnection("[Channel2]", "loop_enabled", PioneerDDJFLX4.loopToggle); + + for (i = 1; i <= 3; i++) { + engine.makeConnection("[EffectRack1_EffectUnit1_Effect" + i +"]", "enabled", PioneerDDJFLX4.toggleFxLight); + } + engine.makeConnection("[EffectRack1_EffectUnit1]", "focused_effect", PioneerDDJFLX4.toggleFxLight); + + // query the controller for current control positions on startup + midi.sendSysexMsg([0xF0, 0x00, 0x40, 0x05, 0x00, 0x00, 0x02, 0x06, 0x00, 0x03, 0x01, 0xf7], 12); +}; + +// +// Channel level lights +// + +PioneerDDJFLX4.vuMeterUpdate = function(value, group) { + var newVal = value * 150; + + switch (group) { + case "[Channel1]": + midi.sendShortMsg(0xB0, 0x02, newVal); + break; + + case "[Channel2]": + midi.sendShortMsg(0xB1, 0x02, newVal); + break; + } +}; + +// +// Effects +// + +PioneerDDJFLX4.toggleFxLight = function(_value, _group, _control) { + var enabled = engine.getValue(PioneerDDJFLX4.focusedFxGroup(), "enabled"); + + PioneerDDJFLX4.toggleLight(PioneerDDJFLX4.lights.beatFx, enabled); + PioneerDDJFLX4.toggleLight(PioneerDDJFLX4.lights.shiftBeatFx, enabled); +}; + +PioneerDDJFLX4.focusedFxGroup = function() { + var focusedFx = engine.getValue("[EffectRack1_EffectUnit1]", "focused_effect"); + return "[EffectRack1_EffectUnit1_Effect" + focusedFx + "]"; +}; + +PioneerDDJFLX4.beatFxLevelDepthRotate = function(_channel, _control, value) { + if (PioneerDDJFLX4.shiftButtonDown[0] || PioneerDDJFLX4.shiftButtonDown[1]) { + engine.softTakeoverIgnoreNextValue("[EffectRack1_EffectUnit1]", "mix"); + engine.setParameter(PioneerDDJFLX4.focusedFxGroup(), "meta", value / 0x7F); + } else { + engine.softTakeoverIgnoreNextValue(PioneerDDJFLX4.focusedFxGroup(), "meta"); + engine.setParameter("[EffectRack1_EffectUnit1]", "mix", value / 0x7F); + } +}; + +PioneerDDJFLX4.beatFxSelectPreviousEffect = function(_channel, _control, value) { + engine.setValue(PioneerDDJFLX4.focusedFxGroup(), "prev_effect", value); +}; + +PioneerDDJFLX4.beatFxSelectNextEffect = function(_channel, _control, value) { + engine.setValue(PioneerDDJFLX4.focusedFxGroup(), "next_effect", value); +}; + +PioneerDDJFLX4.beatFxSelectPressed = function(_channel, _control, value) { + if (value === 0) { return; } + + engine.setValue("[EffectRack1_EffectUnit1]", "focused_effect", 1); +}; + +PioneerDDJFLX4.beatFxLeftPressed = function(_channel, _control, value) { + if (value === 0) { return; } + + engine.setValue("[EffectRack1_EffectUnit1]", "focused_effect", 2); +}; + +PioneerDDJFLX4.beatFxRightPressed = function(_channel, _control, value) { + if (value === 0) { return; } + + engine.setValue("[EffectRack1_EffectUnit1]", "focused_effect", 3); +}; + +PioneerDDJFLX4.beatFxOnOffPressed = function(_channel, _control, value) { + if (value === 0) { return; } + + var toggleEnabled = !engine.getValue(PioneerDDJFLX4.focusedFxGroup(), "enabled"); + engine.setValue(PioneerDDJFLX4.focusedFxGroup(), "enabled", toggleEnabled); +}; + +PioneerDDJFLX4.beatFxOnOffShiftPressed = function(_channel, _control, value) { + if (value === 0) { return; } + + engine.setParameter("[EffectRack1_EffectUnit1]", "mix", 0); + engine.softTakeoverIgnoreNextValue("[EffectRack1_EffectUnit1]", "mix"); + + for (var i = 1; i <= 3; i++) { + engine.setValue("[EffectRack1_EffectUnit1_Effect" + i + "]", "enabled", 0); + } + PioneerDDJFLX4.toggleLight(PioneerDDJFLX4.lights.beatFx, false); + PioneerDDJFLX4.toggleLight(PioneerDDJFLX4.lights.shiftBeatFx, false); +}; + +PioneerDDJFLX4.beatFxChannel1 = function(_channel, control, value, _status, group) { + var enableChannel = 0; + + if ( value === 0x7f ) + enableChannel = 1; + + engine.setValue(group, "group_[Channel1]_enable", enableChannel); +}; + +PioneerDDJFLX4.beatFxChannel2 = function(_channel, control, value, _status, group) { + var enableChannel = 0; + + if ( value === 0x7f ) + enableChannel = 1; + + engine.setValue(group, "group_[Channel2]_enable", enableChannel); +}; + +// +// Loop IN/OUT ADJUST +// + +PioneerDDJFLX4.toggleLoopAdjustIn = function(channel, _control, value, _status, group) { + if (value === 0 || engine.getValue(group, "loop_enabled" === 0)) { + return; + } + PioneerDDJFLX4.loopAdjustIn[channel] = !PioneerDDJFLX4.loopAdjustIn[channel]; + PioneerDDJFLX4.loopAdjustOut[channel] = false; +}; + +PioneerDDJFLX4.toggleLoopAdjustOut = function(channel, _control, value, _status, group) { + if (value === 0 || engine.getValue(group, "loop_enabled" === 0)) { + return; + } + PioneerDDJFLX4.loopAdjustOut[channel] = !PioneerDDJFLX4.loopAdjustOut[channel]; + PioneerDDJFLX4.loopAdjustIn[channel] = false; +}; + +// Two signals are sent here so that the light stays lit/unlit in its shift state too +PioneerDDJFLX4.setReloopLight = function(status, value) { + midi.sendShortMsg(status, 0x4D, value); + midi.sendShortMsg(status, 0x50, value); +}; + + +PioneerDDJFLX4.setLoopButtonLights = function(status, value) { + [0x10, 0x11, 0x4E, 0x4C].forEach(function(control) { + midi.sendShortMsg(status, control, value); + }); +}; + +PioneerDDJFLX4.startLoopLightsBlink = function(channel, control, status, group) { + var blink = 0x7F; + + PioneerDDJFLX4.stopLoopLightsBlink(group, control, status); + + PioneerDDJFLX4.timers[group][control] = engine.beginTimer(500, function() { + blink = 0x7F - blink; + + // When adjusting the loop out position, turn the loop in light off + if (PioneerDDJFLX4.loopAdjustOut[channel]) { + midi.sendShortMsg(status, 0x10, 0x00); + midi.sendShortMsg(status, 0x4C, 0x00); + } else { + midi.sendShortMsg(status, 0x10, blink); + midi.sendShortMsg(status, 0x4C, blink); + } + + // When adjusting the loop in position, turn the loop out light off + if (PioneerDDJFLX4.loopAdjustIn[channel]) { + midi.sendShortMsg(status, 0x11, 0x00); + midi.sendShortMsg(status, 0x4E, 0x00); + } else { + midi.sendShortMsg(status, 0x11, blink); + midi.sendShortMsg(status, 0x4E, blink); + } + }); + +}; + +PioneerDDJFLX4.stopLoopLightsBlink = function(group, control, status) { + PioneerDDJFLX4.timers[group] = PioneerDDJFLX4.timers[group] || {}; + + if (PioneerDDJFLX4.timers[group][control] !== undefined) { + engine.stopTimer(PioneerDDJFLX4.timers[group][control]); + } + PioneerDDJFLX4.timers[group][control] = undefined; + PioneerDDJFLX4.setLoopButtonLights(status, 0x7F); +}; + +PioneerDDJFLX4.loopToggle = function(value, group, control) { + var status = group === "[Channel1]" ? 0x90 : 0x91, + channel = group === "[Channel1]" ? 0 : 1; + + PioneerDDJFLX4.setReloopLight(status, value ? 0x7F : 0x00); + + if (value) { + PioneerDDJFLX4.startLoopLightsBlink(channel, control, status, group); + } else { + PioneerDDJFLX4.stopLoopLightsBlink(group, control, status); + PioneerDDJFLX4.loopAdjustIn[channel] = false; + PioneerDDJFLX4.loopAdjustOut[channel] = false; + } +}; + +// +// CUE/LOOP CALL +// + +PioneerDDJFLX4.cueLoopCallLeft = function(_channel, _control, value, _status, group) { + if (value) { + engine.setValue(group, "loop_scale", 0.5); + } +}; + +PioneerDDJFLX4.cueLoopCallRight = function(_channel, _control, value, _status, group) { + if (value) { + engine.setValue(group, "loop_scale", 2.0); + } +}; + +// +// BEAT SYNC +// +// Note that the controller sends different signals for a short press and a long +// press of the same button. +// + +PioneerDDJFLX4.syncPressed = function(channel, control, value, status, group) { + if (engine.getValue(group, "sync_enabled") && value > 0) { + engine.setValue(group, "sync_enabled", 0); + } else { + engine.setValue(group, "beatsync", value); + } +}; + +PioneerDDJFLX4.syncLongPressed = function(channel, control, value, status, group) { + if (value) { + engine.setValue(group, "sync_enabled", 1); + } +}; + +PioneerDDJFLX4.cycleTempoRange = function(_channel, _control, value, _status, group) { + if (value === 0) return; // ignore release + + var currRange = engine.getValue(group, "rateRange"); + var idx = 0; + + for (var i = 0; i < this.tempoRanges.length; i++) { + if (currRange === this.tempoRanges[i]) { + idx = (i + 1) % this.tempoRanges.length; + break; + } + } + engine.setValue(group, "rateRange", this.tempoRanges[idx]); +}; + +// +// Jog wheels +// + +PioneerDDJFLX4.jogTurn = function(channel, _control, value, _status, group) { + var deckNum = channel + 1; + // wheel center at 64; <64 rew >64 fwd + var newVal = value - 64; + + // loop_in / out adjust + var loopEnabled = engine.getValue(group, "loop_enabled"); + if (loopEnabled > 0) { + if (PioneerDDJFLX4.loopAdjustIn[channel]) { + newVal = newVal * PioneerDDJFLX4.loopAdjustMultiply + engine.getValue(group, "loop_start_position"); + engine.setValue(group, "loop_start_position", newVal); + return; + } + if (PioneerDDJFLX4.loopAdjustOut[channel]) { + newVal = newVal * PioneerDDJFLX4.loopAdjustMultiply + engine.getValue(group, "loop_end_position"); + engine.setValue(group, "loop_end_position", newVal); + return; + } + } + + if (engine.isScratching(deckNum)) { + engine.scratchTick(deckNum, newVal); + } else { // fallback + engine.setValue(group, "jog", newVal * this.bendScale); + } +}; + + +PioneerDDJFLX4.jogSearch = function(_channel, _control, value, _status, group) { + var newVal = (value - 64) * PioneerDDJFLX4.fastSeekScale; + engine.setValue(group, "jog", newVal); +}; + +PioneerDDJFLX4.jogTouch = function(channel, _control, value) { + var deckNum = channel + 1; + + // skip while adjusting the loop points + if (PioneerDDJFLX4.loopAdjustIn[channel] || PioneerDDJFLX4.loopAdjustOut[channel]) { + return; + } + + if (value !== 0 && this.vinylMode) { + engine.scratchEnable(deckNum, 720, 33+1/3, this.alpha, this.beta); + } else { + engine.scratchDisable(deckNum); + } +}; + +// +// Shift button +// + +PioneerDDJFLX4.shiftPressed = function(channel, _control, value, _status, _group) { + PioneerDDJFLX4.shiftButtonDown[channel] = value === 0x7F; +}; + + +// +// Tempo sliders +// +// The tempo option in Mixxx's deck preferences determine whether down/up +// increases/decreases the rate. Therefore it must be inverted here so that the +// UI and the control sliders always move in the same direction. +// + +PioneerDDJFLX4.tempoSliderMSB = function(channel, control, value, status, group) { + PioneerDDJFLX4.highResMSB[group].tempoSlider = value; +}; + +PioneerDDJFLX4.tempoSliderLSB = function(channel, control, value, status, group) { + var fullValue = (PioneerDDJFLX4.highResMSB[group].tempoSlider << 7) + value; + + engine.setValue( + group, + "rate", + 1 - (fullValue / 0x2000) + ); +}; + +// +// Beat Jump mode +// +// Note that when we increase/decrease the sizes on the pad buttons, we use the +// value of the first pad (0x21) as an upper/lower limit beyond which we don't +// allow further increasing/decreasing of all the values. +// + +PioneerDDJFLX4.beatjumpPadPressed = function(_channel, control, value, _status, group) { + if (value === 0) { + return; + } + engine.setValue(group, "beatjump_size", Math.abs(PioneerDDJFLX4.beatjumpSizeForPad[control])); + engine.setValue(group, "beatjump", PioneerDDJFLX4.beatjumpSizeForPad[control]); +}; + +PioneerDDJFLX4.increaseBeatjumpSizes = function(_channel, control, value, _status, group) { + if (value === 0 || PioneerDDJFLX4.beatjumpSizeForPad[0x21] * 16 > 16) { + return; + } + Object.keys(PioneerDDJFLX4.beatjumpSizeForPad).forEach(function(pad) { + PioneerDDJFLX4.beatjumpSizeForPad[pad] = PioneerDDJFLX4.beatjumpSizeForPad[pad] * 16; + }); + engine.setValue(group, "beatjump_size", PioneerDDJFLX4.beatjumpSizeForPad[0x21]); +}; + +PioneerDDJFLX4.decreaseBeatjumpSizes = function(_channel, control, value, _status, group) { + if (value === 0 || PioneerDDJFLX4.beatjumpSizeForPad[0x21] / 16 < 1/16) { + return; + } + Object.keys(PioneerDDJFLX4.beatjumpSizeForPad).forEach(function(pad) { + PioneerDDJFLX4.beatjumpSizeForPad[pad] = PioneerDDJFLX4.beatjumpSizeForPad[pad] / 16; + }); + engine.setValue(group, "beatjump_size", PioneerDDJFLX4.beatjumpSizeForPad[0x21]); +}; + +// +// Sampler mode +// + +PioneerDDJFLX4.samplerPlayOutputCallbackFunction = function(value, group, _control) { + if (value === 1) { + var curPad = group.match(script.samplerRegEx)[1]; + PioneerDDJFLX4.startSamplerBlink( + 0x97 + (curPad > 8 ? 2 : 0), + 0x30 + ((curPad > 8 ? curPad - 8 : curPad) - 1), + group); + } +}; + +PioneerDDJFLX4.padModeKeyPressed = function(_channel, _control, value, _status, group) { + var deck = ( _status == 0x90 ? PioneerDDJFLX4.lights.deck1 : PioneerDDJFLX4.lights.deck2 ); + + if ( _control == 0x1B ) + PioneerDDJFLX4.toggleLight(deck.hotcueMode, true); + else if ( _control == 0x69 ) + PioneerDDJFLX4.toggleLight(deck.keyboardMode, true); + else if ( _control == 0x1E ) + PioneerDDJFLX4.toggleLight(deck.padFX1Mode, true); + else if ( _control == 0x6B ) + PioneerDDJFLX4.toggleLight(deck.padFX2Mode, true); + else if ( _control == 0x20 ) + PioneerDDJFLX4.toggleLight(deck.beatJumpMode, true); + else if ( _control == 0x6D ) + PioneerDDJFLX4.toggleLight(deck.beatLoopMode, true); + else if ( _control == 0x22 ) + PioneerDDJFLX4.toggleLight(deck.samplerMode, true); + else if ( _control == 0x6F ) + PioneerDDJFLX4.toggleLight(deck.keyShiftMode, true); +}; + +PioneerDDJFLX4.samplerPadPressed = function(_channel, _control, value, _status, group) { + if (engine.getValue(group, "track_loaded")) { + engine.setValue(group, "cue_gotoandplay", value); + } else { + engine.setValue(group, "LoadSelectedTrack", value); + } +}; + +PioneerDDJFLX4.samplerPadShiftPressed = function(_channel, _control, value, _status, group) { + if (engine.getValue(group, "play")) { + engine.setValue(group, "cue_gotoandstop", value); + } else if (engine.getValue(group, "track_loaded")) { + engine.setValue(group, "eject", value); + } +}; + +PioneerDDJFLX4.startSamplerBlink = function(channel, control, group) { + var val = 0x7f; + + PioneerDDJFLX4.stopSamplerBlink(channel, control); + PioneerDDJFLX4.timers[channel][control] = engine.beginTimer(250, function() { + val = 0x7f - val; + + // blink the appropriate pad + midi.sendShortMsg(channel, control, val); + // also blink the pad while SHIFT is pressed + midi.sendShortMsg((channel+1), control, val); + + var isPlaying = engine.getValue(group, "play") === 1; + + if (!isPlaying) { + // kill timer + PioneerDDJFLX4.stopSamplerBlink(channel, control); + // set the pad LED to ON + midi.sendShortMsg(channel, control, 0x7f); + // set the pad LED to ON while SHIFT is pressed + midi.sendShortMsg((channel+1), control, 0x7f); + } + }); +}; + +PioneerDDJFLX4.stopSamplerBlink = function(channel, control) { + PioneerDDJFLX4.timers[channel] = PioneerDDJFLX4.timers[channel] || {}; + + if (PioneerDDJFLX4.timers[channel][control] !== undefined) { + engine.stopTimer(PioneerDDJFLX4.timers[channel][control]); + PioneerDDJFLX4.timers[channel][control] = undefined; + } +}; + +// +// Additional features +// + +PioneerDDJFLX4.toggleQuantize = function(_channel, _control, value, _status, group) { + if (value) { + script.toggleControl(group, "quantize"); + } +}; + +PioneerDDJFLX4.quickJumpForward = function(_channel, _control, value, _status, group) { + if (value) { + engine.setValue(group, "beatjump", PioneerDDJFLX4.quickJumpSize); + } +}; + +PioneerDDJFLX4.quickJumpBack = function(_channel, _control, value, _status, group) { + if (value) { + engine.setValue(group, "beatjump", -PioneerDDJFLX4.quickJumpSize); + } +}; + +// +// Shutdown +// + +PioneerDDJFLX4.shutdown = function() { + // reset vumeter + PioneerDDJFLX4.toggleLight(PioneerDDJFLX4.lights.deck1.vuMeter, false); + PioneerDDJFLX4.toggleLight(PioneerDDJFLX4.lights.deck2.vuMeter, false); + + // housekeeping + // turn off all Sampler LEDs + for (var i = 0; i <= 7; ++i) { + midi.sendShortMsg(0x97, 0x30 + i, 0x00); // Deck 1 pads + midi.sendShortMsg(0x98, 0x30 + i, 0x00); // Deck 1 pads with SHIFT + midi.sendShortMsg(0x99, 0x30 + i, 0x00); // Deck 2 pads + midi.sendShortMsg(0x9A, 0x30 + i, 0x00); // Deck 2 pads with SHIFT + } + // turn off all Hotcue LEDs + for (i = 0; i <= 7; ++i) { + midi.sendShortMsg(0x97, 0x00 + i, 0x00); // Deck 1 pads + midi.sendShortMsg(0x98, 0x00 + i, 0x00); // Deck 1 pads with SHIFT + midi.sendShortMsg(0x99, 0x00 + i, 0x00); // Deck 2 pads + midi.sendShortMsg(0x9A, 0x00 + i, 0x00); // Deck 2 pads with SHIFT + } + + // turn off loop in and out lights + PioneerDDJFLX4.setLoopButtonLights(0x90, 0x00); + PioneerDDJFLX4.setLoopButtonLights(0x91, 0x00); + + // turn off reloop lights + PioneerDDJFLX4.setReloopLight(0x90, 0x00); + PioneerDDJFLX4.setReloopLight(0x91, 0x00); + + // stop any flashing lights + PioneerDDJFLX4.toggleLight(PioneerDDJFLX4.lights.beatFx, false); + PioneerDDJFLX4.toggleLight(PioneerDDJFLX4.lights.shiftBeatFx, false); +}; diff --git a/res/controllers/Pioneer-DDJ-FLX4.midi.xml b/res/controllers/Pioneer-DDJ-FLX4.midi.xml new file mode 100644 index 00000000000..ae59d945977 --- /dev/null +++ b/res/controllers/Pioneer-DDJ-FLX4.midi.xml @@ -0,0 +1,3228 @@ + + + + Pioneer DDJ-FLX4 + Warker/nschloe/dj3730/jusko/Robert904 + Midi Mapping for the Pioneer DDJ-FLX4 (based on DDJ-400 mapping) + pioneer_ddj_FLX4 + https://mixxx.discourse.group/t/pioneer-ddj-flx4 + + + + + + + + + BROWSE - rotate - Scroll tracklist/tree view + [Library] + MoveVertical + 0xB6 + 0x40 + + + + + + BROWSE - press - Move cursor between track list and tree view + [Library] + MoveFocusForward + 0x96 + 0x41 + + + + + + BROWSE +SHIFT - press - Move cursor between track list and tree view + [Library] + MoveFocusBackward + 0x96 + 0x42 + + + + + + + LOAD (DECK1) - press - Load a Track into Deck 1 + [Channel1] + LoadSelectedTrack + 0x96 + 0x46 + + + + + + + LOAD (DECK2) - press - Load a Track into Deck 2 + [Channel2] + LoadSelectedTrack + 0x96 + 0x47 + + + + + + + + + Shift (DECK1) + [Channel1] + PioneerDDJFLX4.shiftPressed + 0x90 + 0x3F + + + + + + Shift (DECK2) + [Channel2] + PioneerDDJFLX4.shiftPressed + 0x91 + 0x3F + + + + + + + PLAY/PAUSE (DECK1) - press - Play/Pause + [Channel1] + play + 0x90 + 0x0B + + + + + + PLAY/PAUSE +SHIFT (DECK1) - press - Reverse playback in Slip Mode while held (Censor) + [Channel1] + reverseroll + 0x90 + 0x47 + + + + + + PLAY/PAUSE (DECK2) - press - Play/Pause + [Channel2] + play + 0x91 + 0x0B + + + + + + PLAY/PAUSE +SHIFT (DECK2) - press - Reverse playback in Slip Mode while held (Censor) + [Channel2] + reverseroll + 0x91 + 0x47 + + + + + + + CUE (DECK1) - press - Set/Call Cue, Back Cue + [Channel1] + cue_default + 0x90 + 0x0C + + + + + + CUE +SHIFT (DECK1) - press - Jump to track start + [Channel1] + start_play + 0x90 + 0x48 + + + + + + CUE (DECK2) - press - Set/Call Cue, Back Cue + [Channel2] + cue_default + 0x91 + 0x0C + + + + + + CUE +SHIFT (DECK2) - press - Jump to track start + [Channel2] + start_play + 0x91 + 0x48 + + + + + + + JOG DIAL PLATTER Vinyl mode On (DECK1) - rotate - Scratch + [Channel1] + PioneerDDJFLX4.jogTurn + 0xB0 + 0x22 + + + + + + JOG DIAL PLATTER Vinyl mode Off (DECK1) - rotate - Pitch bend + [Channel1] + PioneerDDJFLX4.jogTurn + 0xB0 + 0x23 + + + + + + JOG DIAL PLATTER +SHIFT (DECK1) - rotate - Search (Fast Pitch bend) + [Channel1] + PioneerDDJFLX4.jogSearch + 0xB0 + 0x29 + + + + + + JOG DIAL PLATTER (DECK1) - touch - enable (on touch) / disable (on release) Scratching/Pitch + bend + + [Channel1] + PioneerDDJFLX4.jogTouch + 0x90 + 0x36 + + + + + + JOG DIAL PLATTER +SHIFT (DECK1) - touch - enable (on touch) / disable (on release) highspeed + Pitch bend + + [Channel1] + PioneerDDJFLX4.jogTouch + 0x90 + 0x67 + + + + + + JOG DIAL SIDE (DECK1) - rotate - Pitch bend + [Channel1] + PioneerDDJFLX4.jogTurn + 0xB0 + 0x21 + + + + + + + JOG DIAL PLATTER Vinyl mode On (DECK2) - rotate - Scratch + [Channel2] + PioneerDDJFLX4.jogTurn + 0xB1 + 0x22 + + + + + + JOG DIAL PLATTER Vinyl mode Off (DECK2) - rotate - Pitch bend + [Channel2] + PioneerDDJFLX4.jogTurn + 0xB1 + 0x23 + + + + + + JOG DIAL PLATTER +SHIFT (DECK2) - rotate - Search (Fast Pitch bend) + [Channel2] + PioneerDDJFLX4.jogSearch + 0xB1 + 0x29 + + + + + + JOG DIAL PLATTER (DECK2) - touch - enable (on touch) / disable (on release) Scratching/Pitch + bend + + [Channel2] + PioneerDDJFLX4.jogTouch + 0x91 + 0x36 + + + + + + JOG DIAL PLATTER +SHIFT (DECK2) - touch - enable (on touch) / disable (on release) highspeed + Pitch bend + + [Channel2] + PioneerDDJFLX4.jogTouch + 0x91 + 0x67 + + + + + + JOG DIAL SIDE (DECK2) - rotate - Pitch bend + [Channel2] + PioneerDDJFLX4.jogTurn + 0xB1 + 0x21 + + + + + + + TEMPO (DECK1) - fader - Tempo control LSB + [Channel1] + PioneerDDJFLX4.tempoSliderLSB + 0xB0 + 0x20 + + + + + + TEMPO (DECK1) - fader - Tempo control MSB + [Channel1] + PioneerDDJFLX4.tempoSliderMSB + 0xB0 + 0x00 + + + + + + TEMPO (DECK2) - fader - Tempo control LSB + [Channel2] + PioneerDDJFLX4.tempoSliderLSB + 0xB1 + 0x20 + + + + + + TEMPO (DECK2) - fader - Tempo control MSB + [Channel2] + PioneerDDJFLX4.tempoSliderMSB + 0xB1 + 0x00 + + + + + + + BEAT SYNC (DECK1) - press - Beat Sync to Master deck + [Channel1] + PioneerDDJFLX4.syncPressed + 0x90 + 0x58 + + + + + + BEAT SYNC LONG PRESS (DECK1) - press - Set as Master deck + [Channel1] + PioneerDDJFLX4.syncLongPressed + 0x90 + 0x5C + + + + + + BEAT SYNC +SHIFT (DECK1) - press - change Tempo range + [Channel1] + PioneerDDJFLX4.cycleTempoRange + 0x90 + 0x60 + + + + + + + BEAT SYNC (DECK2) - press - Beat Sync to Master deck + [Channel2] + PioneerDDJFLX4.syncPressed + 0x91 + 0x58 + + + + + + BEAT SYNC LONG PRESS (DECK2) - press - Set as Master deck + [Channel2] + PioneerDDJFLX4.syncLongPressed + 0x91 + 0x5C + + + + + + BEAT SYNC +SHIFT (DECK2) - press - change Tempo range + [Channel2] + PioneerDDJFLX4.cycleTempoRange + 0x91 + 0x60 + + + + + + + LOOP IN/4 BEAT (DECK1) - press - Set loop in + [Channel1] + loop_in + 0x90 + 0x10 + + + + + + + LOOP IN/4 BEAT (DECK2) - press - Set loop in + [Channel2] + loop_in + 0x91 + 0x10 + + + + + + + LOOP OUT (DECK1) - press - Set loop out + [Channel1] + loop_out + 0x90 + 0x11 + + + + + + LOOP OUT (DECK2) - press - Set loop out + [Channel2] + loop_out + 0x91 + 0x11 + + + + + + + RELOOP/EXIT (DECK1) - press - (loop off) Reloop, (loop on) Loop exit + [Channel1] + reloop_toggle + 0x90 + 0x4D + + + + + + RELOOP/EXIT (DECK2) - press - (loop off) Reloop, (loop on) Loop exit + [Channel2] + reloop_toggle + 0x91 + 0x4D + + + + + + + RELOOP/EXIT +SHIFT (DECK1) - press - Reloop and stop + [Channel1] + reloop_andstop + 0x90 + 0x50 + + + + + + RELOOP/EXIT +SHIFT (DECK2) - press - Reloop and stop + [Channel2] + reloop_andstop + 0x91 + 0x50 + + + + + + + SHIFT + LOOP IN (DECK1) - Loop in adjust (using jog wheel) + [Channel1] + PioneerDDJFLX4.toggleLoopAdjustIn + 0x90 + 0x4C + + + + + + SHIFT + LOOP IN (DECK2) - Loop in adjust (using jog wheel) + [Channel2] + PioneerDDJFLX4.toggleLoopAdjustIn + 0x91 + 0x4C + + + + + + + SHIFT + LOOP OUT (DECK1) - Loop out adjust (using jog wheel) + [Channel1] + PioneerDDJFLX4.toggleLoopAdjustOut + 0x90 + 0x4E + + + + + + SHIFT + LOOP OUT (DECK2) - Loop out adjust (using jog wheel) + [Channel2] + PioneerDDJFLX4.toggleLoopAdjustOut + 0x91 + 0x4E + + + + + + + CUE/LOOP CALL LEFT (DECK1) - press - half active loop + [Channel1] + PioneerDDJFLX4.cueLoopCallLeft + 0x90 + 0x51 + + + + + + CUE/LOOP CALL LEFT + SHIFT (DECK1) - press - quick jump back + [Channel1] + PioneerDDJFLX4.quickJumpBack + 0x90 + 0x3E + + + + + + + CUE/LOOP CALL LEFT (DECK2) - press - half active loop + [Channel2] + PioneerDDJFLX4.cueLoopCallLeft + 0x91 + 0x51 + + + + + + CUE/LOOP CALL LEFT + SHIFT (DECK2) - press - quick jump back + [Channel2] + PioneerDDJFLX4.quickJumpBack + 0x91 + 0x3E + + + + + + + CUE/LOOP CALL LEFT (DECK1) - press - double active loop + [Channel1] + PioneerDDJFLX4.cueLoopCallRight + 0x90 + 0x53 + + + + + + CUE/LOOP CALL RIGHT + SHIFT (DECK1) - press - quick jump forwards + [Channel1] + PioneerDDJFLX4.quickJumpForward + 0x90 + 0x3D + + + + + + + CUE/LOOP CALL LEFT (DECK2) - press - double active loop + [Channel2] + PioneerDDJFLX4.cueLoopCallRight + 0x91 + 0x53 + + + + + + CUE/LOOP CALL RIGHT + SHIFT (DECK2) - press - quick jump forwards + [Channel2] + PioneerDDJFLX4.quickJumpForward + 0x91 + 0x3D + + + + + + + + + CROSSFADER - slider + [Master] + crossfader + 0xB6 + 0x1F + + + + + + CROSSFADER - slider + [Master] + crossfader + 0xB6 + 0x3F + + + + + + + CHANNELFADER - slider + [Channel1] + volume + 0xB0 + 0x33 + + + + + + CHANNELFADER - slider + [Channel1] + volume + 0xB0 + 0x13 + + + + + + CHANNELFADER - slider + [Channel2] + volume + 0xB1 + 0x33 + + + + + + CHANNELFADER - slider + [Channel2] + volume + 0xB1 + 0x13 + + + + + + + Shift + Left CUE - Toggle quantize on/off (Deck1) + [Channel1] + PioneerDDJFLX4.toggleQuantize + 0x90 + 0x68 + + + + + + Shift + Right CUE - Toggle quantize on/off (Deck2) + [Channel2] + PioneerDDJFLX4.toggleQuantize + 0x91 + 0x68 + + + + + + + TRIM - rotate + [Channel1] + pregain + 0xB0 + 0x24 + + + + + + TRIM - rotate + [Channel1] + pregain + 0xB0 + 0x04 + + + + + + TRIM - rotate + [Channel2] + pregain + 0xB1 + 0x24 + + + + + + TRIM - rotate + [Channel2] + pregain + 0xB1 + 0x04 + + + + + + + + EQ HI - rotate + [EqualizerRack1_[Channel1]_Effect1] + parameter3 + 0xB0 + 0x27 + + + + + + EQ MID - rotate + [EqualizerRack1_[Channel1]_Effect1] + parameter2 + 0xB0 + 0x2B + + + + + + EQ LOW - rotate + [EqualizerRack1_[Channel1]_Effect1] + parameter1 + 0xB0 + 0x2F + + + + + + EQ HI - rotate + [EqualizerRack1_[Channel1]_Effect1] + parameter3 + 0xB0 + 0x07 + + + + + + EQ MID - rotate + [EqualizerRack1_[Channel1]_Effect1] + parameter2 + 0xB0 + 0x0B + + + + + + EQ LOW - rotate + [EqualizerRack1_[Channel1]_Effect1] + parameter1 + 0xB0 + 0x0F + + + + + + + EQ HI - rotate + [EqualizerRack1_[Channel2]_Effect1] + parameter3 + 0xB1 + 0x27 + + + + + + EQ MID - rotate + [EqualizerRack1_[Channel2]_Effect1] + parameter2 + 0xB1 + 0x2B + + + + + + EQ LOW - rotate + [EqualizerRack1_[Channel2]_Effect1] + parameter1 + 0xB1 + 0x2F + + + + + + EQ HI - rotate + [EqualizerRack1_[Channel2]_Effect1] + parameter3 + 0xB1 + 0x07 + + + + + + EQ MID - rotate + [EqualizerRack1_[Channel2]_Effect1] + parameter2 + 0xB1 + 0x0B + + + + + + EQ LOW - rotate + [EqualizerRack1_[Channel2]_Effect1] + parameter1 + 0xB1 + 0x0F + + + + + + + CUE Channel - press - toggle Headphone Cue + [Channel1] + pfl + 0x90 + 0x54 + + + + + + CUE Channel - press - toggle Headphone Cue + [Channel2] + pfl + 0x91 + 0x54 + + + + + + + CUE Channel +SHIFT - press - Adjust BPM to match tapped BPM + [Channel1] + bpm_tap + 0x90 + 0x68 + + + + + + CUE Channel +SHIFT - press - Adjust BPM to match tapped BPM + [Channel2] + bpm_tap + 0x91 + 0x68 + + + + + + + HEADPHONES MIXING - rotate - Monitor Balance + [Master] + headMix + 0xB6 + 0x2C + + + + + + HEADPHONES MIXING - rotate - Monitor Balance + [Master] + headMix + 0xB6 + 0x0C + + + + + + + HEADPHONES LEVEL - rotate - Headphone gain + [Master] + headGain + 0xB6 + 0x2D + + + + + + HEADPHONES LEVEL - rotate - Headphone gain + [Master] + headGain + 0xB6 + 0x0D + + + + + + + + + FILTER CH1 - rotate - Filter Effect Knob + [QuickEffectRack1_[Channel1]] + super1 + 0xB6 + 0x17 + + + + + + FILTER CH1 - rotate - Filter Effect Knob + [QuickEffectRack1_[Channel1]] + super1 + 0xB6 + 0x37 + + + + + + FILTER CH2 - rotate - Filter Effect Knob + [QuickEffectRack1_[Channel2]] + super1 + 0xB6 + 0x18 + + + + + + FILTER CH2 - rotate - Filter Effect Knob + [QuickEffectRack1_[Channel2]] + super1 + 0xB6 + 0x38 + + + + + + + + + BEAT FX SELECT - press once - select effect unit 1 + [EffectRack1_EffectUnit1] + PioneerDDJFLX4.beatFxSelectPressed + 0x94 + 0x63 + + + + + + + BEAT LEFT - press - select effect unit 2 + [EffectRack1_EffectUnit1] + PioneerDDJFLX4.beatFxLeftPressed + 0x94 + 0x4A + + + + + + BEAT LEFT + shift - select previous effect for the current unit + [EffectRack1_EffectUnit1] + PioneerDDJFLX4.beatFxSelectPreviousEffect + 0x94 + 0x66 + + + + + + + BEAT RIGHT - press - select effect unit 3 + [EffectRack1_EffectUnit1] + PioneerDDJFLX4.beatFxRightPressed + 0x94 + 0x4B + + + + + + BEAT RIGHT + shift - select next effect for the current unit + [EffectRack1_EffectUnit1] + PioneerDDJFLX4.beatFxSelectNextEffect + 0x94 + 0x6B + + + + + + + + BEAT FX CH SELECT CH1 - slide - Select FX on DECK 1 + [EffectRack1_EffectUnit1] + PioneerDDJFLX4.beatFxChannel1 + 0x94 + 0x10 + + + + + + BEAT FX CH SELECT CH2 - slide - Select FX on DECK 2 + [EffectRack1_EffectUnit1] + PioneerDDJFLX4.beatFxChannel2 + 0x95 + 0x11 + + + + + + + BEAT FX LEVEL/DEPTH - rotate (MSB) - Adjust FX Level (mix) and BEAT FX Depth (meta) in the + selected slot + + [EffectRack1_EffectUnit1] + PioneerDDJFLX4.beatFxLevelDepthRotate + 0xB4 + 0x02 + + + + + + + BEAT FX ON/OFF - press - Toggle FX in the selected Slot + [EffectRack1_EffectUnit1] + PioneerDDJFLX4.beatFxOnOffPressed + 0x94 + 0x47 + + + + + + BEAT FX ON/OFF +SHIFT - press - Disable all enabled Beat FX Slots + [EffectRack1_EffectUnit1] + PioneerDDJFLX4.beatFxOnOffShiftPressed + 0x94 + 0x43 + + + + + + + + + + HOT CUE MODE (DECK1) - press - set hotcue mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x90 + 0x1B + + + + + + HOT CUE MODE (DECK2) - press - set hotcue mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x91 + 0x1B + + + + + + KEYBOARD MODE (DECK1) - press - set keyboard mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x90 + 0x69 + + + + + + KEYBOARD MODE (DECK2) - press - set keyboard mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x91 + 0x69 + + + + + + PAD FX1 MODE (DECK1) - press - set pad fx1 mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x90 + 0x1E + + + + + + PAD FX1 MODE (DECK2) - press - set pad fx1 mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x91 + 0x1E + + + + + + PAD FX2 MODE (DECK1) - press - set pad fx2 mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x90 + 0x6B + + + + + + PAD FX2 MODE (DECK2) - press - set pad fx2 mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x91 + 0x6B + + + + + + BEAT JUMP MODE (DECK1) - press - set beat jump mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x90 + 0x20 + + + + + + BEAT JUMP MODE (DECK2) - press - set beat jump mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x91 + 0x20 + + + + + + BEAT LOOP MODE (DECK1) - press - set beat loop mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x90 + 0x6D + + + + + + BEAT LOOP MODE (DECK2) - press - set beat loop mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x91 + 0x6D + + + + + + SAMPLER MODE (DECK1) - press - set sampler mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x90 + 0x22 + + + + + + SAMPLER MODE (DECK2) - press - set sampler mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x91 + 0x22 + + + + + + KEY SHIFT MODE (DECK1) - press - set key shift mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x90 + 0x6F + + + + + + KEY SHIFT MODE (DECK2) - press - set key shift mode + [PadMode] + PioneerDDJFLX4.padModeKeyPressed + 0x91 + 0x6F + + + + + + + + + PAD 1 (DECK1) HOT CUE MODE - press - set hotcue + [Channel1] + hotcue_1_activate + 0x97 + 0x00 + + + + + + PAD 1 +SHIFT (DECK1) HOT CUE MODE - press - delete hotcue + [Channel1] + hotcue_1_clear + 0x98 + 0x00 + + + + + + PAD 1 (DECK2) HOT CUE MODE - press - set hotcue + [Channel2] + hotcue_1_activate + 0x99 + 0x00 + + + + + + PAD 1 +SHIFT (DECK2) HOT CUE MODE - press - delete hotcue + [Channel2] + hotcue_1_clear + 0x9A + 0x00 + + + + + + PAD 2 (DECK1) HOT CUE MODE - press - set hotcue + [Channel1] + hotcue_2_activate + 0x97 + 0x01 + + + + + + PAD 2 +SHIFT (DECK1) HOT CUE MODE - press - delete hotcue + [Channel1] + hotcue_2_clear + 0x98 + 0x01 + + + + + + PAD 2 (DECK2) HOT CUE MODE - press - set hotcue + [Channel2] + hotcue_2_activate + 0x99 + 0x01 + + + + + + PAD 2 +SHIFT (DECK2) HOT CUE MODE - press - delete hotcue + [Channel2] + hotcue_2_clear + 0x9A + 0x01 + + + + + + PAD 3 (DECK1) HOT CUE MODE - press - set hotcue + [Channel1] + hotcue_3_activate + 0x97 + 0x02 + + + + + + PAD 3 +SHIFT (DECK1) HOT CUE MODE - press - delete hotcue + [Channel1] + hotcue_3_clear + 0x98 + 0x02 + + + + + + PAD 3 (DECK2) HOT CUE MODE - press - set hotcue + [Channel2] + hotcue_3_activate + 0x99 + 0x02 + + + + + + PAD 3 +SHIFT (DECK2) HOT CUE MODE - press - delete hotcue + [Channel2] + hotcue_3_clear + 0x9A + 0x02 + + + + + + PAD 4 (DECK1) HOT CUE MODE - press - set hotcue + [Channel1] + hotcue_4_activate + 0x97 + 0x03 + + + + + + PAD 4 +SHIFT (DECK1) HOT CUE MODE - press - delete hotcue + [Channel1] + hotcue_4_clear + 0x98 + 0x03 + + + + + + PAD 4 (DECK2) HOT CUE MODE - press - set hotcue + [Channel2] + hotcue_4_activate + 0x99 + 0x03 + + + + + + PAD 4 +SHIFT (DECK2) HOT CUE MODE - press - delete hotcue + [Channel2] + hotcue_4_clear + 0x9A + 0x03 + + + + + + PAD 5(DECK1) HOT CUE MODE - press - set hotcue + [Channel1] + hotcue_5_activate + 0x97 + 0x04 + + + + + + PAD 5 +SHIFT (DECK1) HOT CUE MODE - press - delete hotcue + [Channel1] + hotcue_5_clear + 0x98 + 0x04 + + + + + + PAD 5 (DECK2) HOT CUE MODE - press - set hotcue + [Channel2] + hotcue_5_activate + 0x99 + 0x04 + + + + + + PAD 5 +SHIFT (DECK2) HOT CUE MODE - press - delete hotcue + [Channel2] + hotcue_5_clear + 0x9A + 0x04 + + + + + + PAD 6 (DECK1) HOT CUE MODE - press - set hotcue + [Channel1] + hotcue_6_activate + 0x97 + 0x05 + + + + + + PAD 6 +SHIFT (DECK1) HOT CUE MODE - press - delete hotcue + [Channel1] + hotcue_6_clear + 0x98 + 0x05 + + + + + + PAD 6 (DECK2) HOT CUE MODE - press - set hotcue + [Channel2] + hotcue_6_activate + 0x99 + 0x05 + + + + + + PAD 6 +SHIFT (DECK2) HOT CUE MODE - press - delete hotcue + [Channel2] + hotcue_6_clear + 0x9A + 0x05 + + + + + + PAD 7 (DECK1) HOT CUE MODE - press - set hotcue + [Channel1] + hotcue_7_activate + 0x97 + 0x06 + + + + + + PAD 7 +SHIFT (DECK1) HOT CUE MODE - press - delete hotcue + [Channel1] + hotcue_7_clear + 0x98 + 0x06 + + + + + + PAD 7 (DECK2) HOT CUE MODE - press - set hotcue + [Channel2] + hotcue_7_activate + 0x99 + 0x06 + + + + + + PAD 7 +SHIFT (DECK2) HOT CUE MODE - press - delete hotcue + [Channel2] + hotcue_7_clear + 0x9A + 0x06 + + + + + + PAD 8 (DECK1) HOT CUE MODE - press - set hotcue + [Channel1] + hotcue_8_activate + 0x97 + 0x07 + + + + + + PAD 8 +SHIFT (DECK1) HOT CUE MODE - press - delete hotcue + [Channel1] + hotcue_8_clear + 0x98 + 0x07 + + + + + + PAD 8 (DECK2) HOT CUE MODE - press - set hotcue + [Channel2] + hotcue_8_activate + 0x99 + 0x07 + + + + + + PAD 8 +SHIFT (DECK2) HOT CUE MODE - press - delete hotcue + [Channel2] + hotcue_8_clear + 0x9A + 0x07 + + + + + + + + + + PAD 1 (DECK1) BEAT LOOP MODE - press - 1/4 Beatloop + [Channel1] + beatloop_0.25_toggle + 0x97 + 0x60 + + + + + + PAD 1 (DECK2) BEAT LOOP MODE - press - 1/4 Beatloop + [Channel2] + beatloop_0.25_toggle + 0x99 + 0x60 + + + + + + PAD 2 (DECK1) BEAT LOOP MODE - press - 1/2 Beatloop + [Channel1] + beatloop_0.5_toggle + 0x97 + 0x61 + + + + + + PAD 2 (DECK2) BEAT LOOP MODE - press - 1/2 Beatloop + [Channel2] + beatloop_0.5_toggle + 0x99 + 0x61 + + + + + + PAD 3 (DECK1) BEAT LOOP MODE - press - 1/1 Beatloop + [Channel1] + beatloop_1_toggle + 0x97 + 0x62 + + + + + + PAD 3 (DECK2) BEAT LOOP MODE - press - 1/1 Beatloop + [Channel2] + beatloop_1_toggle + 0x99 + 0x62 + + + + + + PAD 4 (DECK1) BEAT LOOP MODE - press - 2 Beatloop + [Channel1] + beatloop_2_toggle + 0x97 + 0x63 + + + + + + PAD 4 (DECK2) BEAT LOOP MODE - press - 2 Beatloop + [Channel2] + beatloop_2_toggle + 0x99 + 0x63 + + + + + + PAD 5 (DECK1) BEAT LOOP MODE - press - 4 Beatloop + [Channel1] + beatloop_4_toggle + 0x97 + 0x64 + + + + + + PAD 5 (DECK2) BEAT LOOP MODE - press - 4 Beatloop + [Channel2] + beatloop_4_toggle + 0x99 + 0x64 + + + + + + PAD 6 (DECK1) BEAT LOOP MODE - press - 8 Beatloop + [Channel1] + beatloop_8_toggle + 0x97 + 0x65 + + + + + + PAD 6 (DECK2) BEAT LOOP MODE - press - 8 Beatloop + [Channel2] + beatloop_8_toggle + 0x99 + 0x65 + + + + + + PAD 7 (DECK1) BEAT LOOP MODE - press - 16 Beatloop + [Channel1] + beatloop_16_toggle + 0x97 + 0x66 + + + + + + PAD 7 (DECK2) BEAT LOOP MODE - press - 16 Beatloop + [Channel2] + beatloop_16_toggle + 0x99 + 0x66 + + + + + + PAD 8 (DECK1) BEAT LOOP MODE - press - 32 Beatloop + [Channel1] + beatloop_32_toggle + 0x97 + 0x67 + + + + + + PAD 8 (DECK2) BEAT LOOP MODE - press - 32 Beatloop + [Channel2] + beatloop_32_toggle + 0x99 + 0x67 + + + + + + + + + PAD 1 (DECK1) BEAT JUMP MODE - press - Jump 1 Beat backwards + [Channel1] + PioneerDDJFLX4.beatjumpPadPressed + 0x97 + 0x20 + + + + + + PAD 1 (DECK2) BEAT JUMP MODE - press - Jump 1 Beat backwards + [Channel2] + PioneerDDJFLX4.beatjumpPadPressed + 0x99 + 0x20 + + + + + + PAD 2 (DECK1) BEAT JUMP MODE - press - Jump 1 Beat forwards + [Channel1] + PioneerDDJFLX4.beatjumpPadPressed + 0x97 + 0x21 + + + + + + PAD 2 (DECK2) BEAT JUMP MODE - press - Jump 1 Beat forwards + [Channel2] + PioneerDDJFLX4.beatjumpPadPressed + 0x99 + 0x21 + + + + + + PAD 3 (DECK1) BEAT JUMP MODE - press - Jump 2 Beats backwards + [Channel1] + PioneerDDJFLX4.beatjumpPadPressed + 0x97 + 0x22 + + + + + + PAD 3 (DECK2) BEAT JUMP MODE - press - Jump 2 Beats backwards + [Channel2] + PioneerDDJFLX4.beatjumpPadPressed + 0x99 + 0x22 + + + + + + PAD 4 (DECK1) BEAT JUMP MODE - press - Jump 2 Beats forwards + [Channel1] + PioneerDDJFLX4.beatjumpPadPressed + 0x97 + 0x23 + + + + + + PAD 4 (DECK2) BEAT JUMP MODE - press - Jump 2 Beats forwards + [Channel2] + PioneerDDJFLX4.beatjumpPadPressed + 0x99 + 0x23 + + + + + + PAD 5 (DECK1) BEAT JUMP MODE - press - Jump 4 Beats backwards + [Channel1] + PioneerDDJFLX4.beatjumpPadPressed + 0x97 + 0x24 + + + + + + PAD 5 (DECK2) BEAT JUMP MODE - press - Jump 4 Beats backwards + [Channel2] + PioneerDDJFLX4.beatjumpPadPressed + 0x99 + 0x24 + + + + + + PAD 6 (DECK1) BEAT JUMP MODE - press - Jump 4 Beats forwards + [Channel1] + PioneerDDJFLX4.beatjumpPadPressed + 0x97 + 0x25 + + + + + + PAD 6 (DECK2) BEAT JUMP MODE - press - Jump 4 Beats forwards + [Channel2] + PioneerDDJFLX4.beatjumpPadPressed + 0x99 + 0x25 + + + + + + PAD 7 (DECK1) BEAT JUMP MODE - press - Jump 8 Beats backwards + [Channel1] + PioneerDDJFLX4.beatjumpPadPressed + 0x97 + 0x26 + + + + + + PAD 7 (DECK2) BEAT JUMP MODE - press - Jump 8 Beats backwards + [Channel2] + PioneerDDJFLX4.beatjumpPadPressed + 0x99 + 0x26 + + + + + + PAD 8 (DECK1) BEAT JUMP MODE - press - Jump 8 Beats forwards + [Channel1] + PioneerDDJFLX4.beatjumpPadPressed + 0x97 + 0x27 + + + + + + PAD 8 (DECK2) BEAT JUMP MODE - press - Jump 8 Beats forwards + [Channel2] + PioneerDDJFLX4.beatjumpPadPressed + 0x99 + 0x27 + + + + + + + PAD 7 (DECK1) +SHift BEAT JUMP MODE - press - decrease Beatjump by a factor of 16 + [Channel1] + PioneerDDJFLX4.decreaseBeatjumpSizes + 0x98 + 0x26 + + + + + + PAD 7 (DECK2) +Shift BEAT JUMP MODE - press - decrease Beatjump by a factor of 16 + [Channel2] + PioneerDDJFLX4.decreaseBeatjumpSizes + 0x9A + 0x26 + + + + + + PAD 8 (DECK1) +SHift BEAT JUMP MODE - press - increase Beatjump by a factor of 16 + [Channel1] + PioneerDDJFLX4.increaseBeatjumpSizes + 0x98 + 0x27 + + + + + + PAD 8 (DECK2) +Shift BEAT JUMP MODE - press - increase Beatjump by a factor of 16 + [Channel2] + PioneerDDJFLX4.increaseBeatjumpSizes + 0x9A + 0x27 + + + + + + + + + PAD 1 (LEFT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler1] + PioneerDDJFLX4.samplerPadPressed + 0x97 + 0x30 + + + + + + PAD 1 (LEFT)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler1] + PioneerDDJFLX4.samplerPadShiftPressed + 0x98 + 0x30 + + + + + + PAD 2 (LEFT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler2] + PioneerDDJFLX4.samplerPadPressed + 0x97 + 0x31 + + + + + + PAD 2 (LEFT)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler2] + PioneerDDJFLX4.samplerPadShiftPressed + 0x98 + 0x31 + + + + + + PAD 3 (LEFT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler3] + PioneerDDJFLX4.samplerPadPressed + 0x97 + 0x32 + + + + + + PAD 3 (LEFT)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler3] + PioneerDDJFLX4.samplerPadShiftPressed + 0x98 + 0x32 + + + + + + PAD 4 (LEFT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler4] + PioneerDDJFLX4.samplerPadPressed + 0x97 + 0x33 + + + + + + PAD 4 (LEFT)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler4] + PioneerDDJFLX4.samplerPadShiftPressed + 0x98 + 0x33 + + + + + + PAD 5 (LEFT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler5] + PioneerDDJFLX4.samplerPadPressed + 0x97 + 0x34 + + + + + + PAD 5 (LEFT)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler5] + PioneerDDJFLX4.samplerPadShiftPressed + 0x98 + 0x34 + + + + + + PAD 6 (LEFT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler6] + PioneerDDJFLX4.samplerPadPressed + 0x97 + 0x35 + + + + + + PAD 6 (LEFT)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler6] + PioneerDDJFLX4.samplerPadShiftPressed + 0x98 + 0x35 + + + + + + PAD 7 (LEFT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler7] + PioneerDDJFLX4.samplerPadPressed + 0x97 + 0x36 + + + + + + PAD 7 (LEFT)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler7] + PioneerDDJFLX4.samplerPadShiftPressed + 0x98 + 0x36 + + + + + + PAD 8 (LEFT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler8] + PioneerDDJFLX4.samplerPadPressed + 0x97 + 0x37 + + + + + + PAD 8 (LEFT)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler8] + PioneerDDJFLX4.samplerPadShiftPressed + 0x98 + 0x37 + + + + + + + + PAD 1 (RIGHT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler9] + PioneerDDJFLX4.samplerPadPressed + 0x99 + 0x30 + + + + + + PAD 1 (Right)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler9] + PioneerDDJFLX4.samplerPadShiftPressed + 0x9A + 0x30 + + + + + + PAD 2 (RIGHT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler10] + PioneerDDJFLX4.samplerPadPressed + 0x99 + 0x31 + + + + + + PAD 2 (Right)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler10] + PioneerDDJFLX4.samplerPadShiftPressed + 0x9A + 0x31 + + + + + + PAD 3 (RIGHT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler11] + PioneerDDJFLX4.samplerPadPressed + 0x99 + 0x32 + + + + + + PAD 3 (Right)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler11] + PioneerDDJFLX4.samplerPadShiftPressed + 0x9A + 0x32 + + + + + + PAD 4 (RIGHT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler12] + PioneerDDJFLX4.samplerPadPressed + 0x99 + 0x33 + + + + + + PAD 4 (Right)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler12] + PioneerDDJFLX4.samplerPadShiftPressed + 0x9A + 0x33 + + + + + + PAD 5 (RIGHT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler13] + PioneerDDJFLX4.samplerPadPressed + 0x99 + 0x34 + + + + + + PAD 5 (Right)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler13] + PioneerDDJFLX4.samplerPadShiftPressed + 0x9A + 0x34 + + + + + + PAD 6 (RIGHT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler14] + PioneerDDJFLX4.samplerPadPressed + 0x99 + 0x35 + + + + + + PAD 6 (Right)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler14] + PioneerDDJFLX4.samplerPadShiftPressed + 0x9A + 0x35 + + + + + + PAD 7 (RIGHT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler15] + PioneerDDJFLX4.samplerPadPressed + 0x99 + 0x36 + + + + + + PAD 7 (Right)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler15] + PioneerDDJFLX4.samplerPadShiftPressed + 0x9A + 0x36 + + + + + + PAD 8 (RIGHT) SAMPLE MODE - press - Play Sample or Load Track + [Sampler16] + PioneerDDJFLX4.samplerPadPressed + 0x99 + 0x37 + + + + + + PAD 8 (Right)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track + [Sampler16] + PioneerDDJFLX4.samplerPadShiftPressed + 0x9A + 0x37 + + + + + + + + + + + + [Channel1] + play_indicator + 0x90 + 0x0B + 0x7F + 0.5 + + + [Channel2] + play_indicator + 0x91 + 0x0B + 0x7F + 0.5 + + + [Channel1] + play_indicator + 0x90 + 0x47 + 0x7F + 0.5 + + + [Channel2] + play_indicator + 0x91 + 0x47 + 0x7F + 0.5 + + + + + [Channel1] + cue_indicator + 0x90 + 0x0C + 0x7F + 0.5 + + + [Channel2] + cue_indicator + 0x91 + 0x0C + 0x7F + 0.5 + + + + + [Channel1] + cue_indicator + 0x90 + 0x47 + 0x7F + 0.5 + + + [Channel2] + cue_indicator + 0x91 + 0x47 + 0x7F + 0.5 + + + + + [Channel1] + sync_enabled + 0x90 + 0x58 + 0x7F + 0.5 + + + [Channel2] + sync_enabled + 0x91 + 0x58 + 0x7F + 0.5 + + + + + [Channel1] + pfl + 0x90 + 0x54 + 0x7F + 0.5 + + + [Channel2] + pfl + 0x91 + 0x54 + 0x7F + 0.5 + + + + + [Channel1] + hotcue_1_enabled + 0x97 + 0x00 + 0x7F + 0.5 + + + [Channel2] + hotcue_1_enabled + 0x99 + 0x00 + 0x7F + 0.5 + + + [Channel1] + hotcue_2_enabled + 0x97 + 0x01 + 0x7F + 0.5 + + + [Channel2] + hotcue_2_enabled + 0x99 + 0x01 + 0x7F + 0.5 + + + [Channel1] + hotcue_3_enabled + 0x97 + 0x02 + 0x7F + 0.5 + + + [Channel2] + hotcue_3_enabled + 0x99 + 0x02 + 0x7F + 0.5 + + + [Channel1] + hotcue_4_enabled + 0x97 + 0x03 + 0x7F + 0.5 + + + [Channel2] + hotcue_4_enabled + 0x99 + 0x03 + 0x7F + 0.5 + + + [Channel1] + hotcue_5_enabled + 0x97 + 0x04 + 0x7F + 0.5 + + + [Channel2] + hotcue_5_enabled + 0x99 + 0x04 + 0x7F + 0.5 + + + [Channel1] + hotcue_6_enabled + 0x97 + 0x05 + 0x7F + 0.5 + + + [Channel2] + hotcue_6_enabled + 0x99 + 0x05 + 0x7F + 0.5 + + + [Channel1] + hotcue_7_enabled + 0x97 + 0x06 + 0x7F + 0.5 + + + [Channel2] + hotcue_7_enabled + 0x99 + 0x06 + 0x7F + 0.5 + + + [Channel1] + hotcue_8_enabled + 0x97 + 0x07 + 0x7F + 0.5 + + + [Channel2] + hotcue_8_enabled + 0x99 + 0x07 + 0x7F + 0.5 + + + + + [Channel1] + hotcue_1_enabled + 0x98 + 0x00 + 0x7F + 0.5 + + + [Channel2] + hotcue_1_enabled + 0x9A + 0x00 + 0x7F + 0.5 + + + [Channel1] + hotcue_2_enabled + 0x98 + 0x01 + 0x7F + 0.5 + + + [Channel2] + hotcue_2_enabled + 0x9A + 0x01 + 0x7F + 0.5 + + + [Channel1] + hotcue_3_enabled + 0x98 + 0x02 + 0x7F + 0.5 + + + [Channel2] + hotcue_3_enabled + 0x9A + 0x02 + 0x7F + 0.5 + + + [Channel1] + hotcue_4_enabled + 0x98 + 0x03 + 0x7F + 0.5 + + + [Channel2] + hotcue_4_enabled + 0x9A + 0x03 + 0x7F + 0.5 + + + [Channel1] + hotcue_5_enabled + 0x98 + 0x04 + 0x7F + 0.5 + + + [Channel2] + hotcue_5_enabled + 0x9A + 0x04 + 0x7F + 0.5 + + + [Channel1] + hotcue_6_enabled + 0x98 + 0x05 + 0x7F + 0.5 + + + [Channel2] + hotcue_6_enabled + 0x9A + 0x05 + 0x7F + 0.5 + + + [Channel1] + hotcue_7_enabled + 0x98 + 0x06 + 0x7F + 0.5 + + + [Channel2] + hotcue_7_enabled + 0x9A + 0x06 + 0x7F + 0.5 + + + [Channel1] + hotcue_8_enabled + 0x98 + 0x07 + 0x7F + 0.5 + + + [Channel2] + hotcue_8_enabled + 0x9A + 0x07 + 0x7F + 0.5 + + + + + [Channel1] + beatloop_0.25_enabled + 0x97 + 0x60 + 0x7F + 0.5 + + + [Channel2] + beatloop_0.25_enabled + 0x99 + 0x60 + 0x7F + 0.5 + + + [Channel1] + beatloop_0.5_enabled + 0x97 + 0x61 + 0x7F + 0.5 + + + [Channel2] + beatloop_0.5_enabled + 0x99 + 0x61 + 0x7F + 0.5 + + + [Channel1] + beatloop_1_enabled + 0x97 + 0x62 + 0x7F + 0.5 + + + [Channel2] + beatloop_1_enabled + 0x99 + 0x62 + 0x7F + 0.5 + + + [Channel1] + beatloop_2_enabled + 0x97 + 0x63 + 0x7F + 0.5 + + + [Channel2] + beatloop_2_enabled + 0x99 + 0x63 + 0x7F + 0.5 + + + [Channel1] + beatloop_4_enabled + 0x97 + 0x64 + 0x7F + 0.5 + + + [Channel2] + beatloop_4_enabled + 0x99 + 0x64 + 0x7F + 0.5 + + + [Channel1] + beatloop_8_enabled + 0x97 + 0x65 + 0x7F + 0.5 + + + [Channel2] + beatloop_8_enabled + 0x99 + 0x65 + 0x7F + 0.5 + + + [Channel1] + beatloop_16_enabled + 0x97 + 0x66 + 0x7F + 0.5 + + + [Channel2] + beatloop_16_enabled + 0x99 + 0x66 + 0x7F + 0.5 + + + [Channel1] + beatloop_32_enabled + 0x97 + 0x67 + 0x7F + 0.5 + + + [Channel2] + beatloop_32_enabled + 0x99 + 0x67 + 0x7F + 0.5 + + + + + [Channel1] + beatloop_0.25_enabled + 0x98 + 0x60 + 0x7F + 0.5 + + + [Channel2] + beatloop_0.25_enabled + 0x9A + 0x60 + 0x7F + 0.5 + + + [Channel1] + beatloop_0.5_enabled + 0x98 + 0x61 + 0x7F + 0.5 + + + [Channel2] + beatloop_0.5_enabled + 0x9A + 0x61 + 0x7F + 0.5 + + + [Channel1] + beatloop_1_enabled + 0x98 + 0x62 + 0x7F + 0.5 + + + [Channel2] + beatloop_1_enabled + 0x9A + 0x62 + 0x7F + 0.5 + + + [Channel1] + beatloop_2_enabled + 0x98 + 0x63 + 0x7F + 0.5 + + + [Channel2] + beatloop_2_enabled + 0x9A + 0x63 + 0x7F + 0.5 + + + [Channel1] + beatloop_4_enabled + 0x98 + 0x64 + 0x7F + 0.5 + + + [Channel2] + beatloop_4_enabled + 0x9A + 0x64 + 0x7F + 0.5 + + + [Channel1] + beatloop_8_enabled + 0x98 + 0x65 + 0x7F + 0.5 + + + [Channel2] + beatloop_8_enabled + 0x9A + 0x65 + 0x7F + 0.5 + + + [Channel1] + beatloop_16_enabled + 0x98 + 0x66 + 0x7F + 0.5 + + + [Channel2] + beatloop_16_enabled + 0x9A + 0x66 + 0x7F + 0.5 + + + [Channel1] + beatloop_32_enabled + 0x98 + 0x67 + 0x7F + 0.5 + + + [Channel2] + beatloop_32_enabled + 0x9A + 0x67 + 0x7F + 0.5 + + + + + [Channel1] + track_loaded + 0x98 + 0x26 + 0x7F + 0.5 + + + [Channel1] + track_loaded + 0x98 + 0x27 + 0x7F + 0.5 + + + [Channel2] + track_loaded + 0x9A + 0x26 + 0x7F + 0.5 + + + [Channel2] + track_loaded + 0x9A + 0x27 + 0x7F + 0.5 + + + + + + [Sampler1] + track_loaded + 0x97 + 0x30 + 0x7F + 0.5 + + + [Sampler2] + track_loaded + 0x97 + 0x31 + 0x7F + 0.5 + + + [Sampler3] + track_loaded + 0x97 + 0x32 + 0x7F + 0.5 + + + [Sampler4] + track_loaded + 0x97 + 0x33 + 0x7F + 0.5 + + + [Sampler5] + track_loaded + 0x97 + 0x34 + 0x7F + 0.5 + + + [Sampler6] + track_loaded + 0x97 + 0x35 + 0x7F + 0.5 + + + [Sampler7] + track_loaded + 0x97 + 0x36 + 0x7F + 0.5 + + + [Sampler8] + track_loaded + 0x97 + 0x37 + 0x7F + 0.5 + + + + + [Sampler9] + track_loaded + 0x99 + 0x30 + 0x7F + 0.5 + + + [Sampler10] + track_loaded + 0x99 + 0x31 + 0x7F + 0.5 + + + [Sampler11] + track_loaded + 0x99 + 0x32 + 0x7F + 0.5 + + + [Sampler12] + track_loaded + 0x99 + 0x33 + 0x7F + 0.5 + + + [Sampler13] + track_loaded + 0x99 + 0x34 + 0x7F + 0.5 + + + [Sampler14] + track_loaded + 0x99 + 0x35 + 0x7F + 0.5 + + + [Sampler15] + track_loaded + 0x99 + 0x36 + 0x7F + 0.5 + + + [Sampler16] + track_loaded + 0x99 + 0x37 + 0x7F + 0.5 + + + + + + + [Sampler1] + track_loaded + 0x98 + 0x30 + 0x7F + 0.5 + + + [Sampler2] + track_loaded + 0x98 + 0x31 + 0x7F + 0.5 + + + [Sampler3] + track_loaded + 0x98 + 0x32 + 0x7F + 0.5 + + + [Sampler4] + track_loaded + 0x98 + 0x33 + 0x7F + 0.5 + + + [Sampler5] + track_loaded + 0x98 + 0x34 + 0x7F + 0.5 + + + [Sampler6] + track_loaded + 0x98 + 0x35 + 0x7F + 0.5 + + + [Sampler7] + track_loaded + 0x98 + 0x36 + 0x7F + 0.5 + + + [Sampler8] + track_loaded + 0x98 + 0x37 + 0x7F + 0.5 + + + + + + + [Sampler9] + track_loaded + 0x9A + 0x30 + 0x7F + 0.5 + + + [Sampler10] + track_loaded + 0x9A + 0x31 + 0x7F + 0.5 + + + [Sampler11] + track_loaded + 0x9A + 0x32 + 0x7F + 0.5 + + + [Sampler12] + track_loaded + 0x9A + 0x33 + 0x7F + 0.5 + + + [Sampler13] + track_loaded + 0x9A + 0x34 + 0x7F + 0.5 + + + [Sampler14] + track_loaded + 0x9A + 0x35 + 0x7F + 0.5 + + + [Sampler15] + track_loaded + 0x9A + 0x36 + 0x7F + 0.5 + + + [Sampler16] + track_loaded + 0x9A + 0x37 + 0x7F + 0.5 + + + + + From 36b0e3017d21d4400f09b26c9c1d5fb038c3719c Mon Sep 17 00:00:00 2001 From: Robert Hendrickx Date: Sat, 4 Feb 2023 09:41:05 +0100 Subject: [PATCH 02/14] Pioneer DDJ-FLX4: Applied coding style pre-commit patch --- res/controllers/Pioneer-DDJ-FLX4-script.js | 37 ++++++---------------- res/controllers/Pioneer-DDJ-FLX4.midi.xml | 2 +- 2 files changed, 11 insertions(+), 28 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-FLX4-script.js b/res/controllers/Pioneer-DDJ-FLX4-script.js index a6c9fbd1ce1..d43ff4f3bd3 100644 --- a/res/controllers/Pioneer-DDJ-FLX4-script.js +++ b/res/controllers/Pioneer-DDJ-FLX4-script.js @@ -360,19 +360,17 @@ PioneerDDJFLX4.beatFxOnOffShiftPressed = function(_channel, _control, value) { PioneerDDJFLX4.beatFxChannel1 = function(_channel, control, value, _status, group) { var enableChannel = 0; - - if ( value === 0x7f ) - enableChannel = 1; - + + if (value === 0x7f) { enableChannel = 1; } + engine.setValue(group, "group_[Channel1]_enable", enableChannel); }; PioneerDDJFLX4.beatFxChannel2 = function(_channel, control, value, _status, group) { var enableChannel = 0; - - if ( value === 0x7f ) - enableChannel = 1; - + + if (value === 0x7f) { enableChannel = 1; } + engine.setValue(group, "group_[Channel2]_enable", enableChannel); }; @@ -501,7 +499,7 @@ PioneerDDJFLX4.syncLongPressed = function(channel, control, value, status, group }; PioneerDDJFLX4.cycleTempoRange = function(_channel, _control, value, _status, group) { - if (value === 0) return; // ignore release + if (value === 0) { return; } // ignore release var currRange = engine.getValue(group, "rateRange"); var idx = 0; @@ -649,24 +647,9 @@ PioneerDDJFLX4.samplerPlayOutputCallbackFunction = function(value, group, _contr }; PioneerDDJFLX4.padModeKeyPressed = function(_channel, _control, value, _status, group) { - var deck = ( _status == 0x90 ? PioneerDDJFLX4.lights.deck1 : PioneerDDJFLX4.lights.deck2 ); - - if ( _control == 0x1B ) - PioneerDDJFLX4.toggleLight(deck.hotcueMode, true); - else if ( _control == 0x69 ) - PioneerDDJFLX4.toggleLight(deck.keyboardMode, true); - else if ( _control == 0x1E ) - PioneerDDJFLX4.toggleLight(deck.padFX1Mode, true); - else if ( _control == 0x6B ) - PioneerDDJFLX4.toggleLight(deck.padFX2Mode, true); - else if ( _control == 0x20 ) - PioneerDDJFLX4.toggleLight(deck.beatJumpMode, true); - else if ( _control == 0x6D ) - PioneerDDJFLX4.toggleLight(deck.beatLoopMode, true); - else if ( _control == 0x22 ) - PioneerDDJFLX4.toggleLight(deck.samplerMode, true); - else if ( _control == 0x6F ) - PioneerDDJFLX4.toggleLight(deck.keyShiftMode, true); + var deck = (_status == 0x90 ? PioneerDDJFLX4.lights.deck1 : PioneerDDJFLX4.lights.deck2); + + if (_control == 0x1B) { PioneerDDJFLX4.toggleLight(deck.hotcueMode, true); } else if (_control == 0x69) { PioneerDDJFLX4.toggleLight(deck.keyboardMode, true); } else if (_control == 0x1E) { PioneerDDJFLX4.toggleLight(deck.padFX1Mode, true); } else if (_control == 0x6B) { PioneerDDJFLX4.toggleLight(deck.padFX2Mode, true); } else if (_control == 0x20) { PioneerDDJFLX4.toggleLight(deck.beatJumpMode, true); } else if (_control == 0x6D) { PioneerDDJFLX4.toggleLight(deck.beatLoopMode, true); } else if (_control == 0x22) { PioneerDDJFLX4.toggleLight(deck.samplerMode, true); } else if (_control == 0x6F) { PioneerDDJFLX4.toggleLight(deck.keyShiftMode, true); } }; PioneerDDJFLX4.samplerPadPressed = function(_channel, _control, value, _status, group) { diff --git a/res/controllers/Pioneer-DDJ-FLX4.midi.xml b/res/controllers/Pioneer-DDJ-FLX4.midi.xml index ae59d945977..732a43d1a5c 100644 --- a/res/controllers/Pioneer-DDJ-FLX4.midi.xml +++ b/res/controllers/Pioneer-DDJ-FLX4.midi.xml @@ -1107,7 +1107,7 @@ - + HOT CUE MODE (DECK1) - press - set hotcue mode From 32da41a475973278770e4fe0ac3a0f8b5a198ceb Mon Sep 17 00:00:00 2001 From: Robert Hendrickx Date: Sat, 4 Feb 2023 11:10:09 +0100 Subject: [PATCH 03/14] Pioneer DDJ-FLX4: coding style correction --- res/controllers/Pioneer-DDJ-FLX4-script.js | 24 ++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-FLX4-script.js b/res/controllers/Pioneer-DDJ-FLX4-script.js index d43ff4f3bd3..6a853d2cb35 100644 --- a/res/controllers/Pioneer-DDJ-FLX4-script.js +++ b/res/controllers/Pioneer-DDJ-FLX4-script.js @@ -646,10 +646,26 @@ PioneerDDJFLX4.samplerPlayOutputCallbackFunction = function(value, group, _contr } }; -PioneerDDJFLX4.padModeKeyPressed = function(_channel, _control, value, _status, group) { - var deck = (_status == 0x90 ? PioneerDDJFLX4.lights.deck1 : PioneerDDJFLX4.lights.deck2); - - if (_control == 0x1B) { PioneerDDJFLX4.toggleLight(deck.hotcueMode, true); } else if (_control == 0x69) { PioneerDDJFLX4.toggleLight(deck.keyboardMode, true); } else if (_control == 0x1E) { PioneerDDJFLX4.toggleLight(deck.padFX1Mode, true); } else if (_control == 0x6B) { PioneerDDJFLX4.toggleLight(deck.padFX2Mode, true); } else if (_control == 0x20) { PioneerDDJFLX4.toggleLight(deck.beatJumpMode, true); } else if (_control == 0x6D) { PioneerDDJFLX4.toggleLight(deck.beatLoopMode, true); } else if (_control == 0x22) { PioneerDDJFLX4.toggleLight(deck.samplerMode, true); } else if (_control == 0x6F) { PioneerDDJFLX4.toggleLight(deck.keyShiftMode, true); } +PioneerDDJFLX4.padModeKeyPressed = function(_channel, _control, value, _status, _group) { + var deck = (_status === 0x90 ? PioneerDDJFLX4.lights.deck1 : PioneerDDJFLX4.lights.deck2); + + if (_control === 0x1B) { + PioneerDDJFLX4.toggleLight(deck.hotcueMode, true); + } else if (_control === 0x69) { + PioneerDDJFLX4.toggleLight(deck.keyboardMode, true); + } else if (_control === 0x1E) { + PioneerDDJFLX4.toggleLight(deck.padFX1Mode, true); + } else if (_control === 0x6B) { + PioneerDDJFLX4.toggleLight(deck.padFX2Mode, true); + } else if (_control === 0x20) { + PioneerDDJFLX4.toggleLight(deck.beatJumpMode, true); + } else if (_control === 0x6D) { + PioneerDDJFLX4.toggleLight(deck.beatLoopMode, true); + } else if (_control === 0x22) { + PioneerDDJFLX4.toggleLight(deck.samplerMode, true); + } else if (_control === 0x6F) { + PioneerDDJFLX4.toggleLight(deck.keyShiftMode, true); + } }; PioneerDDJFLX4.samplerPadPressed = function(_channel, _control, value, _status, group) { From e18a48c7b1bad9de0f044adbf8fd6786175a3cea Mon Sep 17 00:00:00 2001 From: Robert904 Date: Sat, 25 Feb 2023 09:37:26 +0100 Subject: [PATCH 04/14] Pioneer DDJ-FLX4: remove reviewers of the mapping this one is based on Co-authored-by: JoergAtGithub <64457745+JoergAtGithub@users.noreply.github.com> --- res/controllers/Pioneer-DDJ-FLX4-script.js | 1 - 1 file changed, 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-FLX4-script.js b/res/controllers/Pioneer-DDJ-FLX4-script.js index 6a853d2cb35..f87e824a89a 100644 --- a/res/controllers/Pioneer-DDJ-FLX4-script.js +++ b/res/controllers/Pioneer-DDJ-FLX4-script.js @@ -3,7 +3,6 @@ // * Mixxx mapping script file for the Pioneer DDJ-FLX4. // * Mostly adapted from the DDJ-400 mapping script // * Authors: Warker, nschloe, dj3730, jusko, Robert904 -// * Reviewers: Be-ing, Holzhaus // * Manual: https://manual.mixxx.org/2.3/en/hardware/controllers/ // **************************************************************************** // From 3ae72248e1e20de0ec810f6b3ba728181c4b0589 Mon Sep 17 00:00:00 2001 From: Robert904 Date: Sat, 25 Feb 2023 09:38:11 +0100 Subject: [PATCH 05/14] Pioneer DDJ-FLX4: redundant info with the XML file Co-authored-by: JoergAtGithub <64457745+JoergAtGithub@users.noreply.github.com> --- res/controllers/Pioneer-DDJ-FLX4-script.js | 1 - 1 file changed, 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-FLX4-script.js b/res/controllers/Pioneer-DDJ-FLX4-script.js index f87e824a89a..2751f2f83ed 100644 --- a/res/controllers/Pioneer-DDJ-FLX4-script.js +++ b/res/controllers/Pioneer-DDJ-FLX4-script.js @@ -3,7 +3,6 @@ // * Mixxx mapping script file for the Pioneer DDJ-FLX4. // * Mostly adapted from the DDJ-400 mapping script // * Authors: Warker, nschloe, dj3730, jusko, Robert904 -// * Manual: https://manual.mixxx.org/2.3/en/hardware/controllers/ // **************************************************************************** // // Implemented (as per manufacturer's manual): From e4bc10cfe5edb89b254e512dde06997245191d14 Mon Sep 17 00:00:00 2001 From: Robert904 Date: Sat, 25 Feb 2023 09:38:58 +0100 Subject: [PATCH 06/14] Pioneer DDJ-FLX4: removed meaningless comment Co-authored-by: JoergAtGithub <64457745+JoergAtGithub@users.noreply.github.com> --- res/controllers/Pioneer-DDJ-FLX4-script.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-FLX4-script.js b/res/controllers/Pioneer-DDJ-FLX4-script.js index 2751f2f83ed..53f087729f2 100644 --- a/res/controllers/Pioneer-DDJ-FLX4-script.js +++ b/res/controllers/Pioneer-DDJ-FLX4-script.js @@ -716,9 +716,6 @@ PioneerDDJFLX4.stopSamplerBlink = function(channel, control) { } }; -// -// Additional features -// PioneerDDJFLX4.toggleQuantize = function(_channel, _control, value, _status, group) { if (value) { From 3ab64ad8ab57a056ce0ecbb8ac4c389c1807ddcd Mon Sep 17 00:00:00 2001 From: Robert Hendrickx Date: Wed, 8 Mar 2023 22:28:08 +0100 Subject: [PATCH 07/14] Pioneer DDJ-FLX4: BeatFX ON/OFF working when on channel 2 --- res/controllers/Pioneer-DDJ-FLX4.midi.xml | 24 +++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-FLX4.midi.xml b/res/controllers/Pioneer-DDJ-FLX4.midi.xml index 732a43d1a5c..30028fa5ddc 100644 --- a/res/controllers/Pioneer-DDJ-FLX4.midi.xml +++ b/res/controllers/Pioneer-DDJ-FLX4.midi.xml @@ -1086,7 +1086,7 @@ - BEAT FX ON/OFF - press - Toggle FX in the selected Slot + BEAT FX ON/OFF - press - Toggle FX in the selected Slot (when on CHAN1/1+2) [EffectRack1_EffectUnit1] PioneerDDJFLX4.beatFxOnOffPressed 0x94 @@ -1096,7 +1096,17 @@ - BEAT FX ON/OFF +SHIFT - press - Disable all enabled Beat FX Slots + BEAT FX ON/OFF - press - Toggle FX in the selected Slot (when on CHAN2) + [EffectRack1_EffectUnit1] + PioneerDDJFLX4.beatFxOnOffPressed + 0x95 + 0x47 + + + + + + BEAT FX ON/OFF +SHIFT - press - Disable all enabled Beat FX Slots (when on CHAN1/1+2) [EffectRack1_EffectUnit1] PioneerDDJFLX4.beatFxOnOffShiftPressed 0x94 @@ -1105,6 +1115,16 @@ + + BEAT FX ON/OFF +SHIFT - press - Disable all enabled Beat FX Slots (when on CHAN12) + [EffectRack1_EffectUnit1] + PioneerDDJFLX4.beatFxOnOffShiftPressed + 0x95 + 0x43 + + + + From c761034c02efd57ded117f294f520cbe24b5c733 Mon Sep 17 00:00:00 2001 From: Robert Hendrickx Date: Wed, 8 Mar 2023 22:45:20 +0100 Subject: [PATCH 08/14] Pioneer DDJ-FLX4: Should map better the console vuMeter to MIXXX one --- res/controllers/Pioneer-DDJ-FLX4-script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-FLX4-script.js b/res/controllers/Pioneer-DDJ-FLX4-script.js index 53f087729f2..235a365b5bf 100644 --- a/res/controllers/Pioneer-DDJ-FLX4-script.js +++ b/res/controllers/Pioneer-DDJ-FLX4-script.js @@ -271,7 +271,7 @@ PioneerDDJFLX4.init = function() { // PioneerDDJFLX4.vuMeterUpdate = function(value, group) { - var newVal = value * 150; + var newVal = value * 127; switch (group) { case "[Channel1]": From 8489a03b39736ea0d99d43fd13b9eb93bf5b8a95 Mon Sep 17 00:00:00 2001 From: Robert Hendrickx Date: Wed, 8 Mar 2023 23:09:46 +0100 Subject: [PATCH 09/14] Pioneer DDJ-FLX4: More logical mapping of the sampler pads --- res/controllers/Pioneer-DDJ-FLX4.midi.xml | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-FLX4.midi.xml b/res/controllers/Pioneer-DDJ-FLX4.midi.xml index 30028fa5ddc..7a14688b687 100644 --- a/res/controllers/Pioneer-DDJ-FLX4.midi.xml +++ b/res/controllers/Pioneer-DDJ-FLX4.midi.xml @@ -2065,7 +2065,7 @@ PAD 5 (LEFT) SAMPLE MODE - press - Play Sample or Load Track - [Sampler5] + [Sampler9] PioneerDDJFLX4.samplerPadPressed 0x97 0x34 @@ -2075,7 +2075,7 @@ PAD 5 (LEFT)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track - [Sampler5] + [Sampler9] PioneerDDJFLX4.samplerPadShiftPressed 0x98 0x34 @@ -2085,7 +2085,7 @@ PAD 6 (LEFT) SAMPLE MODE - press - Play Sample or Load Track - [Sampler6] + [Sampler10] PioneerDDJFLX4.samplerPadPressed 0x97 0x35 @@ -2095,7 +2095,7 @@ PAD 6 (LEFT)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track - [Sampler6] + [Sampler10] PioneerDDJFLX4.samplerPadShiftPressed 0x98 0x35 @@ -2105,7 +2105,7 @@ PAD 7 (LEFT) SAMPLE MODE - press - Play Sample or Load Track - [Sampler7] + [Sampler11] PioneerDDJFLX4.samplerPadPressed 0x97 0x36 @@ -2115,7 +2115,7 @@ PAD 7 (LEFT)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track - [Sampler7] + [Sampler11] PioneerDDJFLX4.samplerPadShiftPressed 0x98 0x36 @@ -2125,7 +2125,7 @@ PAD 8 (LEFT) SAMPLE MODE - press - Play Sample or Load Track - [Sampler8] + [Sampler12] PioneerDDJFLX4.samplerPadPressed 0x97 0x37 @@ -2135,7 +2135,7 @@ PAD 8 (LEFT)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track - [Sampler8] + [Sampler12] PioneerDDJFLX4.samplerPadShiftPressed 0x98 0x37 @@ -2147,7 +2147,7 @@ PAD 1 (RIGHT) SAMPLE MODE - press - Play Sample or Load Track - [Sampler9] + [Sampler5] PioneerDDJFLX4.samplerPadPressed 0x99 0x30 @@ -2157,7 +2157,7 @@ PAD 1 (Right)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track - [Sampler9] + [Sampler5] PioneerDDJFLX4.samplerPadShiftPressed 0x9A 0x30 @@ -2167,7 +2167,7 @@ PAD 2 (RIGHT) SAMPLE MODE - press - Play Sample or Load Track - [Sampler10] + [Sampler6] PioneerDDJFLX4.samplerPadPressed 0x99 0x31 @@ -2177,7 +2177,7 @@ PAD 2 (Right)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track - [Sampler10] + [Sampler6] PioneerDDJFLX4.samplerPadShiftPressed 0x9A 0x31 @@ -2187,7 +2187,7 @@ PAD 3 (RIGHT) SAMPLE MODE - press - Play Sample or Load Track - [Sampler11] + [Sampler7] PioneerDDJFLX4.samplerPadPressed 0x99 0x32 @@ -2197,7 +2197,7 @@ PAD 3 (Right)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track - [Sampler11] + [Sampler7] PioneerDDJFLX4.samplerPadShiftPressed 0x9A 0x32 @@ -2207,7 +2207,7 @@ PAD 4 (RIGHT) SAMPLE MODE - press - Play Sample or Load Track - [Sampler12] + [Sampler8] PioneerDDJFLX4.samplerPadPressed 0x99 0x33 @@ -2217,7 +2217,7 @@ PAD 4 (Right)+SHIFT SAMPLE MODE - press - Stop Playback or Eject Track - [Sampler12] + [Sampler8] PioneerDDJFLX4.samplerPadShiftPressed 0x9A 0x33 From 9cb7f394a1c094c3959c59036e281b6b54826b6f Mon Sep 17 00:00:00 2001 From: Robert Hendrickx Date: Wed, 8 Mar 2023 23:40:54 +0100 Subject: [PATCH 10/14] Pioneer DDJ-FLX4: Corrected blink pads during sample playback --- res/controllers/Pioneer-DDJ-FLX4-script.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-FLX4-script.js b/res/controllers/Pioneer-DDJ-FLX4-script.js index 235a365b5bf..fe174d32a72 100644 --- a/res/controllers/Pioneer-DDJ-FLX4-script.js +++ b/res/controllers/Pioneer-DDJ-FLX4-script.js @@ -637,9 +637,26 @@ PioneerDDJFLX4.decreaseBeatjumpSizes = function(_channel, control, value, _statu PioneerDDJFLX4.samplerPlayOutputCallbackFunction = function(value, group, _control) { if (value === 1) { var curPad = group.match(script.samplerRegEx)[1]; + var deckIndex = 0; + var padIndex = 0; + + if (curPad >=1 && curPad <= 4) { + deckIndex = 0; + padIndex = curPad - 1; + } else if (curPad >=5 && curPad <= 8) { + deckIndex = 2; + padIndex = curPad - 5; + } else if (curPad >=9 && curPad <= 12) { + deckIndex = 0; + padIndex = curPad - 5; + } else if (curPad >=13 && curPad <= 16) { + deckIndex = 2; + padIndex = curPad - 9; + } + PioneerDDJFLX4.startSamplerBlink( - 0x97 + (curPad > 8 ? 2 : 0), - 0x30 + ((curPad > 8 ? curPad - 8 : curPad) - 1), + 0x97 + deckIndex, + 0x30 + padIndex, group); } }; From 56f2670b2a11a90231671d2fc617b0f919b7c54b Mon Sep 17 00:00:00 2001 From: Robert Hendrickx Date: Thu, 9 Mar 2023 00:28:23 +0100 Subject: [PATCH 11/14] Pioneer DDJ-FLX4: Corrected sample pad light mapping --- res/controllers/Pioneer-DDJ-FLX4.midi.xml | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-FLX4.midi.xml b/res/controllers/Pioneer-DDJ-FLX4.midi.xml index 7a14688b687..24fcd64946f 100644 --- a/res/controllers/Pioneer-DDJ-FLX4.midi.xml +++ b/res/controllers/Pioneer-DDJ-FLX4.midi.xml @@ -3009,7 +3009,7 @@ 0.5 - [Sampler5] + [Sampler9] track_loaded 0x97 0x34 @@ -3017,7 +3017,7 @@ 0.5 - [Sampler6] + [Sampler10] track_loaded 0x97 0x35 @@ -3025,7 +3025,7 @@ 0.5 - [Sampler7] + [Sampler11] track_loaded 0x97 0x36 @@ -3033,7 +3033,7 @@ 0.5 - [Sampler8] + [Sampler12] track_loaded 0x97 0x37 @@ -3043,7 +3043,7 @@ - [Sampler9] + [Sampler5] track_loaded 0x99 0x30 @@ -3051,7 +3051,7 @@ 0.5 - [Sampler10] + [Sampler6] track_loaded 0x99 0x31 @@ -3059,7 +3059,7 @@ 0.5 - [Sampler11] + [Sampler7] track_loaded 0x99 0x32 @@ -3067,7 +3067,7 @@ 0.5 - [Sampler12] + [Sampler8] track_loaded 0x99 0x33 @@ -3143,7 +3143,7 @@ 0.5 - [Sampler5] + [Sampler9] track_loaded 0x98 0x34 @@ -3151,7 +3151,7 @@ 0.5 - [Sampler6] + [Sampler10] track_loaded 0x98 0x35 @@ -3159,7 +3159,7 @@ 0.5 - [Sampler7] + [Sampler11] track_loaded 0x98 0x36 @@ -3167,7 +3167,7 @@ 0.5 - [Sampler8] + [Sampler12] track_loaded 0x98 0x37 @@ -3179,7 +3179,7 @@ - [Sampler9] + [Sampler5] track_loaded 0x9A 0x30 @@ -3187,7 +3187,7 @@ 0.5 - [Sampler10] + [Sampler6] track_loaded 0x9A 0x31 @@ -3195,7 +3195,7 @@ 0.5 - [Sampler11] + [Sampler7] track_loaded 0x9A 0x32 @@ -3203,7 +3203,7 @@ 0.5 - [Sampler12] + [Sampler8] track_loaded 0x9A 0x33 From 3c639d6d966e56dbfe0947710a89f37d3cb3df7e Mon Sep 17 00:00:00 2001 From: Robert Hendrickx Date: Thu, 9 Mar 2023 00:29:55 +0100 Subject: [PATCH 12/14] Pioneer DDJ-FLX4: apply proposed modification on comments --- res/controllers/Pioneer-DDJ-FLX4-script.js | 2 ++ res/controllers/Pioneer-DDJ-FLX4.midi.xml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-FLX4-script.js b/res/controllers/Pioneer-DDJ-FLX4-script.js index fe174d32a72..5f23aa4149f 100644 --- a/res/controllers/Pioneer-DDJ-FLX4-script.js +++ b/res/controllers/Pioneer-DDJ-FLX4-script.js @@ -504,6 +504,8 @@ PioneerDDJFLX4.cycleTempoRange = function(_channel, _control, value, _status, gr for (var i = 0; i < this.tempoRanges.length; i++) { if (currRange === this.tempoRanges[i]) { + // idx get the index of the value in tempoRanges following the currently configured one + // or cycle back to 0 if the current is the last value of the list. idx = (i + 1) % this.tempoRanges.length; break; } diff --git a/res/controllers/Pioneer-DDJ-FLX4.midi.xml b/res/controllers/Pioneer-DDJ-FLX4.midi.xml index 24fcd64946f..5415ec91187 100644 --- a/res/controllers/Pioneer-DDJ-FLX4.midi.xml +++ b/res/controllers/Pioneer-DDJ-FLX4.midi.xml @@ -2,7 +2,7 @@ Pioneer DDJ-FLX4 - Warker/nschloe/dj3730/jusko/Robert904 + Robert904 Midi Mapping for the Pioneer DDJ-FLX4 (based on DDJ-400 mapping) pioneer_ddj_FLX4 https://mixxx.discourse.group/t/pioneer-ddj-flx4 From 715ed5cedd8d9b36dfdcfdc822975821c94c3322 Mon Sep 17 00:00:00 2001 From: Robert904 Date: Thu, 31 Aug 2023 19:10:05 +0200 Subject: [PATCH 13/14] Pioneer DDJ-FLX4: New effect selection mapping --- res/controllers/Pioneer-DDJ-FLX4-script.js | 37 +++++++++++++++------- res/controllers/Pioneer-DDJ-FLX4.midi.xml | 28 ++++++---------- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-FLX4-script.js b/res/controllers/Pioneer-DDJ-FLX4-script.js index 5f23aa4149f..25d9484a87a 100644 --- a/res/controllers/Pioneer-DDJ-FLX4-script.js +++ b/res/controllers/Pioneer-DDJ-FLX4-script.js @@ -18,13 +18,12 @@ // // Custom (Mixxx specific mappings): // * BeatFX: Assigned Effect Unit 1 -// v FX_SELECT focus EFFECT1. -// < LEFT focus EFFECT2 -// > RIGHT focus EFFECT3 +// v FX_SELECT Load next effect. +// SHIFT + v FX_SELECT Load previous effect. +// < LEFT Cycle effect focus leftward +// > RIGHT Cycle effect focus rightward // ON/OFF toggles focused effect slot // SHIFT + ON/OFF disables all three effect slots. -// SHIFT + < loads previous effect -// SHIFT + > loads next effect // // * 32 beat jump forward & back (Shift + CUE/LOOP CALL arrows) // * Toggle quantize (Shift + channel cue) @@ -310,30 +309,44 @@ PioneerDDJFLX4.beatFxLevelDepthRotate = function(_channel, _control, value) { } }; -PioneerDDJFLX4.beatFxSelectPreviousEffect = function(_channel, _control, value) { - engine.setValue(PioneerDDJFLX4.focusedFxGroup(), "prev_effect", value); +PioneerDDJFLX4.changeFocusedEffectBy = function(numberOfSteps) { + var focusedEffect = engine.getValue("[EffectRack1_EffectUnit1]", "focused_effect"); + + // Convert to zero-based index + focusedEffect -= 1; + + // Standard Euclidean modulo by use of two plain modulos + var numberOfEffectsPerEffectUnit = 3; + focusedEffect = (((focusedEffect + numberOfSteps) % numberOfEffectsPerEffectUnit) + numberOfEffectsPerEffectUnit) % numberOfEffectsPerEffectUnit; + + // Convert back to one-based index + focusedEffect += 1; + + engine.setValue("[EffectRack1_EffectUnit1]", "focused_effect", focusedEffect); }; -PioneerDDJFLX4.beatFxSelectNextEffect = function(_channel, _control, value) { +PioneerDDJFLX4.beatFxSelectPressed = function(_channel, _control, value) { + if (value === 0) { return; } + engine.setValue(PioneerDDJFLX4.focusedFxGroup(), "next_effect", value); }; -PioneerDDJFLX4.beatFxSelectPressed = function(_channel, _control, value) { +PioneerDDJFLX4.beatFxSelectShiftPressed = function(_channel, _control, value) { if (value === 0) { return; } - engine.setValue("[EffectRack1_EffectUnit1]", "focused_effect", 1); + engine.setValue(PioneerDDJFLX4.focusedFxGroup(), "prev_effect", value); }; PioneerDDJFLX4.beatFxLeftPressed = function(_channel, _control, value) { if (value === 0) { return; } - engine.setValue("[EffectRack1_EffectUnit1]", "focused_effect", 2); + PioneerDDJFLX4.changeFocusedEffectBy(-1); }; PioneerDDJFLX4.beatFxRightPressed = function(_channel, _control, value) { if (value === 0) { return; } - engine.setValue("[EffectRack1_EffectUnit1]", "focused_effect", 3); + PioneerDDJFLX4.changeFocusedEffectBy(1); }; PioneerDDJFLX4.beatFxOnOffPressed = function(_channel, _control, value) { diff --git a/res/controllers/Pioneer-DDJ-FLX4.midi.xml b/res/controllers/Pioneer-DDJ-FLX4.midi.xml index 5415ec91187..c022a68c7bd 100644 --- a/res/controllers/Pioneer-DDJ-FLX4.midi.xml +++ b/res/controllers/Pioneer-DDJ-FLX4.midi.xml @@ -998,7 +998,7 @@ - BEAT FX SELECT - press once - select effect unit 1 + BEAT FX SELECT - press once - select next effect [EffectRack1_EffectUnit1] PioneerDDJFLX4.beatFxSelectPressed 0x94 @@ -1007,30 +1007,30 @@ - - BEAT LEFT - press - select effect unit 2 + BEAT FX SELECT + shift - press once - select previous effect [EffectRack1_EffectUnit1] - PioneerDDJFLX4.beatFxLeftPressed + PioneerDDJFLX4.beatFxSelectShiftPressed 0x94 - 0x4A + 0x64 + - BEAT LEFT + shift - select previous effect for the current unit + BEAT LEFT - press - select previous effect unit [EffectRack1_EffectUnit1] - PioneerDDJFLX4.beatFxSelectPreviousEffect + PioneerDDJFLX4.beatFxLeftPressed 0x94 - 0x66 + 0x4A - BEAT RIGHT - press - select effect unit 3 + BEAT RIGHT - press - select next effect unit [EffectRack1_EffectUnit1] PioneerDDJFLX4.beatFxRightPressed 0x94 @@ -1039,16 +1039,6 @@ - - BEAT RIGHT + shift - select next effect for the current unit - [EffectRack1_EffectUnit1] - PioneerDDJFLX4.beatFxSelectNextEffect - 0x94 - 0x6B - - - - From 1fb5b324d073842ef56953a61b1cd4abcefeedbb Mon Sep 17 00:00:00 2001 From: Robert904 Date: Sun, 3 Sep 2023 10:32:57 +0200 Subject: [PATCH 14/14] Pioneer DDJ-FLX4: Apply es6 style patch --- res/controllers/Pioneer-DDJ-FLX4-script.js | 52 +++++++++++----------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-FLX4-script.js b/res/controllers/Pioneer-DDJ-FLX4-script.js index 25d9484a87a..a12e983a1d7 100644 --- a/res/controllers/Pioneer-DDJ-FLX4-script.js +++ b/res/controllers/Pioneer-DDJ-FLX4-script.js @@ -270,7 +270,7 @@ PioneerDDJFLX4.init = function() { // PioneerDDJFLX4.vuMeterUpdate = function(value, group) { - var newVal = value * 127; + const newVal = value * 127; switch (group) { case "[Channel1]": @@ -288,14 +288,14 @@ PioneerDDJFLX4.vuMeterUpdate = function(value, group) { // PioneerDDJFLX4.toggleFxLight = function(_value, _group, _control) { - var enabled = engine.getValue(PioneerDDJFLX4.focusedFxGroup(), "enabled"); + const enabled = engine.getValue(PioneerDDJFLX4.focusedFxGroup(), "enabled"); PioneerDDJFLX4.toggleLight(PioneerDDJFLX4.lights.beatFx, enabled); PioneerDDJFLX4.toggleLight(PioneerDDJFLX4.lights.shiftBeatFx, enabled); }; PioneerDDJFLX4.focusedFxGroup = function() { - var focusedFx = engine.getValue("[EffectRack1_EffectUnit1]", "focused_effect"); + const focusedFx = engine.getValue("[EffectRack1_EffectUnit1]", "focused_effect"); return "[EffectRack1_EffectUnit1_Effect" + focusedFx + "]"; }; @@ -310,13 +310,13 @@ PioneerDDJFLX4.beatFxLevelDepthRotate = function(_channel, _control, value) { }; PioneerDDJFLX4.changeFocusedEffectBy = function(numberOfSteps) { - var focusedEffect = engine.getValue("[EffectRack1_EffectUnit1]", "focused_effect"); + let focusedEffect = engine.getValue("[EffectRack1_EffectUnit1]", "focused_effect"); // Convert to zero-based index focusedEffect -= 1; // Standard Euclidean modulo by use of two plain modulos - var numberOfEffectsPerEffectUnit = 3; + const numberOfEffectsPerEffectUnit = 3; focusedEffect = (((focusedEffect + numberOfSteps) % numberOfEffectsPerEffectUnit) + numberOfEffectsPerEffectUnit) % numberOfEffectsPerEffectUnit; // Convert back to one-based index @@ -352,7 +352,7 @@ PioneerDDJFLX4.beatFxRightPressed = function(_channel, _control, value) { PioneerDDJFLX4.beatFxOnOffPressed = function(_channel, _control, value) { if (value === 0) { return; } - var toggleEnabled = !engine.getValue(PioneerDDJFLX4.focusedFxGroup(), "enabled"); + const toggleEnabled = !engine.getValue(PioneerDDJFLX4.focusedFxGroup(), "enabled"); engine.setValue(PioneerDDJFLX4.focusedFxGroup(), "enabled", toggleEnabled); }; @@ -362,7 +362,7 @@ PioneerDDJFLX4.beatFxOnOffShiftPressed = function(_channel, _control, value) { engine.setParameter("[EffectRack1_EffectUnit1]", "mix", 0); engine.softTakeoverIgnoreNextValue("[EffectRack1_EffectUnit1]", "mix"); - for (var i = 1; i <= 3; i++) { + for (let i = 1; i <= 3; i++) { engine.setValue("[EffectRack1_EffectUnit1_Effect" + i + "]", "enabled", 0); } PioneerDDJFLX4.toggleLight(PioneerDDJFLX4.lights.beatFx, false); @@ -370,7 +370,7 @@ PioneerDDJFLX4.beatFxOnOffShiftPressed = function(_channel, _control, value) { }; PioneerDDJFLX4.beatFxChannel1 = function(_channel, control, value, _status, group) { - var enableChannel = 0; + let enableChannel = 0; if (value === 0x7f) { enableChannel = 1; } @@ -378,7 +378,7 @@ PioneerDDJFLX4.beatFxChannel1 = function(_channel, control, value, _status, grou }; PioneerDDJFLX4.beatFxChannel2 = function(_channel, control, value, _status, group) { - var enableChannel = 0; + let enableChannel = 0; if (value === 0x7f) { enableChannel = 1; } @@ -419,7 +419,7 @@ PioneerDDJFLX4.setLoopButtonLights = function(status, value) { }; PioneerDDJFLX4.startLoopLightsBlink = function(channel, control, status, group) { - var blink = 0x7F; + let blink = 0x7F; PioneerDDJFLX4.stopLoopLightsBlink(group, control, status); @@ -458,7 +458,7 @@ PioneerDDJFLX4.stopLoopLightsBlink = function(group, control, status) { }; PioneerDDJFLX4.loopToggle = function(value, group, control) { - var status = group === "[Channel1]" ? 0x90 : 0x91, + const status = group === "[Channel1]" ? 0x90 : 0x91, channel = group === "[Channel1]" ? 0 : 1; PioneerDDJFLX4.setReloopLight(status, value ? 0x7F : 0x00); @@ -512,10 +512,10 @@ PioneerDDJFLX4.syncLongPressed = function(channel, control, value, status, group PioneerDDJFLX4.cycleTempoRange = function(_channel, _control, value, _status, group) { if (value === 0) { return; } // ignore release - var currRange = engine.getValue(group, "rateRange"); - var idx = 0; + const currRange = engine.getValue(group, "rateRange"); + let idx = 0; - for (var i = 0; i < this.tempoRanges.length; i++) { + for (let i = 0; i < this.tempoRanges.length; i++) { if (currRange === this.tempoRanges[i]) { // idx get the index of the value in tempoRanges following the currently configured one // or cycle back to 0 if the current is the last value of the list. @@ -531,12 +531,12 @@ PioneerDDJFLX4.cycleTempoRange = function(_channel, _control, value, _status, gr // PioneerDDJFLX4.jogTurn = function(channel, _control, value, _status, group) { - var deckNum = channel + 1; + const deckNum = channel + 1; // wheel center at 64; <64 rew >64 fwd - var newVal = value - 64; + let newVal = value - 64; // loop_in / out adjust - var loopEnabled = engine.getValue(group, "loop_enabled"); + const loopEnabled = engine.getValue(group, "loop_enabled"); if (loopEnabled > 0) { if (PioneerDDJFLX4.loopAdjustIn[channel]) { newVal = newVal * PioneerDDJFLX4.loopAdjustMultiply + engine.getValue(group, "loop_start_position"); @@ -559,12 +559,12 @@ PioneerDDJFLX4.jogTurn = function(channel, _control, value, _status, group) { PioneerDDJFLX4.jogSearch = function(_channel, _control, value, _status, group) { - var newVal = (value - 64) * PioneerDDJFLX4.fastSeekScale; + const newVal = (value - 64) * PioneerDDJFLX4.fastSeekScale; engine.setValue(group, "jog", newVal); }; PioneerDDJFLX4.jogTouch = function(channel, _control, value) { - var deckNum = channel + 1; + const deckNum = channel + 1; // skip while adjusting the loop points if (PioneerDDJFLX4.loopAdjustIn[channel] || PioneerDDJFLX4.loopAdjustOut[channel]) { @@ -600,7 +600,7 @@ PioneerDDJFLX4.tempoSliderMSB = function(channel, control, value, status, group) }; PioneerDDJFLX4.tempoSliderLSB = function(channel, control, value, status, group) { - var fullValue = (PioneerDDJFLX4.highResMSB[group].tempoSlider << 7) + value; + const fullValue = (PioneerDDJFLX4.highResMSB[group].tempoSlider << 7) + value; engine.setValue( group, @@ -651,9 +651,9 @@ PioneerDDJFLX4.decreaseBeatjumpSizes = function(_channel, control, value, _statu PioneerDDJFLX4.samplerPlayOutputCallbackFunction = function(value, group, _control) { if (value === 1) { - var curPad = group.match(script.samplerRegEx)[1]; - var deckIndex = 0; - var padIndex = 0; + const curPad = group.match(script.samplerRegEx)[1]; + let deckIndex = 0; + let padIndex = 0; if (curPad >=1 && curPad <= 4) { deckIndex = 0; @@ -677,7 +677,7 @@ PioneerDDJFLX4.samplerPlayOutputCallbackFunction = function(value, group, _contr }; PioneerDDJFLX4.padModeKeyPressed = function(_channel, _control, value, _status, _group) { - var deck = (_status === 0x90 ? PioneerDDJFLX4.lights.deck1 : PioneerDDJFLX4.lights.deck2); + const deck = (_status === 0x90 ? PioneerDDJFLX4.lights.deck1 : PioneerDDJFLX4.lights.deck2); if (_control === 0x1B) { PioneerDDJFLX4.toggleLight(deck.hotcueMode, true); @@ -715,7 +715,7 @@ PioneerDDJFLX4.samplerPadShiftPressed = function(_channel, _control, value, _sta }; PioneerDDJFLX4.startSamplerBlink = function(channel, control, group) { - var val = 0x7f; + let val = 0x7f; PioneerDDJFLX4.stopSamplerBlink(channel, control); PioneerDDJFLX4.timers[channel][control] = engine.beginTimer(250, function() { @@ -726,7 +726,7 @@ PioneerDDJFLX4.startSamplerBlink = function(channel, control, group) { // also blink the pad while SHIFT is pressed midi.sendShortMsg((channel+1), control, val); - var isPlaying = engine.getValue(group, "play") === 1; + const isPlaying = engine.getValue(group, "play") === 1; if (!isPlaying) { // kill timer