From 838d17c172d0900ec200843af49479a9d667422c Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 1 May 2021 18:54:22 -0500 Subject: [PATCH 01/34] add mappings for Pioneer DDJ SB3 --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 1791 +++++++ res/controllers/Pioneer-DDJ-SB3.midi.xml | 5100 ++++++++++++++++++++ 2 files changed, 6891 insertions(+) create mode 100755 res/controllers/Pioneer-DDJ-SB3-scripts.js create mode 100755 res/controllers/Pioneer-DDJ-SB3.midi.xml diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js new file mode 100755 index 00000000000..f4d35f303f0 --- /dev/null +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -0,0 +1,1791 @@ + +var PioneerDDJSB3 = {}; +//var PioneerDDJSB3 = {}; + +/////////////////////////////////////////////////////////////// +// USER OPTIONS // +/////////////////////////////////////////////////////////////// + +// If true, vinyl mode will be enabled when Mixxx starts. +PioneerDDJSB3.vinylModeOnStartup = false; + +// If true, pressing shift + cue will play the track in reverse and enable slip mode, +// which can be used like a censor effect. If false, pressing shift + cue jumps to +// the beginning of the track and stops playback. +PioneerDDJSB3.reverseRollOnShiftCue = false; + +// Sets the jogwheels sensivity. 1 is default, 2 is twice as sensitive, 0.5 is half as sensitive. +PioneerDDJSB3.jogwheelSensivity = 1.0; + +// Sets how much more sensitive the jogwheels get when holding shift. +// Set to 1 to disable jogwheel sensitivity increase when holding shift. +PioneerDDJSB3.jogwheelShiftMultiplier = 100; + +// If true Level-Meter shows VU-Master left & right. If false shows level of active deck. +PioneerDDJSB3.showVumeterMaster = false; + +// If true VU-Level twinkle if AutoDJ is ON. +PioneerDDJSB3.twinkleVumeterAutodjOn = true; + +// If true, releasing browser knob jumps forward to jumpPreviewPosition. +PioneerDDJSB3.jumpPreviewEnabled = true; +// Position in the track to jump to. 0 is the beginning of the track and 1 is the end. +PioneerDDJSB3.jumpPreviewPosition = 0.5; + +PioneerDDJSB3.looprollIntervals = [1 / 16, 1 / 8, 1 / 4, 1 / 2, 1, 2, 4, 8]; + +/* + Pioneer DDJ-SB3 mapping for Mixxx + Copyright (c) 2019 Dancephy LLC (javier@dancephy.com), licensed under GPL version 3 or later + Copyright (c) 2017 Be (be.0@gmx.com), licensed under GPL version 2 or later + Copyright (c) 2014-2015 various contributors, licensed under MIT license + + Contributors and change log: + - Be (be.0@gmx.com): update effects and autoloop mode for Mixxx 2.1, fix level meter scaling, + remove LED flickering when pressing shift, start porting to Components + - Michael Stahl (DG3NEC): original DDJ-SB2 mapping for Mixxx 2.0 + - Joan Ardiaca Jové (joan.ardiaca@gmail.com): Pioneer DDJ-SB mapping for Mixxx 2.0 + - wingcom (wwingcomm@gmail.com): start of Pioneer DDJ-SB mapping + https://github.com/wingcom/Mixxx-Pioneer-DDJ-SB + - Hilton Rudham: Pioneer DDJ-SR mapping + https://github.com/hrudham/Mixxx-Pioneer-DDJ-SR + + GPL license notice for current version: + This program is free software; you can redistribute it and/or modify it under the terms of the + GNU General Public License as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See + the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with this program; if + not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + + MIT License for earlier versions: + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + TODO: + - bug when touching jog wheel for first time in vinyl mode +*/ + +/////////////////////////////////////////////////////////////// +// INIT, SHUTDOWN & GLOBAL HELPER // +/////////////////////////////////////////////////////////////// +PioneerDDJSB3.trackLoaded = function(value, group) { + var deckIndex = PioneerDDJSB3.channelGroups[group]; + + if (value) { + midi.sendShortMsg(0x96, 0x46 + deckIndex, 0x7F); + } else { + midi.sendShortMsg(0x96, 0x46 + deckIndex, 0x0); + } +}; + +// When unloading a deck, it should pass 0 for BPM +// +// Controller should know track BPM to match the TRANS pads velocity +// Also, changing deck without sending BPM does not work +PioneerDDJSB3.updateBPM = function(bpm, group) { + // Prevent sending BPM for unselected Deck. + // We send it when changing deck also, to keep in sync + if (group === "[Channel1]" && PioneerDDJSB3.deck3Enabled) { + return; + } + if (group === "[Channel2]" && PioneerDDJSB3.deck4Enabled) { + return; + } + if (group === "[Channel3]" && !PioneerDDJSB3.deck3Enabled) { + return; + } + if (group === "[Channel4]" && !PioneerDDJSB3.deck4Enabled) { + return; + } + + var bpmValue = Math.round(bpm * 100); + var bpmBits = bpmValue.toString(2).split(""); + + var bpmBitsPadded = []; + + var offset = 16 - bpmBits.length; + + for (var i=0; i<16; i++) { + if (i < offset) { + bpmBitsPadded[i] = "0"; + } else { + bpmBitsPadded[i] = bpmBits[i - offset]; + } + } + + var bytes = []; + + // eslint-disable-next-line no-redeclare + for (var i=0; i<4; i++) { + var mbyte = 0; + + for (var j=0; j<4; j++) { + var bitIndex = (i * 4) + j; + var bit = parseInt(bpmBitsPadded[bitIndex]); + mbyte = mbyte | (bit << (3 - j)); + } + + bytes[i] = mbyte; + } + + var deckIndex = PioneerDDJSB3.channelGroups[group]; + var deckByte = 0x11 + deckIndex; + + var sysexMessage = [0xF0, 0x00, 0x20, 0x7F, deckByte, 0x00, 0x00, bytes[0], bytes[1], bytes[2], bytes[3], 0xF7]; + midi.sendSysexMsg(sysexMessage, sysexMessage.length); +}; + +PioneerDDJSB3.longButtonPress = false; + +PioneerDDJSB3.flasher = {}; + +PioneerDDJSB3.flasher.functions = []; + +PioneerDDJSB3.flasher.init = function() { + var flag = true; + + PioneerDDJSB3.flasher.timer = engine.beginTimer(500, function() { + flag = !flag; + + for (var i = 0; i < PioneerDDJSB3.flasher.functions.length; i++) { + PioneerDDJSB3.flasher.functions[i](flag); + } + }); +}; + +PioneerDDJSB3.flasher.shutdown = function() { + engine.stopTimer(PioneerDDJSB3.flasher.timer); +}; + +PioneerDDJSB3.flasher.addFunction = function(fn) { + PioneerDDJSB3.flasher.functions.push(fn); +}; + +PioneerDDJSB3.flasher.removeFunction = function(fn) { + PioneerDDJSB3.flasher.functions = _.filter(PioneerDDJSB3.flasher.functions, function(f) { + return fn !== f; + }); +}; + +PioneerDDJSB3.midiOutputBeatLeds = [0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67]; + +PioneerDDJSB3.scratchSettings = { + "alpha": 1.0 / 8, + "beta": 1.0 / 8 / 32, + "jogResolution": 720, + "vinylSpeed": 33 + 1 / 3, + "safeScratchTimeout": 20 +}; + +PioneerDDJSB3.channelGroups = { + "[Channel1]": 0x00, + "[Channel2]": 0x01, + "[Channel3]": 0x02, + "[Channel4]": 0x03 +}; + +PioneerDDJSB3.samplerGroups = { + "[Sampler1]": {channels: ["[Channel1]", "[Channel3]"], ledNumber: 0x00}, + "[Sampler2]": {channels: ["[Channel1]", "[Channel3]"], ledNumber: 0x01}, + "[Sampler3]": {channels: ["[Channel1]", "[Channel3]"], ledNumber: 0x02}, + "[Sampler4]": {channels: ["[Channel1]", "[Channel3]"], ledNumber: 0x03}, + "[Sampler5]": {channels: ["[Channel2]", "[Channel4]"], ledNumber: 0x00}, + "[Sampler6]": {channels: ["[Channel2]", "[Channel4]"], ledNumber: 0x01}, + "[Sampler7]": {channels: ["[Channel2]", "[Channel4]"], ledNumber: 0x02}, + "[Sampler8]": {channels: ["[Channel2]", "[Channel4]"], ledNumber: 0x03}, +}; + +PioneerDDJSB3.ledGroups = { + "hotCue": 0x00, + "fxFade": 0x10, + "padScratch": 0x20, + "sampler": 0x30, + "roll": 0x50, +}; + +PioneerDDJSB3.nonPadLeds = { + "headphoneCue": 0x54, + "shiftHeadphoneCue": 0x68, + "cue": 0x0C, + "shiftCue": 0x48, + "keyLock": 0x1A, + "shiftKeyLock": 0x60, + "play": 0x0B, + "shiftPlay": 0x47, + "vinyl": 0x17, + "shiftVinyl": 0x40, + "sync": 0x58, + "shiftSync": 0x5C, + "autoLoop": 0x14, + "shiftAutoLoop": 0x50, +}; + +PioneerDDJSB3.channelsToPadNumber = { + "[Channel1]": 1, + "[Channel2]": 2, + "[Channel3]": 3, + "[Channel4]": 4 +}; + +PioneerDDJSB3.channelsToEffectUnitNumber = { + "[Channel1]": 1, + "[Channel2]": 2, + "[Channel3]": 1, + "[Channel4]": 2 +}; + +PioneerDDJSB3.init = function() { + var initSysBytes = [0xF0, 0x00, 0x20, 0x7F, 0x03, 0x01, 0xF7]; + midi.sendSysexMsg(initSysBytes, initSysBytes.length); + + PioneerDDJSB3.shiftPressed = false; + + PioneerDDJSB3.chFaderStart = [ + null, + null + ]; + + PioneerDDJSB3.scratchMode = [false, false, false, false]; + + PioneerDDJSB3.valueVuMeter = { + "[Channel1]_current": 0, + "[Channel2]_current": 0, + "[Channel3]_current": 0, + "[Channel4]_current": 0, + "[Channel1]_enabled": 1, + "[Channel2]_enabled": 1, + "[Channel3]_enabled": 1, + "[Channel4]_enabled": 1, + }; + + PioneerDDJSB3.deck = []; + PioneerDDJSB3.deck[1] = new PioneerDDJSB3.Deck(1); + PioneerDDJSB3.deck[2] = new PioneerDDJSB3.Deck(2); + PioneerDDJSB3.deck[3] = new PioneerDDJSB3.Deck(3); + PioneerDDJSB3.deck[4] = new PioneerDDJSB3.Deck(4); + + PioneerDDJSB3.effectUnit = []; + PioneerDDJSB3.effectUnit[1] = new PioneerDDJSB3.EffectUnit(1); + PioneerDDJSB3.effectUnit[2] = new PioneerDDJSB3.EffectUnit(2); + + PioneerDDJSB3.padForDeck = []; + PioneerDDJSB3.padForDeck[1] = new PioneerDDJSB3.Pad(1); + PioneerDDJSB3.padForDeck[2] = new PioneerDDJSB3.Pad(2); + PioneerDDJSB3.padForDeck[3] = new PioneerDDJSB3.Pad(3); + PioneerDDJSB3.padForDeck[4] = new PioneerDDJSB3.Pad(4); + + PioneerDDJSB3.bindNonDeckControlConnections(false); + PioneerDDJSB3.initDeck("[Channel1]"); + PioneerDDJSB3.initDeck("[Channel2]"); + PioneerDDJSB3.initDeck("[Channel3]"); + PioneerDDJSB3.initDeck("[Channel4]"); + + if (PioneerDDJSB3.twinkleVumeterAutodjOn) { + PioneerDDJSB3.vuMeterTimer = engine.beginTimer(100, "PioneerDDJSB3.vuMeterTwinkle()"); + } + + // request the positions of the knobs and faders from the controller + midi.sendShortMsg(0x9B, 0x09, 0x7f); + + PioneerDDJSB3.flasher.init(); + PioneerDDJSB3.initFlashingPadLedControl(); +}; + +PioneerDDJSB3.shiftListeners = []; + +PioneerDDJSB3.Deck = function(deckNumber) { + var theDeck = this; + this.group = "[Channel" + deckNumber + "]"; + + this.shiftButton = function(channel, control, value, status, group) { + if (value > 0) { + theDeck.shift(); + PioneerDDJSB3.shiftPressed = true; + PioneerDDJSB3.chFaderStart[deckNumber] = null; + PioneerDDJSB3.headphoneLevel.shift(); + for (var i = 0; i < PioneerDDJSB3.shiftListeners.length; i++) { + PioneerDDJSB3.shiftListeners[i](group, true); + } + } else { + theDeck.unshift(); + PioneerDDJSB3.shiftPressed = false; + PioneerDDJSB3.headphoneLevel.unshift(); + // eslint-disable-next-line no-redeclare + for (var i = 0; i < PioneerDDJSB3.shiftListeners.length; i++) { + PioneerDDJSB3.shiftListeners[i](group, false); + } + } + }; + var playButton = this.playButton = new components.PlayButton({ + midi: [0x90 + deckNumber - 1, 0x0B], + shiftOffset: 60, + shiftControl: true, + sendShifted: true, + connect: function() { + this.connections[0] = engine.makeConnection(this.group, "play_indicator", this.output); + this.connections[1] = engine.makeConnection(this.group, "track_loaded", this.output); + }, + flashLed: function(active) { + playButton.send(playButton.outValueScale(active)); + }, + output: function(value, group, control) { + playButton[control] = value; + + if (playButton.track_loaded) { + if (playButton.play_indicator) { + PioneerDDJSB3.flasher.removeFunction(playButton.flashLed); + playButton.send(playButton.outValueScale(true)); + } else { + PioneerDDJSB3.flasher.addFunction(playButton.flashLed); + } + } else { + PioneerDDJSB3.flasher.removeFunction(playButton.flashLed); + playButton.send(playButton.outValueScale(false)); + } + } + }); + + this.cueButton = new components.CueButton({ + midi: [0x90 + deckNumber - 1, 0x0C], + shiftOffset: 60, + shiftControl: true, + sendShifted: true, + reverseRollOnShift: PioneerDDJSB3.reverseRollOnShiftCue, + }); + + this.syncButton = new components.SyncButton({ + midi: [0x90 + deckNumber - 1, 0x58], + shiftOffset: 4, + shiftControl: true, + sendShifted: true, + }); + + var effectUnitNumber = deckNumber; + if (deckNumber > 2) { + effectUnitNumber -= 2; + } + + this.gainKnob = new components.Pot({ + unshift: function() { + this.group = "[Channel" + deckNumber + "]"; + this.inKey = "pregain"; + this.disconnect(); + this.connect(); + }, + shift: function() { + var focusedEffect = engine.getValue("[EffectRack1_EffectUnit" + effectUnitNumber + "]", "focused_effect"); + this.group = "[EffectRack1_EffectUnit" + effectUnitNumber + "_Effect" + focusedEffect + "]"; + this.inKey = "parameter1"; + this.disconnect(); + this.connect(); + }, + }); + + this.eqKnob = []; + for (var k = 1; k <= 3; k++) { + this.eqKnob[k] = new components.Pot({ + number: k, + unshift: function() { + this.group = "[EqualizerRack1_[Channel" + deckNumber + "]_Effect1]"; + this.inKey = "parameter" + this.number; + this.disconnect(); + this.connect(); + }, + shift: function() { + var focusedEffect = engine.getValue("[EffectRack1_EffectUnit" + effectUnitNumber + "]", "focused_effect"); + this.group = "[EffectRack1_EffectUnit" + effectUnitNumber + "_Effect" + focusedEffect + "]"; + this.inKey = "parameter" + (5 - this.number); + this.disconnect(); + this.connect(); + }, + }); + } + + this.quickEffectKnob = new components.Pot({ + unshift: function() { + this.group = "[QuickEffectRack1_[Channel" + deckNumber + "]]"; + this.inKey = "super1"; + this.disconnect(); + this.connect(); + }, + shift: function() { + var focusedEffect = engine.getValue("[EffectRack1_EffectUnit" + effectUnitNumber + "]", "focused_effect"); + this.group = "[EffectRack1_EffectUnit" + effectUnitNumber + "_Effect" + focusedEffect + "]"; + this.inKey = "parameter5"; + this.disconnect(); + this.connect(); + }, + }); + + this.tempoFader = new components.Pot({ + inKey: "rate", + invert: true, + }); + + this.forEachComponent(function(c) { + if (c.group === undefined) { + c.group = theDeck.group; + c.connect(); + c.trigger(); + } + }); + + engine.setValue("[Channel" + deckNumber + "]", "rate_dir", -1); + + PioneerDDJSB3.updateBPM(0, "[Channel" + deckNumber + "]"); + this.loadConnection = engine.makeConnection("[Channel" + deckNumber + "]", "track_loaded", PioneerDDJSB3.trackLoaded); + this.bpmConnection = engine.makeConnection("[Channel" + deckNumber + "]", "bpm", PioneerDDJSB3.updateBPM); +}; +PioneerDDJSB3.Deck.prototype = components.ComponentContainer.prototype; + +PioneerDDJSB3.Pad = function(padNumber) { + var _this = this; + + this.padNumber = padNumber; + + this.slicerButtons = []; + + for (var i = 1; i <= PioneerDDJSB3.midiOutputBeatLeds.length; i++) { + (function(beat) { + _this.slicerButtons[beat] = function(channel, control, value, status) { + if (_this.slicer) { + _this.slicer.buttons[beat](channel, control, value, status); + } + }; + })(i); + } + + // Change BeatJump leds when shifted + PioneerDDJSB3.shiftListeners.push(function(group, isShifted) { + if (PioneerDDJSB3.channelsToPadNumber[group] === padNumber) { + if (isShifted) { + for (var i = 0; i < 8; i++) { + midi.sendShortMsg(0x97 + padNumber - 1, 0x40 + i, 0x7F); + } + } else { + midi.sendShortMsg(0x97 + padNumber - 1, 0x40, 0x0); + midi.sendShortMsg(0x97 + padNumber - 1, 0x41, 0x0); + midi.sendShortMsg(0x97 + padNumber - 1, 0x42, 0x7F); + midi.sendShortMsg(0x97 + padNumber - 1, 0x43, 0x7F); + midi.sendShortMsg(0x97 + padNumber - 1, 0x44, 0x0); + midi.sendShortMsg(0x97 + padNumber - 1, 0x45, 0x0); + midi.sendShortMsg(0x97 + padNumber - 1, 0x46, 0x0); + midi.sendShortMsg(0x97 + padNumber - 1, 0x47, 0x0); + } + } + }); +}; + +PioneerDDJSB3.Pad.prototype.setModeActive = function(activeMode) { + midi.sendShortMsg(0x90 + this.padNumber - 1, 0x1B, activeMode === 0x1B ? 0x7F : 0x0); + midi.sendShortMsg(0x90 + this.padNumber - 1, 0x1E, activeMode === 0x1E ? 0x7F : 0x0); + midi.sendShortMsg(0x90 + this.padNumber - 1, 0x20, activeMode === 0x20 ? 0x7F : 0x0); + midi.sendShortMsg(0x90 + this.padNumber - 1, 0x22, activeMode === 0x22 ? 0x7F : 0x0); + midi.sendShortMsg(0x90 + this.padNumber - 1, 0x69, activeMode === 0x69 ? 0x7F : 0x0); + midi.sendShortMsg(0x90 + this.padNumber - 1, 0x6B, activeMode === 0x6B ? 0x7F : 0x0); + midi.sendShortMsg(0x90 + this.padNumber - 1, 0x6D, activeMode === 0x6D ? 0x7F : 0x0); + midi.sendShortMsg(0x90 + this.padNumber - 1, 0x6E, activeMode === 0x6E ? 0x7F : 0x0); +}; + +PioneerDDJSB3.Pad.prototype.clearSlicer = function() { + if (this.slicer) { + this.slicer.shutdown(); + this.slicer = null; + } +}; + +PioneerDDJSB3.Pad.prototype.hotcueMode = function(channel, control, value) { + if (value) { + this.setModeActive(0x1B); + this.clearSlicer(); + } +}; + +PioneerDDJSB3.Pad.prototype.beatJumpMode = function(channel, control, value) { + if (value) { + this.setModeActive(0x69); + this.clearSlicer(); + + // Let jump pad led on + midi.sendShortMsg(0x97 + this.padNumber - 1, 0x42, 0x7F); + midi.sendShortMsg(0x97 + this.padNumber - 1, 0x43, 0x7F); + } +}; + +PioneerDDJSB3.Pad.prototype.fxFadeMode = function(channel, control, value) { + if (value) { + this.setModeActive(0x1E); + this.clearSlicer(); + } +}; + +PioneerDDJSB3.Pad.prototype.rollMode = function(channel, control, value) { + if (value) { + this.setModeActive(0x6B); + this.clearSlicer(); + } +}; + +PioneerDDJSB3.Pad.prototype.padScratchMode = function(channel, control, value) { + if (value) { + this.setModeActive(0x20); + this.clearSlicer(); + } +}; + +PioneerDDJSB3.Pad.prototype.slicerMode = function(channel, control, value) { + if (value) { + this.setModeActive(0x6D); + + if (!this.slicer) { + var group = "[Channel" + this.padNumber + "]"; + var midiOutputOp = 0x97 + this.padNumber - 1; + + this.slicer = new PioneerDDJSB3.Slicer(group, midiOutputOp, PioneerDDJSB3.midiOutputBeatLeds); + } + } +}; + +PioneerDDJSB3.Pad.prototype.samplerMode = function(channel, control, value) { + if (value) { + this.setModeActive(0x22); + this.clearSlicer(); + } +}; + +PioneerDDJSB3.Pad.prototype.transMode = function(channel, control, value) { + if (value) { + this.setModeActive(0x6E); + this.clearSlicer(); + } +}; + +PioneerDDJSB3.Pad.prototype.beatJumpMultiply = function(channel, control, value, status, group) { + if (value) { + var size = engine.getValue(group, "beatjump_size"); + engine.setValue(group, "beatjump_size", size * 2.0); + } +}; + +PioneerDDJSB3.Pad.prototype.beatJumpDivide = function(channel, control, value, status, group) { + if (value) { + var size = engine.getValue(group, "beatjump_size"); + engine.setValue(group, "beatjump_size", size / 2.0); + } +}; + +PioneerDDJSB3.shutdown = function() { + // turn off button LEDs + var skip = [0x72, 0x1B, 0x69, 0x1E, 0x6B, 0x20, 0x6D, 0x22, 0x6F, 0x70, 0x75]; + for (var channel = 0; channel <= 10; channel++) { + for (var control = 0; control <= 127; control++) { + // skip deck toggle buttons and pad mode buttons + if (skip.indexOf(control) > -1) { + continue; + } + midi.sendShortMsg(0x90 + channel, control, 0); + } + } + + + // switch to decks 1 and 2 to turn off deck indication lights + midi.sendShortMsg(0x90, 0x72, 0x7f); + midi.sendShortMsg(0x91, 0x72, 0x7f); + + // turn off level meters + for (channel = 0; channel <= 3; channel++) { + midi.sendShortMsg(0xB0 + channel, 2, 0); + } + + PioneerDDJSB3.flasher.shutdown(); +}; + +PioneerDDJSB3.longButtonPressWait = function() { + engine.stopTimer(PioneerDDJSB3.longButtonPressTimer); + PioneerDDJSB3.longButtonPress = true; +}; + +/////////////////////////////////////////////////////////////// +// VU - Meter // +/////////////////////////////////////////////////////////////// + +PioneerDDJSB3.blinkAutodjState = 0; // new for DDJ-SB2 + +PioneerDDJSB3.vuMeterTwinkle = function() { + if (engine.getValue("[AutoDJ]", "enabled")) { + PioneerDDJSB3.blinkAutodjState = PioneerDDJSB3.blinkAutodjState + 1; + if (PioneerDDJSB3.blinkAutodjState > 3) { + PioneerDDJSB3.blinkAutodjState = 0; + } + if (PioneerDDJSB3.blinkAutodjState === 0) { + PioneerDDJSB3.valueVuMeter["[Channel1]_enabled"] = 0; + PioneerDDJSB3.valueVuMeter["[Channel3]_enabled"] = 0; + PioneerDDJSB3.valueVuMeter["[Channel2]_enabled"] = 0; + PioneerDDJSB3.valueVuMeter["[Channel4]_enabled"] = 0; + } + if (PioneerDDJSB3.blinkAutodjState === 1) { + PioneerDDJSB3.valueVuMeter["[Channel1]_enabled"] = 1; + PioneerDDJSB3.valueVuMeter["[Channel3]_enabled"] = 1; + PioneerDDJSB3.valueVuMeter["[Channel2]_enabled"] = 0; + PioneerDDJSB3.valueVuMeter["[Channel4]_enabled"] = 0; + } + if (PioneerDDJSB3.blinkAutodjState === 2) { + PioneerDDJSB3.valueVuMeter["[Channel1]_enabled"] = 1; + PioneerDDJSB3.valueVuMeter["[Channel3]_enabled"] = 1; + PioneerDDJSB3.valueVuMeter["[Channel2]_enabled"] = 1; + PioneerDDJSB3.valueVuMeter["[Channel4]_enabled"] = 1; + } + if (PioneerDDJSB3.blinkAutodjState === 3) { + PioneerDDJSB3.valueVuMeter["[Channel1]_enabled"] = 0; + PioneerDDJSB3.valueVuMeter["[Channel3]_enabled"] = 0; + PioneerDDJSB3.valueVuMeter["[Channel2]_enabled"] = 1; + PioneerDDJSB3.valueVuMeter["[Channel4]_enabled"] = 1; + } + } else { + PioneerDDJSB3.valueVuMeter["[Channel1]_enabled"] = 1; + PioneerDDJSB3.valueVuMeter["[Channel3]_enabled"] = 1; + PioneerDDJSB3.valueVuMeter["[Channel2]_enabled"] = 1; + PioneerDDJSB3.valueVuMeter["[Channel4]_enabled"] = 1; + } +}; + + +/////////////////////////////////////////////////////////////// +// AutoDJ // +/////////////////////////////////////////////////////////////// + +PioneerDDJSB3.autodjSkipNext = function(channel, control, value) { + if (value === 0) { + return; + } + if (engine.getValue("[AutoDJ]", "enabled")) { + engine.setValue("[AutoDJ]", "skip_next", true); + } +}; + +PioneerDDJSB3.autodjToggle = function(channel, control, value) { + if (value === 0) { + return; + } + if (engine.getValue("[AutoDJ]", "enabled")) { + engine.setValue("[AutoDJ]", "enabled", false); + } else { + engine.setValue("[AutoDJ]", "enabled", true); + } +}; + + +/////////////////////////////////////////////////////////////// +// CONTROL BINDING // +/////////////////////////////////////////////////////////////// + +PioneerDDJSB3.bindSamplerControlConnections = function(samplerGroup) { + engine.makeConnection(samplerGroup, "duration", PioneerDDJSB3.samplerLedsDuration); + engine.makeConnection(samplerGroup, "play", PioneerDDJSB3.samplerLedsPlay); +}; + +PioneerDDJSB3.bindDeckControlConnections = function(channelGroup, isUnbinding) { + var i, + index, + controlsToFunctions = { + "pfl": "PioneerDDJSB3.headphoneCueLed", + "keylock": "PioneerDDJSB3.keyLockLed", + "loop_enabled": "PioneerDDJSB3.autoLoopLed", + }; + + controlsToFunctions.slipEnabled = "PioneerDDJSB3.slipLed"; + + for (i = 1; i <= 8; i++) { + controlsToFunctions["hotcue_" + i + "_enabled"] = "PioneerDDJSB3.hotCueLeds"; + } + + for (index in PioneerDDJSB3.looprollIntervals) { + controlsToFunctions["beatlooproll_" + PioneerDDJSB3.looprollIntervals[index] + "_activate"] = "PioneerDDJSB3.beatlooprollLeds"; + } + + script.bindConnections(channelGroup, controlsToFunctions, isUnbinding); +}; + +PioneerDDJSB3.bindNonDeckControlConnections = function(isUnbinding) { + var samplerIndex; + + for (samplerIndex = 1; samplerIndex <= 8; samplerIndex++) { + PioneerDDJSB3.bindSamplerControlConnections("[Sampler" + samplerIndex + "]", isUnbinding); + } + + if (PioneerDDJSB3.showVumeterMaster) { + engine.connectControl("[Master]", "VuMeterL", "PioneerDDJSB3.VuMeterLeds", isUnbinding); + engine.connectControl("[Master]", "VuMeterR", "PioneerDDJSB3.VuMeterLeds", isUnbinding); + } else { + engine.connectControl("[Channel1]", "VuMeter", "PioneerDDJSB3.VuMeterLeds", isUnbinding); + engine.connectControl("[Channel2]", "VuMeter", "PioneerDDJSB3.VuMeterLeds", isUnbinding); + engine.connectControl("[Channel3]", "VuMeter", "PioneerDDJSB3.VuMeterLeds", isUnbinding); + engine.connectControl("[Channel4]", "VuMeter", "PioneerDDJSB3.VuMeterLeds", isUnbinding); + } +}; + +/////////////////////////////////////////////////////////////// +// DECK SWITCHING // +/////////////////////////////////////////////////////////////// + +PioneerDDJSB3.deckSwitchTable = { + "[Channel1]": "[Channel1]", + "[Channel2]": "[Channel2]", + "[Channel3]": "[Channel3]", + "[Channel4]": "[Channel4]" + +}; + +PioneerDDJSB3.deckShiftSwitchTable = { + "[Channel1]": "[Channel3]", + "[Channel2]": "[Channel4]", + "[Channel3]": "[Channel1]", + "[Channel4]": "[Channel2]" +}; + +PioneerDDJSB3.deckIndexTable = { + "[Channel1]": 0, + "[Channel2]": 1, + "[Channel3]": 2, + "[Channel4]": 3 +}; + +PioneerDDJSB3.initDeck = function(group) { + PioneerDDJSB3.bindDeckControlConnections(group, false); + PioneerDDJSB3.nonPadLedControl(group, PioneerDDJSB3.nonPadLeds.shiftKeyLock, PioneerDDJSB3.channelGroups[group] > 1); + PioneerDDJSB3.toggleScratch(null, null, PioneerDDJSB3.vinylModeOnStartup, null, group); +}; + + +/////////////////////////////////////////////////////////////// +// HIGH RESOLUTION MIDI INPUT HANDLERS // +/////////////////////////////////////////////////////////////// + +PioneerDDJSB3.highResMSB = { + "[Channel1]": {}, + "[Channel2]": {}, + "[Channel3]": {}, + "[Channel4]": {} +}; + +PioneerDDJSB3.deckFaderMSB = function(channel, control, value, status, group) { + PioneerDDJSB3.highResMSB[group].deckFader = value; +}; + +PioneerDDJSB3.deckFaderLSB = function(channel, control, value, status, group) { + var fullValue = (PioneerDDJSB3.highResMSB[group].deckFader << 7) + value; + + if (PioneerDDJSB3.shiftPressed && + engine.getValue(group, "volume") === 0 && + fullValue !== 0 && + engine.getValue(group, "play") === 0 + ) { + PioneerDDJSB3.chFaderStart[channel] = engine.getValue(group, "playposition"); + engine.setValue(group, "play", 1); + } else if ( + PioneerDDJSB3.shiftPressed && + engine.getValue(group, "volume") !== 0 && + fullValue === 0 && + engine.getValue(group, "play") === 1 && + PioneerDDJSB3.chFaderStart[channel] !== null + ) { + engine.setValue(group, "play", 0); + engine.setValue(group, "playposition", PioneerDDJSB3.chFaderStart[channel]); + PioneerDDJSB3.chFaderStart[channel] = null; + } + engine.setValue(group, "volume", fullValue / 0x3FFF); +}; + +/////////////////////////////////////////////////////////////// +// SINGLE MESSAGE MIDI INPUT HANDLERS // +/////////////////////////////////////////////////////////////// + +PioneerDDJSB3.beatloopRollButtons = function(channel, control, value, status, group) { + var index = control - 0x50; + engine.setValue( + PioneerDDJSB3.deckSwitchTable[group], + "beatlooproll_" + PioneerDDJSB3.looprollIntervals[index] + "_activate", + value + ); +}; + +PioneerDDJSB3.vinylButton = function(channel, control, value, status, group) { + PioneerDDJSB3.toggleScratch(channel, control, value, status, group); +}; + +PioneerDDJSB3.slipButton = function(channel, control, value, status, group) { + if (value) { + if (engine.getValue(group, "slipEnabled")) { + engine.setValue(group, "slipEnabled", false); + } else { + engine.setValue(group, "slipEnabled", true); + } + } +}; + +PioneerDDJSB3.keyLockButton = function(channel, control, value, status, group) { + if (value) { + script.toggleControl(group, "keylock"); + } +}; + +PioneerDDJSB3.shiftKeyLockButton = function(channel, control, value, status, group) { + if (value) { + var currentTempoRange = engine.getValue(group, "rateRange"); + var deckIndex = status - 0x90 + 1; + + PioneerDDJSB3.deck[deckIndex].tempoFader.skipSoftTakeover(); + + if (currentTempoRange < 0.081) { + engine.setValue(group, "rateRange", 0.16); + } else if (currentTempoRange < 0.161) { + engine.setValue(group, "rateRange", 0.50); + } else if (currentTempoRange < 0.501) { + engine.setValue(group, "rateRange", 1.0); + } else { + engine.setValue(group, "rateRange", 0.08); + } + } +}; + +PioneerDDJSB3.deck1Button = function(channel, control, value, status, group) { + if (value) { + PioneerDDJSB3.deck3Enabled = false; + var bpm = engine.getValue(group, "bpm"); + PioneerDDJSB3.updateBPM(bpm, group); + midi.sendShortMsg(0xB0, 0x02, 0x0); + } +}; + +PioneerDDJSB3.deck2Button = function(channel, control, value, status, group) { + if (value) { + PioneerDDJSB3.deck4Enabled = false; + var bpm = engine.getValue(group, "bpm"); + PioneerDDJSB3.updateBPM(bpm, group); + midi.sendShortMsg(0xB1, 0x02, 0x0); + } +}; + +PioneerDDJSB3.deck3Button = function(channel, control, value, status, group) { + if (value) { + PioneerDDJSB3.deck3Enabled = true; + midi.sendShortMsg(0xB2, 0x02, 0x0); + var bpm = engine.getValue(group, "bpm"); + PioneerDDJSB3.updateBPM(bpm, group); + } +}; + +PioneerDDJSB3.deck4Button = function(channel, control, value, status, group) { + if (value) { + PioneerDDJSB3.deck4Enabled = true; + var bpm = engine.getValue(group, "bpm"); + PioneerDDJSB3.updateBPM(bpm, group); + midi.sendShortMsg(0xB3, 0x02, 0x0); + } +}; + +PioneerDDJSB3.autoLoopButton = function(channel, control, value, status, group) { + if (value) { + if (engine.getValue(group, "loop_enabled")) { + engine.setValue(group, "reloop_toggle", true); + } else { + engine.setValue(group, "beatloop_activate", true); + } + } +}; + +PioneerDDJSB3.reloopButton = function(channel, control, value, status, group) { + if (value) { + engine.setValue(group, "reloop_toggle", true); + } +}; + +PioneerDDJSB3.loadButton = function(channel, control, value, status, group) { + if (value) { + engine.setValue(group, "LoadSelectedTrack", 1); + } +}; + +/////////////////////////////////////////////////////////////// +// HEADPHONE // +/////////////////////////////////////////////////////////////// + +PioneerDDJSB3.headphoneCueMaster = false; + +PioneerDDJSB3.masterCueButton = function(channel, control, value) { + if (value) { + PioneerDDJSB3.headphoneCueMaster = !PioneerDDJSB3.headphoneCueMaster; + PioneerDDJSB3.headphoneMasterUpdate(); + } +}; + +PioneerDDJSB3.headphoneCueButton = function(channel, control, value, status, group) { + if (value) { + script.toggleControl(group, "pfl"); + PioneerDDJSB3.headphoneMasterUpdate(); + } +}; + +PioneerDDJSB3.headphoneShiftCueButton = function(channel, control, value, status, group) { + if (value) { + script.toggleControl(PioneerDDJSB3.deckShiftSwitchTable[group], "pfl"); + PioneerDDJSB3.headphoneMasterUpdate(); + } +}; + +PioneerDDJSB3.headphoneMasterUpdate = function() { + var anyDeckCue = false; + var masterCue = PioneerDDJSB3.headphoneCueMaster; + + for (var i = 1; i <= 4; i++) { + if (engine.getValue("[Channel" + i + "]", "pfl")) { + anyDeckCue = true; + } + } + + if (masterCue) { + if (anyDeckCue) { + // 50% master 50% cue + engine.setValue("[Master]", "headMix", 0); + } else { + // 100% master + // Check if 1 is all master or all cue + engine.setValue("[Master]", "headMix", 1); + } + } else { + // 0% master + // Check if 1 is all master or all cue + engine.setValue("[Master]", "headMix", -1); + } +}; + +PioneerDDJSB3.headphoneLevel = new components.Pot({ + unshift: function() { + this.group = "[Master]"; + this.inKey = "headGain"; + this.disconnect(); + this.connect(); + }, + + shift: function() { + this.group = "[Master]"; + this.inKey = "headMix"; + this.disconnect(); + this.connect(); + }, + + inValueScale: function(input) { + // Scale so that: + // from 0/4 to 3/4 - 500 of input represents 0.0 to 1.0 + // from 3/4 - 500 to 3/4 + 500 represents 1.0 + // from 3/4 + 500 to 4/4 represents 1.0 to 5.0 + + var absoluteMax = 0xFFFF >> 2; + var inputMax = this.max; + + var zeroRange = (inputMax / absoluteMax) * 500; + + var inputQuart = Math.round(inputMax / 4); + + var fromInfToZero = (inputQuart * 3) - zeroRange; + var fromZeroToFive = (inputQuart * 3) + zeroRange; + + if (input < fromInfToZero) { + return input / fromInfToZero; + } else if (input > fromZeroToFive) { + return (input / inputMax) * 5.0; + } else { + return 1.0; + } + } +}); + +PioneerDDJSB3.masterGain = new components.Pot({ + unshift: function() { + this.group = "[Master]"; + this.inKey = "gain"; + this.disconnect(); + this.connect(); + }, + + inValueScale: function(input) { + // Scale so that: + // from 0/4 to 3/4 - 500 of input represents 0.0 to 1.0 + // from 3/4 - 500 to 3/4 + 500 represents 1.0 + // from 3/4 + 500 to 4/4 represents 1.0 to 5.0 + + var absoluteMax = 0xFFFF >> 2; + var inputMax = this.max; + + var zeroRange = (inputMax / absoluteMax) * 500; + + var inputQuart = Math.round(inputMax / 4); + + var fromInfToZero = (inputQuart * 3) - zeroRange; + var fromZeroToFive = (inputQuart * 3) + zeroRange; + + if (input < fromInfToZero) { + return input / fromInfToZero; + } else if (input > fromZeroToFive) { + return (input / inputMax) * 5.0; + } else { + return 1.0; + } + } +}); + +/////////////////////////////////////////////////////////////// +// LED HELPERS // +/////////////////////////////////////////////////////////////// + +PioneerDDJSB3.deckConverter = function(group) { + var index; + + if (typeof group === "string") { + for (index in PioneerDDJSB3.deckSwitchTable) { + if (group === PioneerDDJSB3.deckSwitchTable[index]) { + return PioneerDDJSB3.channelGroups[group]; + } + } + return null; + } + return group; +}; + +PioneerDDJSB3.padLedControl = function(deck, groupNumber, shiftGroup, ledNumber, shift, active) { + var padLedsBaseChannel = 0x97, + padLedControl = (shiftGroup ? 0x40 : 0x00) + (shift ? 0x08 : 0x00) + groupNumber + ledNumber, + midiChannelOffset = PioneerDDJSB3.deckConverter(deck); + + if (midiChannelOffset !== null) { + engine.log("Pad Led: deck: " + deck + " group: " + groupNumber + " led: " + ledNumber + " active: " + !!active); + midi.sendShortMsg( + padLedsBaseChannel + midiChannelOffset, + padLedControl, + active ? 0x7F : 0x00 + ); + } +}; + +PioneerDDJSB3.flashingPadLedControl = []; + +PioneerDDJSB3.initFlashingPadLedControl = function() { + PioneerDDJSB3.flasher.addFunction(function(flag) { + for (var i = 0; i < PioneerDDJSB3.flashingPadLedControl.length; i++) { + PioneerDDJSB3.padLedControl( + PioneerDDJSB3.flashingPadLedControl[i].deck, + PioneerDDJSB3.flashingPadLedControl[i].groupNumber, + PioneerDDJSB3.flashingPadLedControl[i].shiftGroup, + PioneerDDJSB3.flashingPadLedControl[i].ledNumber, + PioneerDDJSB3.flashingPadLedControl[i].shift, + flag + ); + } + }); +}; + +PioneerDDJSB3.startFlashingPadLedControl = function(deck, groupNumber, shiftGroup, ledNumber, shift) { + PioneerDDJSB3.flashingPadLedControl.push({ + deck: deck, + groupNumber: groupNumber, + shiftGroup: shiftGroup, + ledNumber: ledNumber, + shift: shift + }); +}; + +PioneerDDJSB3.stopFlashingPadLedControl = function(deck, groupNumber, shiftGroup, ledNumber, shift) { + var target = { + deck: deck, + groupNumber: groupNumber, + shiftGroup: shiftGroup, + ledNumber: ledNumber, + shift: shift + }; + + PioneerDDJSB3.flashingPadLedControl = _.filter(PioneerDDJSB3.flashingPadLedControl, function(obj) { return _.isEqual(obj, target); }); +}; + +PioneerDDJSB3.nonPadLedControl = function(deck, ledNumber, active) { + var nonPadLedsBaseChannel = 0x90, + midiChannelOffset = PioneerDDJSB3.deckConverter(deck); + + if (midiChannelOffset !== null) { + midi.sendShortMsg( + nonPadLedsBaseChannel + midiChannelOffset, + ledNumber, + active ? 0x7F : 0x00 + ); + } +}; + + +/////////////////////////////////////////////////////////////// +// LEDS // +/////////////////////////////////////////////////////////////// + +PioneerDDJSB3.headphoneCueLed = function(value, group) { + PioneerDDJSB3.nonPadLedControl(group, PioneerDDJSB3.nonPadLeds.headphoneCue, value); + PioneerDDJSB3.nonPadLedControl(group, PioneerDDJSB3.nonPadLeds.shiftHeadphoneCue, value); +}; + +PioneerDDJSB3.keyLockLed = function(value, group) { + PioneerDDJSB3.nonPadLedControl(group, PioneerDDJSB3.nonPadLeds.keyLock, value); + PioneerDDJSB3.nonPadLedControl(group, PioneerDDJSB3.nonPadLeds.shiftKeyLock, value); +}; + +PioneerDDJSB3.vinylLed = function(value, group) { + PioneerDDJSB3.nonPadLedControl(group, PioneerDDJSB3.nonPadLeds.vinyl, value); +}; + +PioneerDDJSB3.slipLed = function(value, group) { + PioneerDDJSB3.nonPadLedControl(group, PioneerDDJSB3.nonPadLeds.shiftVinyl, value); +}; + +PioneerDDJSB3.autoLoopLed = function(value, group) { + PioneerDDJSB3.nonPadLedControl(group, PioneerDDJSB3.nonPadLeds.autoLoop, value); +}; + +PioneerDDJSB3.samplerLedsDuration = function(value, group) { + var sampler = PioneerDDJSB3.samplerGroups[group]; + + sampler.loaded = value; + + PioneerDDJSB3.samplerLeds(sampler); +}; + +PioneerDDJSB3.samplerLedsPlay = function(value, group) { + var sampler = PioneerDDJSB3.samplerGroups[group]; + + sampler.playing = value; + + PioneerDDJSB3.samplerLeds(sampler); +}; + +PioneerDDJSB3.samplerLeds = function(sampler) { + for (var i = 0; i < sampler.channels.length; i++) { + + if (sampler.playing) { + PioneerDDJSB3.startFlashingPadLedControl(sampler.channels[i], PioneerDDJSB3.ledGroups.sampler, false, sampler.ledNumber, false); + } else { + PioneerDDJSB3.stopFlashingPadLedControl(sampler.channels[i], PioneerDDJSB3.ledGroups.sampler, false, sampler.ledNumber, false); + PioneerDDJSB3.padLedControl(sampler.channels[i], PioneerDDJSB3.ledGroups.sampler, false, sampler.ledNumber, false, sampler.loaded); + } + } +}; + +PioneerDDJSB3.beatlooprollLeds = function(value, group, control) { + var index, + padNum, + shifted; + + for (index in PioneerDDJSB3.looprollIntervals) { + if (control === "beatlooproll_" + PioneerDDJSB3.looprollIntervals[index] + "_activate") { + padNum = index; + shifted = false; + PioneerDDJSB3.padLedControl(group, PioneerDDJSB3.ledGroups.roll, true, padNum, shifted, value); + } + } +}; + +PioneerDDJSB3.hotCueLedStates = { + "[Channel1]": {states: {}, isShifted: false}, + "[Channel2]": {states: {}, isShifted: false}, + "[Channel3]": {states: {}, isShifted: false}, + "[Channel4]": {states: {}, isShifted: false}, +}; + +PioneerDDJSB3.hotCueLeds = function(value, group, control) { + var shiftedGroup = false, + padNum = null, + hotCueNum; + + for (hotCueNum = 1; hotCueNum <= 8; hotCueNum++) { + if (control === "hotcue_" + hotCueNum + "_enabled") { + padNum = (hotCueNum - 1); + + if (hotCueNum <= 4) { + PioneerDDJSB3.padLedControl(group, PioneerDDJSB3.ledGroups.hotCue, shiftedGroup, padNum, false, value); + } else { + PioneerDDJSB3.hotCueLedStates[group].states[hotCueNum] = value; + PioneerDDJSB3.updateHotCueLeds(); + } + } + } +}; + +PioneerDDJSB3.shiftListeners.push(function(group, isShifted) { + PioneerDDJSB3.hotCueLedStates[group].isShifted = isShifted; + PioneerDDJSB3.updateHotCueLeds(); +}); + +PioneerDDJSB3.updateHotCueLeds = function() { + var shiftedGroup = false; + + for (var channelIdx = 1; channelIdx <= 4; channelIdx++) { + var group = "[Channel" + channelIdx + "]"; + var channel = PioneerDDJSB3.hotCueLedStates[group]; + + + for (var hotCue = 5; hotCue <= 8; hotCue++) { + var padNum = hotCue - 1; + + if (channel.isShifted && channel.states[hotCue]) { + PioneerDDJSB3.padLedControl(group, PioneerDDJSB3.ledGroups.hotCue, shiftedGroup, padNum, false, true); + } else { + PioneerDDJSB3.padLedControl(group, PioneerDDJSB3.ledGroups.hotCue, shiftedGroup, padNum, false, false); + } + } + } +}; + +PioneerDDJSB3.VuMeterLeds = function(value, group, control) { + // The red LED lights up with MIDI values 119 (0x77) and above. That should only light up when + // the track is clipping. + if (engine.getValue(group, "PeakIndicator") === 1) { + value = 119; + } else { + // 117 was determined experimentally so the yellow LED only lights + // up when the level meter in Mixxx is in the yellow region. + value = Math.floor(value * 117); + } + + if (!(PioneerDDJSB3.twinkleVumeterAutodjOn && engine.getValue("[AutoDJ]", "enabled"))) { + var midiChannel; + if (PioneerDDJSB3.showVumeterMaster) { + if (control === "VuMeterL") { + midiChannel = 0; + } else if (control === "VuMeterR") { + midiChannel = 1; + } + // Send for deck 1 or 2 + midi.sendShortMsg(0xB0 + midiChannel, 2, value); + // Send for deck 3 or 4 + midi.sendShortMsg(0xB0 + midiChannel + 2, 2, value); + } else { + midiChannel = parseInt(group.substring(8, 9) - 1); + midi.sendShortMsg(0xB0 + midiChannel, 2, value); + } + } else { + if (group === "[Master]") { + if (control === "VuMeterL") { + PioneerDDJSB3.valueVuMeter["[Channel1]_current"] = value; + PioneerDDJSB3.valueVuMeter["[Channel3]_current"] = value; + } else { + PioneerDDJSB3.valueVuMeter["[Channel2]_current"] = value; + PioneerDDJSB3.valueVuMeter["[Channel4]_current"] = value; + } + } else { + PioneerDDJSB3.valueVuMeter[group + "_current"] = value; + } + + for (var channel = 0; channel < 4; channel++) { + var midiOut = PioneerDDJSB3.valueVuMeter["[Channel" + (channel + 1) + "]_current"]; + if (PioneerDDJSB3.valueVuMeter["[Channel" + (channel + 1) + "]_enabled"]) { + midiOut = 0; + } + if (midiOut < 5 && PioneerDDJSB3.valueVuMeter["[Channel" + (channel + 1) + "]_enabled"] === 0) { + midiOut = 5; + } + + midi.sendShortMsg( + 0xB0 + channel, + 2, + midiOut + ); + } + } +}; + + +/////////////////////////////////////////////////////////////// +// JOGWHEELS // +/////////////////////////////////////////////////////////////// + +PioneerDDJSB3.getJogWheelDelta = function(value) { // O + // The Wheel control centers on 0x40; find out how much it's moved by. + return value - 0x40; +}; + +PioneerDDJSB3.jogRingTick = function(channel, control, value, status, group) { + PioneerDDJSB3.pitchBendFromJog(group, PioneerDDJSB3.getJogWheelDelta(value)); +}; + +PioneerDDJSB3.jogRingTickShift = function(channel, control, value, status, group) { + PioneerDDJSB3.pitchBendFromJog( + PioneerDDJSB3.deckSwitchTable[group], + PioneerDDJSB3.getJogWheelDelta(value) * PioneerDDJSB3.jogwheelShiftMultiplier + ); +}; + +PioneerDDJSB3.jogPlatterTick = function(channel, control, value, status, group) { + var deck = PioneerDDJSB3.channelGroups[PioneerDDJSB3.deckSwitchTable[group]]; + if (PioneerDDJSB3.scratchMode[deck]) { + engine.scratchTick(deck + 1, PioneerDDJSB3.getJogWheelDelta(value)); + } else { + PioneerDDJSB3.pitchBendFromJog(PioneerDDJSB3.deckSwitchTable[group], PioneerDDJSB3.getJogWheelDelta(value)); + } +}; + +PioneerDDJSB3.jogPlatterTickShift = function(channel, control, value, status, group) { + var deck = PioneerDDJSB3.channelGroups[PioneerDDJSB3.deckSwitchTable[group]]; + if (PioneerDDJSB3.scratchMode[deck]) { + engine.scratchTick(deck + 1, PioneerDDJSB3.getJogWheelDelta(value)); + } else { + PioneerDDJSB3.pitchBendFromJog( + PioneerDDJSB3.deckSwitchTable[group], + PioneerDDJSB3.getJogWheelDelta(value) * PioneerDDJSB3.jogwheelShiftMultiplier + ); + } +}; + +PioneerDDJSB3.jogTouch = function(channel, control, value, status, group) { + var deck = PioneerDDJSB3.channelGroups[PioneerDDJSB3.deckSwitchTable[group]]; + + if (PioneerDDJSB3.scratchMode[deck]) { + if (value) { + engine.scratchEnable( + deck + 1, + PioneerDDJSB3.scratchSettings.jogResolution, + PioneerDDJSB3.scratchSettings.vinylSpeed, + PioneerDDJSB3.scratchSettings.alpha, + PioneerDDJSB3.scratchSettings.beta, + true + ); + } else { + engine.scratchDisable(deck + 1, true); + + if (engine.getValue(group, "slipEnabled")) { + engine.setValue(group, "slipEnabled", false); + + engine.beginTimer(250, function() { + engine.setValue(group, "slipEnabled", true); + }, true); + } + } + } +}; + +PioneerDDJSB3.toggleScratch = function(channel, control, value, status, group) { + var deck = PioneerDDJSB3.channelGroups[group]; + if (value) { + PioneerDDJSB3.scratchMode[deck] = !PioneerDDJSB3.scratchMode[deck]; + + PioneerDDJSB3.vinylLed(PioneerDDJSB3.scratchMode[deck], group); + + if (!PioneerDDJSB3.scratchMode[deck]) { + engine.scratchDisable(deck + 1, true); + } + } +}; + +PioneerDDJSB3.pitchBendFromJog = function(channel, movement) { + var group = (typeof channel === "string" ? channel : "[Channel" + channel + 1 + "]"); + + engine.setValue(group, "jog", movement / 5 * PioneerDDJSB3.jogwheelSensivity); +}; + + +/////////////////////////////////////////////////////////////// +// ROTARY SELECTOR // +/////////////////////////////////////////////////////////////// + +PioneerDDJSB3.rotarySelectorChanged = false; // new for DDJ-SB2 + +PioneerDDJSB3.getRotaryDelta = function(value) { + var delta = 0x40 - Math.abs(0x40 - value), + isCounterClockwise = value > 0x40; + + if (isCounterClockwise) { + delta *= -1; + } + return delta; +}; + +PioneerDDJSB3.rotarySelector = function(channel, control, value) { + var delta = PioneerDDJSB3.getRotaryDelta(value); + engine.setValue("[Playlist]", "SelectTrackKnob", delta); + + PioneerDDJSB3.rotarySelectorChanged = true; +}; + +PioneerDDJSB3.shiftedRotarySelector = function(channel, control, value) { + var delta = PioneerDDJSB3.getRotaryDelta(value), + f = (delta > 0 ? "SelectNextPlaylist" : "SelectPrevPlaylist"); + + engine.setValue("[Playlist]", f, Math.abs(delta)); +}; + +PioneerDDJSB3.rotarySelectorClick = function(channel, control, value) { + if (PioneerDDJSB3.rotarySelectorChanged === true) { + if (value) { + engine.setValue("[PreviewDeck1]", "LoadSelectedTrackAndPlay", true); + } else { + if (PioneerDDJSB3.jumpPreviewEnabled) { + engine.setValue("[PreviewDeck1]", "playposition", PioneerDDJSB3.jumpPreviewPosition); + } + PioneerDDJSB3.rotarySelectorChanged = false; + } + } else { + if (value) { + engine.setValue("[PreviewDeck1]", "stop", 1); + } else { + PioneerDDJSB3.rotarySelectorChanged = true; + } + } +}; + +PioneerDDJSB3.rotarySelectorShiftedClick = function(channel, control, value) { + if (value) { + engine.setValue("[Playlist]", "ToggleSelectedSidebarItem", 1); + } +}; + + +/////////////////////////////////////////////////////////////// +// FX // +/////////////////////////////////////////////////////////////// + +PioneerDDJSB3.EffectUnit = function(unitNumber) { + var eu = this; + this.isShifted = false; + this.group = "[EffectRack1_EffectUnit" + unitNumber + "]"; + engine.setValue(this.group, "show_focus", 1); + + this.buttonLights = []; + + this.EffectButtonLight = function(buttonNumber) { + this.isEnabled = false; + this.isFocused = false; + + this.midi = [0x93 + unitNumber, 0x46 + buttonNumber]; + }; + + this.EffectButtonLight.prototype.update = function() { + if (eu.isShifted) { + engine.log("isEnabled" + this.isEnabled); + midi.sendShortMsg(this.midi[0], this.midi[1], (this.isFocused ? 0x7F : 0x0)); + } else { + midi.sendShortMsg(this.midi[0], this.midi[1], (this.isEnabled ? 0x7F : 0x0)); + } + }; + + for (var i = 1; i <= 3; i++) { + this.buttonLights[i] = new this.EffectButtonLight(i); + } + + this.EffectFocusButton = function(buttonNumber) { + this.buttonNumber = buttonNumber; + + this.group = eu.group; + this.midi = [0x93 + unitNumber, 0x62 + buttonNumber]; + + components.Button.call(this); + }; + this.EffectFocusButton.prototype = new components.Button({ + input: function(channel, control, value) { + if (value) { + var focusedEffect = engine.getValue(eu.group, "focused_effect"); + + if (focusedEffect === this.buttonNumber) { + engine.setValue(eu.group, "focused_effect", 0); + } else { + engine.setValue(eu.group, "focused_effect", this.buttonNumber); + } + } + }, + outKey: "focused_effect", + output: function(value) { + eu.buttonLights[this.buttonNumber].isFocused = (value === this.buttonNumber); + eu.buttonLights[this.buttonNumber].update(); + }, + sendShifted: false, + shiftControl: false, + }); + + this.EffectEnableButton = function(buttonNumber) { + this.buttonNumber = buttonNumber; + + this.group = "[EffectRack1_EffectUnit" + unitNumber + "_Effect" + buttonNumber + "]"; + this.midi = [0x93 + unitNumber, 0x46 + buttonNumber]; + + components.Button.call(this); + }; + this.EffectEnableButton.prototype = new components.Button({ + input: function(channel, control, value) { + if (value) { + var effectEnabled = engine.getValue(this.group, "enabled"); + + if (effectEnabled) { + engine.setValue(this.group, "enabled", false); + } else { + engine.setValue(this.group, "enabled", true); + } + } + }, + outKey: "enabled", + output: function(value) { + eu.buttonLights[this.buttonNumber].isEnabled = !!value; + eu.buttonLights[this.buttonNumber].update(); + }, + sendShifted: false, + shiftControl: false, + }); + + this.button = []; + + // eslint-disable-next-line no-redeclare + for (var i = 1; i <= 3; i++) { + this.button[i] = new this.EffectEnableButton(i); + this.button[i + 3] = new this.EffectFocusButton(i); + + var effectGroup = "[EffectRack1_EffectUnit" + unitNumber + "_Effect" + i + "]"; + engine.softTakeover(effectGroup, "meta", true); + engine.softTakeover(eu.group, "mix", true); + } + + this.knob = new components.Pot({ + unshift: function() { + this.input = function(channel, control, value) { + value = (this.MSB << 7) + value; + + var focusedEffect = engine.getValue(eu.group, "focused_effect"); + if (focusedEffect === 0) { + engine.setParameter(eu.group, "mix", value / this.max); + } else { + var effectGroup = "[EffectRack1_EffectUnit" + unitNumber + "_Effect" + focusedEffect + "]"; + engine.setParameter(effectGroup, "meta", value / this.max); + } + }; + }, + }); + + this.knobSoftTakeoverHandler = engine.makeConnection(eu.group, "focused_effect", function(value) { + if (value === 0) { + engine.softTakeoverIgnoreNextValue(eu.group, "mix"); + } else { + var effectGroup = "[EffectRack1_EffectUnit" + unitNumber + "_Effect" + value + "]"; + engine.softTakeoverIgnoreNextValue(effectGroup, "meta"); + } + }); + + PioneerDDJSB3.shiftListeners.push(function(group, shifted) { + if (PioneerDDJSB3.channelsToEffectUnitNumber[group] === unitNumber) { + eu.setShift(shifted); + } + }); +}; + +PioneerDDJSB3.EffectUnit.prototype.setShift = function(value) { + this.isShifted = value; + for (var i = 1; i <= 3; i++) { + this.buttonLights[i].update(); + } +}; + +/////////////////////////////////////////////////////////////// +// SLICER // +/////////////////////////////////////////////////////////////// + +PioneerDDJSB3.Slicer = function(group, midiOutputOp, midiOutputBeatLeds) { + var _this = this; + + this.group = group; + + this.midiOutputOp = midiOutputOp; + this.midiOutputBeatLeds = midiOutputBeatLeds; + + this.beatPositions = []; + + this.currentBeat = 0; + + this.latestPlayPosition = 0.0; + + this.connections = []; + + this.buttons = []; + + for (var i = 1; i <= midiOutputBeatLeds.length; i++) { + (function(beat) { + _this.buttons[beat] = function(channel, control, value) { + if (value) { + var beatPosition = _this.beatPositions[beat - 1]; + + if (beatPosition) { + _this.moveToSample(beatPosition.sample); + } + } + }; + })(i); + } + + this.calculateBeats(); + this.getFirstBeat(); + this.generateBeatPositions(); + this.midiOuputUpdate(); + + this.connections.push(engine.makeConnection(group, "playposition", function(value, group, control) { + _this.playPositionChange(value, group, control); + })); + + this.connections.push(engine.makeConnection(group, "track_samples", function() { + _this.calculateBeats(); + _this.getFirstBeat(); + _this.generateBeatPositions(); + _this.midiOuputUpdate(); + })); + + this.connections.push(engine.makeConnection(group, "bpm", function() { + _this.calculateBeats(); + _this.generateBeatPositions(); + _this.midiOuputUpdate(); + })); +}; + +PioneerDDJSB3.Slicer.prototype.PLAY_POSITION_FLOOR = 0; +PioneerDDJSB3.Slicer.prototype.PLAY_POSITION_RANGE = 1 - PioneerDDJSB3.Slicer.prototype.PLAY_POSITION_FLOOR; + +PioneerDDJSB3.Slicer.prototype.shutdown = function() { + for (var i = 0; i < this.midiOutputBeatLeds.length; i++) { + var ledMidi = this.midiOutputBeatLeds[i]; + + if (ledMidi) { + midi.sendShortMsg(this.midiOutputOp, ledMidi, 0x0); + } + } + // eslint-disable-next-line no-redeclare + for (var i = 0; i < this.connections.length; i++) { + this.connections[i].disconnect(); + } +}; + +PioneerDDJSB3.Slicer.prototype.calculateBeats = function() { + var trackSamplesPerSecond = engine.getValue(this.group, "track_samplerate"); + this.trackSamples = engine.getValue(this.group, "track_samples"); + + var bpm = engine.getValue(this.group, "bpm"); + var bps = bpm / 60.0; + + this.samplesPerBeat = (trackSamplesPerSecond * 2) / bps; + this.positionPerBeat = (this.PLAY_POSITION_RANGE * this.samplesPerBeat) / this.trackSamples; + this.playPositionDelta = (this.PLAY_POSITION_RANGE * this.samplesPerBeat) / (this.trackSamples * 20); +}; + +PioneerDDJSB3.Slicer.prototype.generateBeatPositions = function() { + this.beatPositions = []; + + for (var i = 0; i < this.midiOutputBeatLeds.length; i++) { + var sample = this.firstBeatSample + (i * this.samplesPerBeat); + var nextSample = this.firstBeatSample + ((i + 1) * this.samplesPerBeat); + + if (sample < this.trackSamples) { + var bp = { + sample: sample, + positionIn: (this.PLAY_POSITION_RANGE * sample - 1) / this.trackSamples, + positionOut: (this.PLAY_POSITION_RANGE * nextSample - 1) / this.trackSamples, + }; + + this.beatPositions.push(bp); + } + } + +}; + +PioneerDDJSB3.Slicer.prototype.getFirstBeat = function() { + this.currentBeat = 0; + + var oldCuePosition = engine.getValue(this.group, "hotcue_8_position"); + var oldQuantize = engine.getValue(this.group, "quantize"); + + this.oldCuePosition = oldCuePosition; + + engine.setValue(this.group, "quantize", true); + engine.setValue(this.group, "hotcue_8_set", true); + + this.firstBeatSample = engine.getValue(this.group, "hotcue_8_position"); + + if (oldCuePosition !== -1) { + engine.setValue(this.group, "hotcue_8_position", oldCuePosition); + } else { + engine.setValue(this.group, "hotcue_8_clear", true); + } + + engine.setValue(this.group, "quantize", oldQuantize); +}; + +PioneerDDJSB3.Slicer.prototype.moveToSample = function(sample) { + var oldCuePosition = engine.getValue(this.group, "hotcue_8_position"); + + engine.setValue(this.group, "hotcue_8_set", true); + engine.setValue(this.group, "hotcue_8_position", sample); + engine.setValue(this.group, "hotcue_8_goto", true); + + if (oldCuePosition !== -1) { + engine.setValue(this.group, "hotcue_8_position", oldCuePosition); + } else { + engine.setValue(this.group, "hotcue_8_clear", true); + } +}; + +PioneerDDJSB3.Slicer.prototype.playPositionChange = function(value) { + var playPositionDelta = Math.abs(this.latestPlayPosition - value); + var oldCurrentBeat = this.currentBeat; + + if (playPositionDelta > this.playPositionDelta) { + this.latestPlayPosition = value; + var found = false; + + for (var i = 0; i < this.beatPositions.length; i++) { + var beatPosition = this.beatPositions[i]; + + if (value >= beatPosition.positionIn && value < beatPosition.positionOut) { + this.currentBeat = i; + found = true; + } + } + + if (!found) { + this.getFirstBeat(); + this.generateBeatPositions(); + } + + if (oldCurrentBeat !== this.currentBeat) { + this.midiOuputUpdate(); + } + } +}; + +PioneerDDJSB3.Slicer.prototype.midiOuputUpdate = function() { + var onLedMidi = this.midiOutputBeatLeds[this.currentBeat]; + + for (var i = 0; i < this.midiOutputBeatLeds.length; i++) { + var ledMidi = this.midiOutputBeatLeds[i]; + + if (ledMidi !== onLedMidi) { + midi.sendShortMsg(this.midiOutputOp, ledMidi, 0x0); + } + } + + if (onLedMidi === 0 || onLedMidi) { + midi.sendShortMsg(this.midiOutputOp, onLedMidi, 0x7F); + } +}; diff --git a/res/controllers/Pioneer-DDJ-SB3.midi.xml b/res/controllers/Pioneer-DDJ-SB3.midi.xml new file mode 100755 index 00000000000..f222e7d8cd9 --- /dev/null +++ b/res/controllers/Pioneer-DDJ-SB3.midi.xml @@ -0,0 +1,5100 @@ + + + + Pioneer DDJ-SB3 + Dancephy.com + Mapping file for the Pioneer DDJ-SB3 controller. Version 1.1.0. + + + + + + + + + + + + [Channel1] + PioneerDDJSB3.deck[1].playButton.input + Toggles Play/Pause Deck 1, Button: left PLAY (Deck 1 active) + 0x90 + 0x0B + + + + + + [Channel2] + PioneerDDJSB3.deck[2].playButton.input + Toggles Play/Pause Deck 2, Button: right PLAY (Deck 2 active) + 0x91 + 0x0B + + + + + + [Channel3] + PioneerDDJSB3.deck[3].playButton.input + Toggles Play/Pause Deck 3, Button: left PLAY (Deck 3 active) + 0x92 + 0x0B + + + + + + [Channel4] + PioneerDDJSB3.deck[4].playButton.input + Toggles Play/Pause Deck 4, Button: right PLAY (Deck 4 active) + 0x93 + 0x0B + + + + + + [Channel1] + PioneerDDJSB3.deck[1].playButton.input + Reverse play Deck 1, Button: SHIFT left PLAY (Deck 1 active) + 0x90 + 0x47 + + + + + + [Channel2] + PioneerDDJSB3.deck[2].playButton.input + Reverse play Deck 2, Button: SHIFT right PLAY (Deck 2 active) + 0x91 + 0x47 + + + + + + [Channel3] + PioneerDDJSB3.deck[3].playButton.input + Reverse play Deck 3, Button: SHIFT left PLAY (Deck 3 active) + 0x92 + 0x47 + + + + + + [Channel4] + PioneerDDJSB3.deck[4].playButton.input + Reverse play Deck 4, Button: SHIFT right PLAY (Deck 4 active) + 0x93 + 0x47 + + + + + + [Channel1] + PioneerDDJSB3.deck[1].cueButton.input + Cue Deck 1, Button: left CUE (Deck 1 active) + 0x90 + 0x0C + + + + + + [Channel2] + PioneerDDJSB3.deck[2].cueButton.input + Cue Deck 2, Button: right CUE (Deck 2 active) + 0x91 + 0x0C + + + + + + [Channel3] + PioneerDDJSB3.deck[3].cueButton.input + Cue Deck 3, Button: left CUE (Deck 3 active) + 0x92 + 0x0C + + + + + + [Channel4] + PioneerDDJSB3.deck[4].cueButton.input + Cue Deck 4, Button: right CUE (Deck 4 active) + 0x93 + 0x0C + + + + + + [Channel1] + PioneerDDJSB3.deck[1].cueButton.input + Break Deck 1, Button: left SHIFT CUE (Deck 1 active) + 0x90 + 0x48 + + + + + + [Channel2] + PioneerDDJSB3.deck[2].cueButton.input + Break Deck 2, Button: right SHIFT CUE (Deck 2 active) + 0x91 + 0x48 + + + + + + [Channel3] + PioneerDDJSB3.deck[3].cueButton.input + Break Deck 3, Button: left SHIFT CUE (Deck 3 active) + 0x92 + 0x48 + + + + + + [Channel4] + PioneerDDJSB3.deck[4].cueButton.input + Break Deck 4, Button: right SHIFT CUE (Deck 4 active) + 0x93 + 0x48 + + + + + + [Channel1] + PioneerDDJSB3.deck[1].syncButton.input + Sync Deck 1, Button: left SYNC (Deck 1 active) + 0x90 + 0x58 + + + + + + [Channel2] + PioneerDDJSB3.deck[2].syncButton.input + Sync Deck 2, Button: right SYNC (Deck 2 active) + 0x91 + 0x58 + + + + + + [Channel3] + PioneerDDJSB3.deck[3].syncButton.input + Sync Deck 3, Button: left SYNC (Deck 3 active) + 0x92 + 0x58 + + + + + + [Channel4] + PioneerDDJSB3.deck[4].syncButton.input + Sync Deck 4, Button: right SYNC (Deck 4 active) + 0x93 + 0x58 + + + + + + [Channel1] + PioneerDDJSB3.deck[1].syncButton.input + Quantize Deck 1, Button: left SHIFT SYNC (Deck 1 active) + 0x90 + 0x5C + + + + + + [Channel2] + PioneerDDJSB3.deck[2].syncButton.input + Quantize Deck 2, Button: right SHIFT SYNC (Deck 2 active) + 0x91 + 0x5C + + + + + + [Channel3] + PioneerDDJSB3.deck[3].syncButton.input + Quantize Deck 3, Button: left SHIFT SYNC (Deck 3 active) + 0x92 + 0x5C + + + + + + [Channel4] + PioneerDDJSB3.deck[4].syncButton.input + Quantize Deck 4, Button: right SHIFT SYNC (Deck 4 active) + 0x93 + 0x5C + + + + + + [Channel1] + PioneerDDJSB3.jogPlatterTick + Jog (Vinyl Mode) Deck 1, left JOGDIAL (Deck 1 active) + 0xB0 + 0x22 + + + + + + [Channel2] + PioneerDDJSB3.jogPlatterTick + Jog (Vinyl Mode) Deck 2, right JOGDIAL (Deck 2 active) + 0xB1 + 0x22 + + + + + + [Channel3] + PioneerDDJSB3.jogPlatterTick + Jog (Vinyl Mode) Deck 3, left JOGDIAL (Deck 3 active) + 0xB2 + 0x22 + + + + + + [Channel4] + PioneerDDJSB3.jogPlatterTick + Jog (Vinyl Mode) Deck 4, right JOGDIAL (Deck 4 active) + 0xB3 + 0x22 + + + + + + [Channel1] + PioneerDDJSB3.jogPlatterTick + Jog (no Vinyl Mode) Deck 1, left JOGDIAL (Deck 1 active) + 0xB0 + 0x23 + + + + + + [Channel2] + PioneerDDJSB3.jogPlatterTick + Jog (no Vinyl Mode) Deck 2, right JOGDIAL (Deck 2 active) + 0xB1 + 0x23 + + + + + + [Channel3] + PioneerDDJSB3.jogPlatterTick + Jog (no Vinyl Mode) Deck 3, left JOGDIAL (Deck 3 active) + 0xB2 + 0x23 + + + + + + [Channel4] + PioneerDDJSB3.jogPlatterTick + Jog (no Vinyl Mode) Deck 4, right JOGDIAL (Deck 4 active) + 0xB3 + 0x23 + + + + + + [Channel1] + PioneerDDJSB3.jogPlatterTickShift + Jog fast Deck 1, SHIFT left JOGDIAL (Deck 1 active) + 0xB0 + 0x1F + + + + + + [Channel2] + PioneerDDJSB3.jogPlatterTickShift + Jog fast Deck 2, SHIFT right JOGDIAL (Deck 2 active) + 0xB1 + 0x1F + + + + + + [Channel3] + PioneerDDJSB3.jogPlatterTickShift + Jog fast Deck 3, SHIFT left JOGDIAL (Deck 3 active) + 0xB2 + 0x1F + + + + + + [Channel4] + PioneerDDJSB3.jogPlatterTickShift + Jog fast Deck 4, SHIFT right JOGDIAL (Deck 4 active) + 0xB3 + 0x1F + + + + + + [Channel1] + PioneerDDJSB3.jogTouch + Jog touch (Vinyl Mode) Deck 1, left JOGDIAL (Deck 1 active) + 0x90 + 0x36 + + + + + + [Channel2] + PioneerDDJSB3.jogTouch + Jog touch (Vinyl Mode) Deck 2, right JOGDIAL (Deck 2 active) + 0x91 + 0x36 + + + + + + [Channel3] + PioneerDDJSB3.jogTouch + Jog touch (Vinyl Mode) Deck 3, left JOGDIAL (Deck 3 active) + 0x92 + 0x36 + + + + + + [Channel4] + PioneerDDJSB3.jogTouch + Jog touch (Vinyl Mode) Deck 4, right JOGDIAL (Deck 4 active) + 0x93 + 0x36 + + + + + + [Channel1] + PioneerDDJSB3.jogTouch + Jog touch (No Vinyl Mode) Deck 1, left JOGDIAL (Deck 1 active) + 0x90 + 0x35 + + + + + + [Channel2] + PioneerDDJSB3.jogTouch + Jog touch (No Vinyl Mode) Deck 2, right JOGDIAL (Deck 2 active) + 0x91 + 0x35 + + + + + + [Channel3] + PioneerDDJSB3.jogTouch + Jog touch (No Vinyl Mode) Deck 3, left JOGDIAL (Deck 3 active) + 0x92 + 0x35 + + + + + + [Channel4] + PioneerDDJSB3.jogTouch + Jog touch (No Vinyl Mode) Deck 4, right JOGDIAL (Deck 4 active) + 0x93 + 0x35 + + + + + + [Channel1] + PioneerDDJSB3.jogTouch + Jog shift touch Deck 4, SHIFT right JOGDIAL (Deck 1 active) + 0x90 + 0x67 + + + + + + [Channel2] + PioneerDDJSB3.jogTouch + Jog shift touch Deck 2, SHIFT right JOGDIAL (Deck 2 active) + 0x91 + 0x67 + + + + + + [Channel3] + PioneerDDJSB3.jogTouch + Jog shift touch Deck 3, SHIFT left JOGDIAL (Deck 3 active) + 0x92 + 0x67 + + + + + + [Channel4] + PioneerDDJSB3.jogTouch + Jog shift touch Deck 4, SHIFT right JOGDIAL (Deck 4 active) + 0x93 + 0x67 + + + + + + [Channel1] + PioneerDDJSB3.jogRingTick + Jog ring Deck 1, left JOGDIALSIDE (Deck 1 active) + 0xB0 + 0x21 + + + + + + [Channel2] + PioneerDDJSB3.jogRingTick + Jog ring Deck 2, right JOGDIALSIDE (Deck 2 active) + 0xB1 + 0x21 + + + + + + [Channel3] + PioneerDDJSB3.jogRingTick + Jog ring Deck 3, left JOGDIALSIDE (Deck 3 active) + 0xB2 + 0x21 + + + + + + [Channel4] + PioneerDDJSB3.jogRingTick + Jog ring Deck 4, right JOGDIALSIDE (Deck 4 active) + 0xB3 + 0x21 + + + + + + [Channel1] + PioneerDDJSB3.jogRingTickShift + Jog ring shift Deck 1, SHIFT left JOGDIALSIDE (Deck 1 active) + 0xB0 + 0x26 + + + + + + [Channel2] + PioneerDDJSB3.jogRingTickShift + Jog ring shift Deck 2, SHIFT right JOGDIALSIDE (Deck 2 active) + 0xB1 + 0x26 + + + + + + [Channel3] + PioneerDDJSB3.jogRingTickShift + Jog ring shift Deck 3, SHIFT left JOGDIALSIDE (Deck 3 active) + 0xB2 + 0x26 + + + + + + [Channel4] + PioneerDDJSB3.jogRingTickShift + Jog ring shift Deck 4, SHIFT right JOGDIALSIDE (Deck 4 active) + 0xB3 + 0x26 + + + + + + [Channel1] + PioneerDDJSB3.deck[1].tempoFader.inputMSB + Tempo slider Deck 1 (MSB), Slider: left TEMPO (Deck 1 active) + 0xB0 + 0x00 + + + + + + [Channel1] + PioneerDDJSB3.deck[1].tempoFader.inputLSB + Tempo slider Deck 1 (LSB), Slider: left TEMPO (Deck 1 active) + 0xB0 + 0x20 + + + + + + [Channel2] + PioneerDDJSB3.deck[2].tempoFader.inputMSB + Tempo slider Deck 2 (MSB), Slider: right TEMPO (Deck 2 active) + 0xB1 + 0x00 + + + + + + [Channel2] + PioneerDDJSB3.deck[2].tempoFader.inputLSB + Tempo slider Deck 2 (LSB), Slider: right TEMPO (Deck 2 active) + 0xB1 + 0x20 + + + + + + [Channel3] + PioneerDDJSB3.deck[3].tempoFader.inputMSB + Tempo slider Deck 3 (MSB), Slider: left TEMPO (Deck 3 active) + 0xB2 + 0x00 + + + + + + [Channel3] + PioneerDDJSB3.deck[3].tempoFader.inputLSB + Tempo slider Deck 3 (LSB), Slider: left TEMPO (Deck 3 active) + 0xB2 + 0x20 + + + + + + [Channel4] + PioneerDDJSB3.deck[4].tempoFader.inputMSB + Tempo slider Deck 4 (MSB), Slider: right TEMPO (Deck 4 active) + 0xB3 + 0x00 + + + + + + [Channel4] + PioneerDDJSB3.deck[4].tempoFader.inputLSB + Tempo slider Deck 4 (LSB), Slider: right TEMPO (Deck 4 active) + 0xB3 + 0x20 + + + + + + [Channel1] + PioneerDDJSB3.deck[1].tempoFader.inputMSB + Tempo slider Deck 1 (MSB), Slider: SHIFT left TEMPO (Deck 1 active) + 0xB0 + 0x05 + + + + + + [Channel1] + PioneerDDJSB3.deck[1].tempoFader.inputLSB + Tempo slider Deck 1 (LSB), Slider: SHIFT left TEMPO (Deck 1 active) + 0xB0 + 0x25 + + + + + + [Channel2] + PioneerDDJSB3.deck[2].tempoFader.inputMSB + Tempo slider Deck 2 (MSB), Slider: SHIFT right TEMPO (Deck 2 active) + 0xB1 + 0x05 + + + + + + [Channel2] + PioneerDDJSB3.deck[2].tempoFader.inputLSB + Tempo slider Deck 2 (LSB), Slider: SHIFT right TEMPO (Deck 2 active) + 0xB1 + 0x25 + + + + + + [Channel3] + PioneerDDJSB3.deck[3].tempoFader.inputMSB + Tempo slider Deck 3 (MSB), Slider: SHIFT left TEMPO (Deck 3 active) + 0xB2 + 0x05 + + + + + + [Channel3] + PioneerDDJSB3.deck[3].tempoFader.inputLSB + Tempo slider Deck 3 (LSB), Slider: SHIFT left TEMPO (Deck 3 active) + 0xB2 + 0x25 + + + + + + [Channel4] + PioneerDDJSB3.deck[4].tempoFader.inputMSB + Tempo slider Deck 4 (MSB), Slider: SHIFT right TEMPO (Deck 4 active) + 0xB3 + 0x05 + + + + + + [Channel4] + PioneerDDJSB3.deck[4].tempoFader.inputLSB + Tempo slider Deck 4 (LSB), Slider: SHIFT right TEMPO (Deck 4 active) + 0xB3 + 0x25 + + + + + + [Channel1] + PioneerDDJSB3.vinylButton + Vinyl Deck 1, Button: left VINYL (Deck 1 active) + 0x90 + 0x17 + + + + + + [Channel2] + PioneerDDJSB3.vinylButton + Vinyl Deck 2, Button: right VINYL (Deck 2 active) + 0x91 + 0x17 + + + + + + [Channel3] + PioneerDDJSB3.vinylButton + Vinyl Deck 3, Button: left VINYL (Deck 3 active) + 0x92 + 0x17 + + + + + + [Channel4] + PioneerDDJSB3.vinylButton + Vinyl Deck 4, Button: right VINYL (Deck 4 active) + 0x93 + 0x17 + + + + + + [Channel1] + PioneerDDJSB3.slipButton + Slip Deck 1, Button: SHIFT left VINYL (Deck 1 active) + 0x90 + 0x40 + + + + + + [Channel2] + PioneerDDJSB3.slipButton + Slip Deck 2, Button: SHIFT right VINYL (Deck 2 active) + 0x91 + 0x40 + + + + + + [Channel3] + PioneerDDJSB3.slipButton + Slip Deck 3, Button: SHIFT left VINYL (Deck 3 active) + 0x92 + 0x40 + + + + + + [Channel4] + PioneerDDJSB3.slipButton + Slip Deck 4, Button: SHIFT right VINYL (Deck 4 active) + 0x93 + 0x40 + + + + + + [Channel1] + PioneerDDJSB3.keyLockButton + Key lock Deck 1, Button: left KEYLOCK (Deck 1 active) + 0x90 + 0x1A + + + + + + [Channel2] + PioneerDDJSB3.keyLockButton + Key lock Deck 2, Button: right KEYLOCK (Deck 2 active) + 0x91 + 0x1A + + + + + + [Channel3] + PioneerDDJSB3.keyLockButton + Key lock Deck 3, Button: left KEYLOCK (Deck 3 active) + 0x92 + 0x1A + + + + + + [Channel4] + PioneerDDJSB3.keyLockButton + Key lock Deck 4, Button: right KEYLOCK (Deck 4 active) + 0x93 + 0x1A + + + + + + [Channel1] + PioneerDDJSB3.shiftKeyLockButton + Shift KeyLock, Button: left SHIFT & KeyLock(Deck 1 active) + 0x90 + 0x60 + + + + + + [Channel2] + PioneerDDJSB3.shiftKeyLockButton + Shift KeyLock, Button: right SHIFT & KeyLock(Deck 2 active) + 0x91 + 0x60 + + + + + + [Channel3] + PioneerDDJSB3.shiftKeyLockButton + Shift KeyLock, Button: left SHIFT & KeyLock(Deck 3 active) + 0x92 + 0x60 + + + + + + [Channel4] + PioneerDDJSB3.shiftKeyLockButton + Shift KeyLock, Button: right SHIFT & KeyLock(Deck 4 active) + 0x93 + 0x60 + + + + + + [Channel1] + PioneerDDJSB3.deck[1].shiftButton + Shift Deck 1, Button: left SHIFT (Deck 1 active) + 0x90 + 0x3F + + + + + + [Channel2] + PioneerDDJSB3.deck[2].shiftButton + Shift Deck 2, Button: right SHIFT (Deck 2 active) + 0x91 + 0x3F + + + + + + [Channel3] + PioneerDDJSB3.deck[3].shiftButton + Shift Deck 3, Button: left SHIFT (Deck 3 active) + 0x92 + 0x3F + + + + + + [Channel4] + PioneerDDJSB3.deck[4].shiftButton + Shift Deck 4, Button: right SHIFT (Deck 4 active) + 0x93 + 0x3F + + + + + + [Channel1] + PioneerDDJSB3.deck1Button + Toggles Deck 1 Button + 0x90 + 0x72 + + + + + + [Channel3] + PioneerDDJSB3.deck3Button + Toggles Deck 3 Button + 0x92 + 0x72 + + + + + + [Channel2] + PioneerDDJSB3.deck2Button + Toggles Deck 2 Button + 0x91 + 0x72 + + + + + + [Channel4] + PioneerDDJSB3.deck4Button + Toggles Deck 4 Button + 0x93 + 0x72 + + + + + + [AutoDJ] + PioneerDDJSB3.autodjSkipNext + AutoDJ skip next, Button: SHIFT & DECK3 + 0x90 + 0x73 + + + + + + [AutoDJ] + PioneerDDJSB3.autodjToggle + Toggle AutoDJ On/Off, Button: SHIFT DECK4 + 0x91 + 0x73 + + + + + + [AutoDJ] + PioneerDDJSB3.autodjSkipNext + AutoDJ skip next, Button: SHIFT DECK3 + 0x92 + 0x73 + + + + + + [AutoDJ] + PioneerDDJSB3.autodjToggle + Toggle AutoDJ On/Off, Button: SHIFT DECK4 + 0x93 + 0x73 + + + + + + [Channel1] + PioneerDDJSB3.deckFaderMSB + Channel fader Deck 1 (MSB), Slider: left CHANNELFADER (Deck 1 active) + 0xB0 + 0x13 + + + + + + [Channel1] + PioneerDDJSB3.deckFaderLSB + Channel fader Deck 1 (LSB), Slider: left CHANNELFADER (Deck 1 active) + 0xB0 + 0x33 + + + + + + [Channel2] + PioneerDDJSB3.deckFaderMSB + Channel fader Deck 2 (MSB), Slider: right CHANNELFADER (Deck 2 active) + 0xB1 + 0x13 + + + + + + [Channel2] + PioneerDDJSB3.deckFaderLSB + Channel fader Deck 2 (LSB), Slider: right CHANNELFADER (Deck 2 active) + 0xB1 + 0x33 + + + + + + [Channel3] + PioneerDDJSB3.deckFaderMSB + Channel fader Deck 3 (MSB), Slider: left CHANNELFADER (Deck 3 active) + 0xB2 + 0x13 + + + + + + [Channel3] + PioneerDDJSB3.deckFaderLSB + Channel fader Deck 3 (LSB), Slider: left CHANNELFADER (Deck 3 active) + 0xB2 + 0x33 + + + + + + [Channel4] + PioneerDDJSB3.deckFaderMSB + Channel fader Deck 4 (MSB), Slider: right CHANNELFADER (Deck 4 active) + 0xB3 + 0x13 + + + + + + [Channel4] + PioneerDDJSB3.deckFaderLSB + Channel fader Deck 4 (LSB), Slider: right CHANNELFADER (Deck 4 active) + 0xB3 + 0x33 + + + + + + [Channel1] + PioneerDDJSB3.deck[1].gainKnob.inputMSB + Gain Deck 1 (MSB), Knob: left TRIM (Deck 1 active) + 0xB0 + 0x04 + + + + + + [Channel1] + PioneerDDJSB3.deck[1].gainKnob.inputLSB + Gain Deck 1 (LSB), Knob: left TRIM (Deck 1 active) + 0xB0 + 0x24 + + + + + + [Channel2] + PioneerDDJSB3.deck[2].gainKnob.inputMSB + Gain Deck 2 (MSB), Knob: right TRIM (Deck 2 active) + 0xB1 + 0x04 + + + + + + [Channel2] + PioneerDDJSB3.deck[2].gainKnob.inputLSB + Gain Deck 2 (LSB), Knob: right TRIM (Deck 2 active) + 0xB1 + 0x24 + + + + + + [Channel3] + PioneerDDJSB3.deck[3].gainKnob.inputMSB + Gain Deck 3 (MSB), Knob: left TRIM (Deck 3 active) + 0xB2 + 0x04 + + + + + + [Channel3] + PioneerDDJSB3.deck[3].gainKnob.inputLSB + Gain Deck 3 (LSB), Knob: left TRIM (Deck 3 active) + 0xB2 + 0x24 + + + + + + [Channel4] + PioneerDDJSB3.deck[4].gainKnob.inputMSB + Gain Deck 4 (MSB), Knob: right TRIM (Deck 4 active) + 0xB3 + 0x04 + + + + + + [Channel4] + PioneerDDJSB3.deck[4].gainKnob.inputLSB + Gain Deck 4 (LSB), Knob: right TRIM (Deck 4 active) + 0xB3 + 0x24 + + + + + + [Channel1] + PioneerDDJSB3.deck[1].quickEffectKnob.inputMSB + Filter Deck 1 (MSB), Knob: left FILTER (Deck 1 active) + 0xB6 + 0x17 + + + + + + [Channel1] + PioneerDDJSB3.deck[1].quickEffectKnob.inputLSB + Filter Deck 1 (LSB), Knob: left FILTER (Deck 1 active) + 0xB6 + 0x37 + + + + + + [Channel2] + PioneerDDJSB3.deck[2].quickEffectKnob.inputMSB + Filter Deck 2 (MSB), Knob: right FILTER (Deck 2 active) + 0xB6 + 0x18 + + + + + + [Channel2] + PioneerDDJSB3.deck[2].quickEffectKnob.inputLSB + Filter Deck 2 (LSB), Knob: right FILTER (Deck 2 active) + 0xB6 + 0x38 + + + + + + [Channel3] + PioneerDDJSB3.deck[3].quickEffectKnob.inputMSB + Filter Deck 3 (MSB), Knob: left FILTER (Deck 3 active) + 0xB6 + 0x19 + + + + + + [Channel3] + PioneerDDJSB3.deck[3].quickEffectKnob.inputLSB + Filter Deck 3 (LSB), Knob: left FILTER (Deck 3 active) + 0xB6 + 0x39 + + + + + + [Channel4] + PioneerDDJSB3.deck[4].quickEffectKnob.inputMSB + Filter Deck 4 (MSB), Knob: right FILTER (Deck 4 active) + 0xB6 + 0x1A + + + + + + [Channel4] + PioneerDDJSB3.deck[4].quickEffectKnob.inputLSB + Filter Deck 4 (LSB), Knob: right FILTER (Deck 4 active) + 0xB6 + 0x3A + + + + + + [Playlist] + PioneerDDJSB3.rotarySelector + Browser rotate, Knob: BROWSER + 0xB6 + 0x40 + + + + + + [Playlist] + PioneerDDJSB3.shiftedRotarySelector + Shift Browser rotate, Knob: BROWSER + 0xB6 + 0x64 + + + + + + [PreviewDeck1] + PioneerDDJSB3.rotarySelectorClick + Preview of selected song, stop preview if no rotation between next press (Down: Load and start -- Up: Jump to position 30%), Knob: BROWSER + 0x96 + 0x41 + + + + + + [Playlist] + PioneerDDJSB3.rotarySelectorShiftedClick + Open/close selected left List, Knob: SHIFT & BROWSER + 0x96 + 0x42 + + + + + + [Channel1] + PioneerDDJSB3.loadButton + Load selected Deck 1, Button: left LOAD (Deck 1 active) + 0x96 + 0x46 + + + + + + [EffectRack1] + show + Toggle Effect view, Button: SHIFT & left LOAD (Deck 1 active) + 0x96 + 0x58 + + + + + + [Channel3] + PioneerDDJSB3.loadButton + Load selected Deck 3, Button: left LOAD (Deck 3 active) + 0x96 + 0x48 + + + + + + [EffectRack1] + show + Toggle Effect view, Button: SHIFT & left LOAD (Deck 3 active) + 0x96 + 0x60 + + + + + + [Channel2] + PioneerDDJSB3.loadButton + Load selected Deck 2, Button: right LOAD (Deck 2 active) + 0x96 + 0x47 + + + + + + [Samplers] + show_samplers + Toggle Sampler view, Button: SHIFT & right LOAD (Deck 2 active) + 0x96 + 0x59 + + + + + + [Channel4] + PioneerDDJSB3.loadButton + Load selected Deck 4, Button: right LOAD (Deck 4 active) + 0x96 + 0x49 + + + + + + [Samplers] + show_samplers + Toggle Sampler view, Button: SHIFT & right LOAD (Deck 4 active) + 0x96 + 0x61 + + + + + + [EffectRack1_EffectUnit1] + PioneerDDJSB3.effectUnit[1].button[1].input + FX1-1 (Deck1), Button: left FX1-1 + 0x94 + 0x47 + + + + + + [EffectRack1_EffectUnit1] + PioneerDDJSB3.effectUnit[1].button[4].input + Shift FX1-1, Button: left SHIFT & FX1-1 + 0x94 + 0x63 + + + + + + [EffectRack1_EffectUnit1] + PioneerDDJSB3.effectUnit[1].button[2].input + FX1-2 (Head), Button: left FX1-2 + 0x94 + 0x48 + + + + + + [EffectRack1_EffectUnit1] + PioneerDDJSB3.effectUnit[1].button[5].input + Shift FX1-2 (Head), Button: left SHIFT & FX1-2 + 0x94 + 0x64 + + + + + + [EffectRack1_EffectUnit1] + PioneerDDJSB3.effectUnit[1].button[3].input + FX1-3 (Deck2), Button: left FX1-3 + 0x94 + 0x49 + + + + + + [EffectRack1_EffectUnit1] + PioneerDDJSB3.effectUnit[1].button[6].input + Shift FX1-3 (Deck2), Button: left SHIFT & FX1-3 + 0x94 + 0x65 + + + + + + [EffectRack1_EffectUnit1] + PioneerDDJSB3.effectUnit[1].knob.inputMSB + FX1 (MSB), Knob: left FX1 + 0xB4 + 0x06 + + + + + + [EffectRack1_EffectUnit1] + PioneerDDJSB3.effectUnit[1].knob.inputLSB + FX1 (LSB), Knob: left FX1 + 0xB4 + 0x26 + + + + + + [EffectRack1_EffectUnit] + PioneerDDJSB3.effectUnit[1].knob.inputMSB + Shift FX1 (MSB), Knob: left SHIFT & FX1 + 0xB4 + 0x00 + + + + + + [EffectRack1_EffectUnit] + PioneerDDJSB3.effectUnit[1].knob.inputLSB + Shift FX1 (LSB), Knob: left SHIFT & FX1 + 0xB4 + 0x20 + + + + + + [EffectRack1_EffectUnit2] + PioneerDDJSB3.effectUnit[2].button[1].input + FX2-1 (Deck1), Button: right FX2-1 + 0x95 + 0x47 + + + + + + [EffectRack1_EffectUnit2] + PioneerDDJSB3.effectUnit[2].button[4].input + Shift FX2-1 (Deck1), Button: right SHIFT & FX2-1 + 0x95 + 0x63 + + + + + + [EffectRack1_EffectUnit2] + PioneerDDJSB3.effectUnit[2].button[2].input + FX2-2 (Head), Button: right FX2-2 + 0x95 + 0x48 + + + + + + [EffectRack1_EffectUnit2] + PioneerDDJSB3.effectUnit[2].button[5].input + Shift FX2-2 (Head), Button: right SHIFT & FX2-2 + 0x95 + 0x64 + + + + + + [EffectRack1_EffectUnit2] + PioneerDDJSB3.effectUnit[2].button[3].input + FX2-3 (Deck2), Button: right FX2-3 + 0x95 + 0x49 + + + + + + [EffectRack1_EffectUnit2] + PioneerDDJSB3.effectUnit[2].button[6].input + Shift FX2-3 (Deck2), Button: right SHIFT & FX2-3 + 0x95 + 0x65 + + + + + + [EffectRack1_EffectUnit2] + PioneerDDJSB3.effectUnit[2].knob.inputMSB + FX2 (MSB), Knob: right FX2 + 0xB5 + 0x06 + + + + + + [EffectRack1_EffectUnit2] + PioneerDDJSB3.effectUnit[2].knob.inputLSB + FX2 (LSB), Knob: right FX2 + 0xB5 + 0x26 + + + + + + [EffectRack1_EffectUnit2] + PioneerDDJSB3.effectUnit[2].knob.inputMSB + Shift FX2 (MSB), Knob: right SHIFT & FX1 + 0xB5 + 0x00 + + + + + + [Channel2] + PioneerDDJSB3.effectUnit[2].knob.inputLSB + Shift FX2 (LSB), Knob: right SHIFT & FX2 + 0xB5 + 0x20 + + + + + + [Channel1] + PioneerDDJSB3.deck[1].eqKnob[3].inputMSB + High level Deck 1 (MSB), Knob: left HI (Deck 1 active) + 0xB0 + 0x07 + + + + + + [Channel1] + PioneerDDJSB3.deck[1].eqKnob[3].inputLSB + High level Deck 1 (LSB), Knob: left HI (Deck 1 active) + 0xB0 + 0x27 + + + + + + [Channel2] + PioneerDDJSB3.deck[2].eqKnob[3].inputMSB + High level Deck 2 (MSB), Knob: right HI (Deck 2 active) + 0xB1 + 0x07 + + + + + + [Channel2] + PioneerDDJSB3.deck[2].eqKnob[3].inputLSB + High level Deck 2 (LSB), Knob: right HI (Deck 2 active) + 0xB1 + 0x27 + + + + + + [Channel3] + PioneerDDJSB3.deck[3].eqKnob[3].inputMSB + High level Deck 3 (MSB), Knob: left HI (Deck 3 active) + 0xB2 + 0x07 + + + + + + [Channel3] + PioneerDDJSB3.deck[3].eqKnob[3].inputLSB + High level Deck 3 (LSB), Knob: left HI (Deck 3 active) + 0xB2 + 0x27 + + + + + + [Channel4] + PioneerDDJSB3.deck[4].eqKnob[3].inputMSB + High level Deck 4 (MSB), Knob: right HI (Deck 4 active) + 0xB3 + 0x07 + + + + + + [Channel4] + PioneerDDJSB3.deck[4].eqKnob[3].inputLSB + High level Deck 4 (LSB), Knob: right HI (Deck 4 active) + 0xB3 + 0x27 + + + + + + [Channel1] + PioneerDDJSB3.deck[1].eqKnob[2].inputMSB + Mid level Deck 1 (MSB), Knob: left MID (Deck 1 active) + 0xB0 + 0x0B + + + + + + [Channel1] + PioneerDDJSB3.deck[1].eqKnob[2].inputLSB + Mid level Deck 1 (LSB), Knob: left MID (Deck 1 active) + 0xB0 + 0x2B + + + + + + [Channel2] + PioneerDDJSB3.deck[2].eqKnob[2].inputMSB + Mid level Deck 2 (MSB), Knob: right HI (Deck 2 active) + 0xB1 + 0x0B + + + + + + [Channel2] + PioneerDDJSB3.deck[2].eqKnob[2].inputLSB + Mid level Deck 2 (LSB), Knob: right HI (Deck 2 active) + 0xB1 + 0x2B + + + + + + [Channel3] + PioneerDDJSB3.deck[3].eqKnob[2].inputMSB + Mid level Deck 3 (MSB), Knob: left MID (Deck 3 active) + 0xB2 + 0x0B + + + + + + [Channel3] + PioneerDDJSB3.deck[3].eqKnob[2].inputLSB + Mid level Deck 3 (LSB), Knob: left MID (Deck 3 active) + 0xB2 + 0x2B + + + + + + [Channel4] + PioneerDDJSB3.deck[4].eqKnob[2].inputMSB + Mid level Deck 4 (MSB), Knob: right MID (Deck 4 active) + 0xB3 + 0x0B + + + + + + [Channel4] + PioneerDDJSB3.deck[4].eqKnob[2].inputLSB + Mid level Deck 4 (LSB), Knob: right MID (Deck 4 active) + 0xB3 + 0x2B + + + + + + [Channel1] + PioneerDDJSB3.deck[1].eqKnob[1].inputMSB + Low level Deck 1 (MSB), Knob: left LOW (Deck 1 active) + 0xB0 + 0x0F + + + + + + [Channel1] + PioneerDDJSB3.deck[1].eqKnob[1].inputLSB + Low level Deck 1 (LSB), Knob: left LOW (Deck 1 active) + 0xB0 + 0x2F + + + + + + [Channel2] + PioneerDDJSB3.deck[2].eqKnob[1].inputMSB + Low level Deck 2 (MSB), Knob: right LOW (Deck 2 active) + 0xB1 + 0x0F + + + + + + [Channel2] + PioneerDDJSB3.deck[2].eqKnob[1].inputLSB + Low level Deck 2 (LSB), Knob: right LOW (Deck 2 active) + 0xB1 + 0x2F + + + + + + [Channel3] + PioneerDDJSB3.deck[3].eqKnob[1].inputMSB + Low level Deck 3 (MSB), Knob: left LOW (Deck 3 active) + 0xB2 + 0x0F + + + + + + [Channel3] + PioneerDDJSB3.deck[3].eqKnob[1].inputLSB + Low level Deck 3 (LSB), Knob: left LOW (Deck 3 active) + 0xB2 + 0x2F + + + + + + [Channel4] + PioneerDDJSB3.deck[4].eqKnob[1].inputMSB + Low level Deck 4 (MSB), Knob: right LOW (Deck 4 active) + 0xB3 + 0x0F + + + + + + [Channel4] + PioneerDDJSB3.deck[4].eqKnob[1].inputLSB + Low level Deck 4 (LSB), Knob: right LOW (Deck 4 active) + 0xB3 + 0x2F + + + + + + [Master] + PioneerDDJSB3.masterCueButton + Toggles headphone master cue, Button: Master + 0x96 + 0x5B + + + + + + [Master] + PioneerDDJSB3.masterCueButton + Toggles headphone master cue, Button: SHIFT + Master + 0x96 + 0x78 + + + + + + [Channel1] + PioneerDDJSB3.headphoneCueButton + Toggles headphone cueing Deck 1, Button: left CUE (Deck 1 active) + 0x90 + 0x54 + + + + + + [Channel2] + PioneerDDJSB3.headphoneCueButton + Toggles headphone cueing Deck 2, Button: right CUE (Deck 2 active) + 0x91 + 0x54 + + + + + + [Channel3] + PioneerDDJSB3.headphoneCueButton + Toggles headphone cueing Deck 3, Button: left CUE (Deck 3 active) + 0x92 + 0x54 + + + + + + [Channel4] + PioneerDDJSB3.headphoneCueButton + Toggles headphone cueing Deck 4, Button: right CUE (Deck 4 active) + 0x93 + 0x54 + + + + + + [Channel1] + PioneerDDJSB3.headphoneShiftCueButton + Toggles headphone cueing Deck 3, Button: SHIFT & left CUE (Deck 1 active) + 0x90 + 0x68 + + + + + + [Channel2] + PioneerDDJSB3.headphoneShiftCueButton + Toggles headphone cueing Deck 4, Button: SHIFT & right CUE (Deck 2 active) + 0x91 + 0x68 + + + + + + [Channel3] + PioneerDDJSB3.headphoneShiftCueButton + Toggles headphone cueing Deck 1, Button: SHIFT & left CUE (Deck 3 active) + 0x92 + 0x68 + + + + + + [Channel4] + PioneerDDJSB3.headphoneShiftCueButton + Toggles headphone cueing Deck 2, Button: SHIFT & right CUE (Deck 4 active) + 0x93 + 0x68 + + + + + + [Master] + PioneerDDJSB3.headphoneLevel.inputMSB + Headphone volume / (Shift for headphone master mix), Button: Headphones Vol (MSB) + 0xB6 + 0x0D + + + + + + [Master] + PioneerDDJSB3.headphoneLevel.inputLSB + Headphone volume / (Shift for headphone master mix), Button: Headphones Vol (LSB) + 0xB6 + 0x2D + + + + + + [Channel1] + PioneerDDJSB3.autoLoopButton + Deck 1 Auto Loop, Button: Auto Loop + 0x90 + 0x14 + + + + + + [Channel2] + PioneerDDJSB3.autoLoopButton + Deck 2 Auto Loop, Button: Auto Loop + 0x91 + 0x14 + + + + + + [Channel3] + PioneerDDJSB3.autoLoopButton + Deck 3 Auto Loop, Button: Auto Loop + 0x92 + 0x14 + + + + + + [Channel4] + PioneerDDJSB3.autoLoopButton + Deck 4 Auto Loop, Button: Auto Loop + 0x93 + 0x14 + + + + + + [Channel1] + PioneerDDJSB3.reloopButton + Deck 1 Reloop, Button: SHIFT + Auto Loop + 0x90 + 0x50 + + + + + + [Channel2] + PioneerDDJSB3.reloopButton + Deck 2 Reloop, Button: SHIFT + Auto Loop + 0x91 + 0x50 + + + + + + [Channel3] + PioneerDDJSB3.reloopButton + Deck 3 Reloop, Button: SHIFT + Auto Loop + 0x92 + 0x50 + + + + + + [Channel4] + PioneerDDJSB3.reloopButton + Deck 4 Reloop, Button: SHIFT + Auto Loop + 0x93 + 0x50 + + + + + + [Channel1] + loop_halve + Deck 1 Loop halve, Button: 1/2X + 0x90 + 0x12 + + + + + + [Channel2] + loop_halve + Deck 2 Loop halve, Button: 1/2X + 0x91 + 0x12 + + + + + + [Channel3] + loop_halve + Deck 4 Loop halve, Button: 1/2X + 0x92 + 0x12 + + + + + + [Channel4] + loop_halve + Deck 4 Loop halve, Button: 1/2X + 0x93 + 0x12 + + + + + + [Channel1] + loop_in + Deck 1 Loop in, Button: SHIFT + 1/2X + 0x90 + 0x61 + + + + + + [Channel2] + loop_in + Deck 2 Loop in, Button: SHIFT + 1/2X + 0x91 + 0x61 + + + + + + [Channel3] + loop_in + Deck 3 Loop in, Button: SHIFT + 1/2X + 0x92 + 0x61 + + + + + + [Channel4] + loop_in + Deck 4 Loop in, Button: SHIFT + 1/2X + 0x93 + 0x61 + + + + + + [Channel1] + loop_double + Deck 1 Loop Double, Button: 2X + 0x90 + 0x13 + + + + + + [Channel2] + loop_double + Deck 2 Loop Double, Button: 2X + 0x91 + 0x13 + + + + + + [Channel3] + loop_double + Deck 3 Loop Double, Button: 2X + 0x92 + 0x13 + + + + + + [Channel4] + loop_double + Deck 4 Loop Double, Button: 2X + 0x93 + 0x13 + + + + + + [Channel1] + loop_out + Deck 1 Loop Out, Button: SHIFT + 2X + 0x90 + 0x62 + + + + + + [Channel2] + loop_out + Deck 2 Loop Out, Button: SHIFT + 2X + 0x91 + 0x62 + + + + + + [Channel3] + loop_out + Deck 3 Loop Out, Button: SHIFT + 2X + 0x92 + 0x62 + + + + + + [Channel4] + loop_out + Deck 4 Loop Out, Button: SHIFT + 2X + 0x93 + 0x62 + + + + + + [Master] + crossfader + Crossfader (MSB), Slider: FADE + 0xB6 + 0x1F + + + + + + [Master] + crossfader + Crossfader (LSB), Slider: FADE + 0xB6 + 0x3F + + + + + + [Master] + PioneerDDJSB3.masterGain.inputMSB + Master Gain (MSB), Master Volume + 0xB6 + 0x08 + + + + + + [Master] + PioneerDDJSB3.masterGain.inputLSB + Master Gain (LSB), Master Volume + 0xB6 + 0x28 + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].beatJumpDivide + BeatJump Size /2 Deck 1, Button: PAD1 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x40 + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].beatJumpDivide + BeatJump Size /2 Deck 2, Button: PAD1 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x40 + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].beatJumpDivide + BeatJump Size /2 Deck 3, Button: PAD1 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x40 + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].beatJumpDivide + BeatJump Size /2 Deck 4, Button: PAD1 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x40 + + + + + + [Channel1] + beatjump_4_backward + BeatJump Backward 4 Deck 1, Button: SHIFT & PAD1 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x48 + + + + + + [Channel2] + beatjump_4_backward + BeatJump Backward 4 Deck 2, Button: SHIFT & PAD1 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x48 + + + + + + [Channel3] + beatjump_4_backward + BeatJump Backward 4 Deck 3, Button: SHIFT & PAD1 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x48 + + + + + + [Channel4] + beatjump_4_backward + BeatJump Backward 4 Deck 4, Button: SHIFT & PAD1 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x48 + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].beatJumpMultiply + BeatJump Size *2 Deck 1, Button: PAD2 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x41 + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].beatJumpMultiply + BeatJump Size *2 Deck 2, Button: PAD2 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x41 + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].beatJumpMultiply + BeatJump Size *2 Deck 3, Button: PAD2 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x41 + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].beatJumpMultiply + BeatJump Size *2 Deck 4, Button: PAD2 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x41 + + + + + + [Channel1] + beatjump_8_backward + BeatJump Backward 8 Deck 1, Button: SHIFT & PAD2 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x49 + + + + + + [Channel2] + beatjump_8_backward + BeatJump Backward 8 Deck 2, Button: SHIFT & PAD2 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x49 + + + + + + [Channel3] + beatjump_8_backward + BeatJump Backward 8 Deck 3, Button: SHIFT & PAD2 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x49 + + + + + + [Channel4] + beatjump_8_backward + BeatJump Backward 8 Deck 4, Button: SHIFT & PAD2 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x49 + + + + + + [Channel1] + beatjump_backward + BeatJump Move Back Deck 1, Button: PAD3 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x42 + + + + + + [Channel2] + beatjump_backward + BeatJump Move Back Deck 2, Button: PAD3 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x42 + + + + + + [Channel3] + beatjump_backward + BeatJump Move Back Deck 3, Button: PAD3 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x42 + + + + + + [Channel4] + beatjump_backward + BeatJump Move Back Deck 4, Button: PAD3 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x42 + + + + + + [Channel1] + beatjump_16_backward + BeatJump Backward 16 Deck 1, Button: SHIFT & PAD3 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x4A + + + + + + [Channel2] + beatjump_16_backward + BeatJump Backward 16 Deck 2, Button: SHIFT & PAD3 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x4A + + + + + + [Channel3] + beatjump_16_backward + BeatJump Backward 16 Deck 3, Button: SHIFT & PAD3 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x4A + + + + + + [Channel4] + beatjump_16_backward + BeatJump Backward 16 Deck 4, Button: SHIFT & PAD3 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x4A + + + + + + [Channel1] + beatjump_forward + BeatJump Move Next Deck 1, Button: PAD4 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x43 + + + + + + [Channel2] + beatjump_forward + BeatJump Move Next Deck 2, Button: PAD4 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x43 + + + + + + [Channel3] + beatjump_forward + BeatJump Move Next Deck 3, Button: PAD4 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x43 + + + + + + [Channel4] + beatjump_forward + BeatJump Move Next Deck 4, Button: PAD4 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x43 + + + + + + [Channel1] + beatjump_32_backward + BeatJump Backward 32 Deck 1, Button: SHIFT & PAD4 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x4B + + + + + + [Channel2] + beatjump_32_backward + BeatJump Backward 32 Deck 2, Button: SHIFT & PAD4 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x4B + + + + + + [Channel3] + beatjump_32_backward + BeatJump Backward 32 Deck 3, Button: SHIFT & PAD4 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x4B + + + + + + [Channel4] + beatjump_32_backward + BeatJump Backward 32 Deck 4, Button: SHIFT & PAD4 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x4B + + + + + + [Channel1] + start + Start of track Deck 1, Button: PAD5 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x44 + + + + + + [Channel2] + start + Start of track Deck 2, Button: PAD5 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x44 + + + + + + [Channel3] + start + Start of track Deck 3, Button: PAD5 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x44 + + + + + + [Channel4] + start + Start of track Deck 4, Button: PAD5 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x44 + + + + + + [Channel1] + beatjump_4_forward + Beatjump Forward 4 Deck 1, Button: SHIFT + PAD5 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x4C + + + + + + [Channel2] + beatjump_4_forward + Beatjump Forward 4 Deck 2, Button: SHIFT + PAD5 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x4C + + + + + + [Channel3] + beatjump_4_forward + Beatjump Forward 4 Deck 3, Button: SHIFT + PAD5 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x4C + + + + + + [Channel4] + beatjump_4_forward + Beatjump Forward 4 Deck 4, Button: SHIFT + PAD5 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x4C + + + + + + [Channel1] + back + Back for track Deck 1, Button: PAD6 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x45 + + + + + + [Channel2] + back + Back for track Deck 2, Button: PAD6 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x45 + + + + + + [Channel3] + back + Back for track Deck 3, Button: PAD6 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x45 + + + + + + [Channel4] + back + Back for track Deck 4, Button: PAD6 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x45 + + + + + + [Channel1] + beatjump_8_forward + Beatjump Forward 8 Deck 1, Button: SHIFT + PAD6 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x4D + + + + + + [Channel2] + beatjump_8_forward + Beatjump Forward 8 Deck 2, Button: SHIFT + PAD6 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x4D + + + + + + [Channel3] + beatjump_8_forward + Beatjump Forward 8 Deck 3, Button: SHIFT + PAD6 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x4D + + + + + + [Channel4] + beatjump_8_forward + Beatjump Forward 8 Deck 4, Button: SHIFT + PAD6 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x4D + + + + + + [Channel1] + fwd + Forward for track Deck 1, Button: PAD7 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x46 + + + + + + [Channel2] + fwd + Forward for track Deck 2, Button: PAD7 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x46 + + + + + + [Channel3] + fwd + Forward for track Deck 3, Button: PAD7 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x46 + + + + + + [Channel4] + fwd + Forward for track Deck 4, Button: PAD7 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x46 + + + + + + [Channel1] + beatjump_16_forward + Beatjump 16 forward Deck 1, Button: SHIFT + PAD7 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x4E + + + + + + [Channel2] + beatjump_16_forward + Beatjump 16 forward Deck 2, Button: SHIFT + PAD7 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x4E + + + + + + [Channel3] + beatjump_16_forward + Beatjump 16 forward Deck 3, Button: SHIFT + PAD7 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x4E + + + + + + [Channel4] + beatjump_16_forward + Beatjump 16 forward Deck 4, Button: SHIFT + PAD7 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x4E + + + + + + [Channel1] + reverse + Set track Deck 1 to reverse, Button: PAD8 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x47 + + + + + + [Channel2] + reverse + Set track Deck 2 to reverse, Button: PAD8 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x47 + + + + + + [Channel3] + reverse + Set track Deck 3 to reverse, Button: PAD8 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x47 + + + + + + [Channel4] + reverse + Set track Deck 4 to reverse, Button: PAD8 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x47 + + + + + + [Channel1] + beatjump_32_forward + Beatjump 32 forward Deck 1, Button: PAD8 (in BEATJUMP-Mode, Deck 1 active) + 0x97 + 0x4F + + + + + + [Channel2] + beatjump_32_forward + Beatjump 32 forward Deck 2, Button: PAD8 (in BEATJUMP-Mode, Deck 2 active) + 0x98 + 0x4F + + + + + + [Channel3] + beatjump_32_forward + Beatjump 32 forward Deck 3, Button: PAD8 (in BEATJUMP-Mode, Deck 3 active) + 0x99 + 0x4F + + + + + + [Channel4] + beatjump_32_forward + Beatjump 32 forward Deck 4, Button: PAD8 (in BEATJUMP-Mode, Deck 4 active) + 0x9A + 0x4F + + + + + + [Channel1] + hotcue_1_activate + Hot-Cue 1 Deck 1, Button: PAD1 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x00 + + + + + + [Channel2] + hotcue_1_activate + Hot-Cue 1 Deck 2, Button: PAD1 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x00 + + + + + + [Channel3] + hotcue_1_activate + Hot-Cue 1 Deck 3, Button: PAD1 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x00 + + + + + + [Channel4] + hotcue_1_activate + Hot-Cue 1 Deck 4, Button: PAD1 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x00 + + + + + + [Channel1] + hotcue_1_clear + Clear Hot-Cue 1 Deck 1, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x08 + + + + + + [Channel2] + hotcue_1_clear + Clear Hot-Cue 1 Deck 2, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x08 + + + + + + [Channel3] + hotcue_1_clear + Clear Hot-Cue 1 Deck 3, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x08 + + + + + + [Channel4] + hotcue_1_clear + Clear Hot-Cue 1 Deck 4, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x08 + + + + + + [Channel1] + hotcue_2_activate + Hot-Cue 2 Deck 1, Button: PAD1 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x01 + + + + + + [Channel2] + hotcue_2_activate + Hot-Cue 2 Deck 2, Button: PAD1 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x01 + + + + + + [Channel3] + hotcue_2_activate + Hot-Cue 2 Deck 3, Button: PAD1 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x01 + + + + + + [Channel4] + hotcue_2_activate + Hot-Cue 2 Deck 4, Button: PAD1 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x01 + + + + + + [Channel1] + hotcue_2_clear + Clear Hot-Cue 2 Deck 1, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x09 + + + + + + [Channel2] + hotcue_2_clear + Clear Hot-Cue 2 Deck 2, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x09 + + + + + + [Channel3] + hotcue_2_clear + Clear Hot-Cue 2 Deck 3, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x09 + + + + + + [Channel4] + hotcue_2_clear + Clear Hot-Cue 2 Deck 4, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x09 + + + + + + [Channel1] + hotcue_3_activate + Hot-Cue 3 Deck 1, Button: PAD1 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x02 + + + + + + [Channel2] + hotcue_3_activate + Hot-Cue 3 Deck 2, Button: PAD1 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x02 + + + + + + [Channel3] + hotcue_3_activate + Hot-Cue 3 Deck 3, Button: PAD1 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x02 + + + + + + [Channel4] + hotcue_3_activate + Hot-Cue 3 Deck 4, Button: PAD1 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x02 + + + + + + [Channel1] + hotcue_3_clear + Clear Hot-Cue 3 Deck 1, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x0A + + + + + + [Channel2] + hotcue_3_clear + Clear Hot-Cue 3 Deck 2, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x0A + + + + + + [Channel3] + hotcue_3_clear + Clear Hot-Cue 3 Deck 3, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x0A + + + + + + [Channel4] + hotcue_3_clear + Clear Hot-Cue 3 Deck 4, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x0A + + + + + + [Channel1] + hotcue_4_activate + Hot-Cue 4 Deck 1, Button: PAD1 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x03 + + + + + + [Channel2] + hotcue_4_activate + Hot-Cue 4 Deck 2, Button: PAD1 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x03 + + + + + + [Channel3] + hotcue_4_activate + Hot-Cue 4 Deck 3, Button: PAD1 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x03 + + + + + + [Channel4] + hotcue_4_activate + Hot-Cue 4 Deck 4, Button: PAD1 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x03 + + + + + + [Channel1] + hotcue_4_clear + Clear Hot-Cue 4 Deck 1, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x0B + + + + + + [Channel2] + hotcue_4_clear + Clear Hot-Cue 4 Deck 2, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x0B + + + + + + [Channel3] + hotcue_4_clear + Clear Hot-Cue 4 Deck 3, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x0B + + + + + + [Channel4] + hotcue_4_clear + Clear Hot-Cue 4 Deck 4, Button: SHIFT & PAD1 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x0B + + + + + + [Channel1] + start + Start of track Deck 1, Button: PAD5 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x04 + + + + + + [Channel2] + start + Start of track Deck 2, Button: PAD5 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x04 + + + + + + [Channel3] + start + Start of track Deck 3, Button: PAD5 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x04 + + + + + + [Channel4] + start + Start of track Deck 4, Button: PAD5 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x04 + + + + + + [Channel1] + hotcue_5_activate + Hot-Cue 5 Deck 1, Button: SHIFT + PAD5 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x0C + + + + + + [Channel2] + hotcue_5_activate + Hot-Cue 5 Deck 2, Button: SHIFT + PAD5 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x0C + + + + + + [Channel3] + hotcue_5_activate + Hot-Cue 5 Deck 3, Button: SHIFT + PAD5 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x0C + + + + + + [Channel4] + hotcue_5_activate + Hot-Cue 5 Deck 4, Button: SHIFT + PAD5 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x0C + + + + + + [Channel1] + back + Back for track Deck 1, Button: PAD6 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x05 + + + + + + [Channel2] + back + Back for track Deck 2, Button: PAD6 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x05 + + + + + + [Channel3] + back + Back for track Deck 3, Button: PAD6 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x05 + + + + + + [Channel4] + back + Back for track Deck 4, Button: PAD6 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x05 + + + + + + [Channel1] + hotcue_6_activate + Hot-Cue 6 Deck 1, Button: SHIFT + PAD6 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x0D + + + + + + [Channel2] + hotcue_6_activate + Hot-Cue 6 Deck 2, Button: SHIFT + PAD6 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x0D + + + + + + [Channel3] + hotcue_6_activate + Hot-Cue 6 Deck 3, Button: SHIFT + PAD6 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x0D + + + + + + [Channel4] + hotcue_6_activate + Hot-Cue 6 Deck 4, Button: SHIFT + PAD6 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x0D + + + + + + [Channel1] + fwd + Forward for track Deck 1, Button: PAD7 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x06 + + + + + + [Channel2] + fwd + Forward for track Deck 2, Button: PAD7 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x06 + + + + + + [Channel3] + fwd + Forward for track Deck 3, Button: PAD7 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x06 + + + + + + [Channel4] + fwd + Forward for track Deck 4, Button: PAD7 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x06 + + + + + + [Channel1] + hotcue_7_activate + Hot-Cue 7 Deck 1, Button: SHIFT + PAD7 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x0e + + + + + + [Channel2] + hotcue_7_activate + Hot-Cue 7 Deck 2, Button: SHIFT + PAD7 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x0e + + + + + + [Channel3] + hotcue_7_activate + Hot-Cue 7 Deck 3, Button: SHIFT + PAD7 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x0e + + + + + + [Channel4] + hotcue_7_activate + Hot-Cue 7 Deck 4, Button: SHIFT + PAD7 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x0e + + + + + + [Channel1] + reverse + Set track Deck 1 to reverse, Button: PAD8 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x07 + + + + + + [Channel2] + reverse + Set track Deck 2 to reverse, Button: PAD8 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x07 + + + + + + [Channel3] + reverse + Set track Deck 3 to reverse, Button: PAD8 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x07 + + + + + + [Channel4] + reverse + Set track Deck 4 to reverse, Button: PAD8 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x07 + + + + + + [Channel1] + hotcue_8_activate + Hot-Cue 8 Deck 1, Button: SHIFT + PAD8 (in HOT-CUE-Mode, Deck 1 active) + 0x97 + 0x0F + + + + + + [Channel2] + hotcue_8_activate + Hot-Cue 8 Deck 2, Button: SHIFT + PAD8 (in HOT-CUE-Mode, Deck 2 active) + 0x98 + 0x0F + + + + + + [Channel3] + hotcue_8_activate + Hot-Cue 8 Deck 3, Button: SHIFT + PAD8 (in HOT-CUE-Mode, Deck 3 active) + 0x99 + 0x0F + + + + + + [Channel4] + hotcue_8_activate + Hot-Cue 8 Deck 4, Button: SHIFT + PAD8 (in HOT-CUE-Mode, Deck 4 active) + 0x9A + 0x0F + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].hotcueMode + Pad Hot-Cue button, activate HotCue mode (Deck 1) + 0x90 + 0x1B + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].beatJumpMode + SHIFT + Pad Hot-Cue button, activate BeatJump mode (Deck 1) + 0x90 + 0x69 + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].hotcueMode + Pad Hot-Cue button, activate HotCue mode (Deck 2) + 0x91 + 0x1B + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].beatJumpMode + SHIFT + Pad Hot-Cue button, activate BeatJump mode (Deck 2) + 0x91 + 0x69 + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].hotcueMode + Pad Hot-Cue button, activate HotCue mode (Deck 3) + 0x92 + 0x1B + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].beatJumpMode + SHIFT + Pad Hot-Cue button, activate BeatJump mode (Deck 3) + 0x92 + 0x69 + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].hotcueMode + Pad Hot-Cue button, activate HotCue mode (Deck 4) + 0x93 + 0x1B + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].beatJumpMode + SHIFT + Pad Hot-Cue button, activate BeatJump mode (Deck 4) + 0x93 + 0x69 + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].fxFadeMode + Pad FX FADE button, activate FX Fade mode (Deck 1) + 0x90 + 0x1E + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].rollMode + SHIFT + Pad FX FADE button, activate Roll mode (Deck 1) + 0x90 + 0x6B + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].fxFadeMode + Pad FX FADE button, activate FX Fade mode (Deck 2) + 0x91 + 0x1E + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].rollMode + SHIFT + Pad FX FADE button, activate Roll mode (Deck 2) + 0x91 + 0x6B + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].fxFadeMode + Pad FX FADE button, activate FX Fade mode (Deck 3) + 0x92 + 0x1E + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].rollMode + SHIFT + Pad FX FADE button, activate Roll mode (Deck 3) + 0x92 + 0x6B + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].fxFadeMode + Pad FX FADE button, activate FX Fade mode (Deck 4) + 0x93 + 0x1E + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].rollMode + SHIFT + Pad FX FADE button, activate Roll mode (Deck 4) + 0x93 + 0x6B + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].padScratchMode + Pad PAD SCRATCH button, activate Pad Scratch mode (Deck 1) + 0x90 + 0x20 + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].slicerMode + SHIFT + Pad PAD SCRATCH button, activate Slicer mode (Deck 1) + 0x90 + 0x6D + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].padScratchMode + Pad PAD SCRATCH button, activate Pad Scratch mode (Deck 2) + 0x91 + 0x20 + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].slicerMode + SHIFT + Pad PAD SCRATCH button, activate Slicer mode (Deck 2) + 0x91 + 0x6D + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].padScratchMode + Pad PAD SCRATCH button, activate Pad Scratch mode (Deck 3) + 0x92 + 0x20 + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].slicerMode + SHIFT + Pad PAD SCRATCH button, activate Slicer mode (Deck 3) + 0x92 + 0x6D + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].padScratchMode + Pad PAD SCRATCH button, activate Pad Scratch mode (Deck 4) + 0x93 + 0x20 + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].slicerMode + SHIFT + Pad PAD SCRATCH button, activate Slicer mode (Deck 4) + 0x93 + 0x6D + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].samplerMode + Pad SAMPLER button, activate Sampler mode (Deck 1) + 0x90 + 0x22 + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].transMode + SHIFT + Pad SAMPLER button, activate Trans mode (Deck 1) + 0x90 + 0x6E + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].samplerMode + Pad SAMPLER button, activate Sampler mode (Deck 2) + 0x91 + 0x22 + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].transMode + SHIFT + Pad SAMPLER button, activate Trans mode (Deck 2) + 0x91 + 0x6E + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].samplerMode + Pad SAMPLER button, activate Sampler mode (Deck 3) + 0x92 + 0x22 + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].transMode + SHIFT + Pad SAMPLER button, activate Trans mode (Deck 3) + 0x92 + 0x6E + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].samplerMode + Pad SAMPLER button, activate Sampler mode (Deck 4) + 0x93 + 0x22 + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].transMode + SHIFT + Pad SAMPLER button, activate Trans mode (Deck 4) + 0x93 + 0x6E + + + + + + [Channel1] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD1 (in ROLL-Mode, Deck 1 active) + 0x97 + 0x50 + + + + + + [Channel2] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD1 (in ROLL-Mode, Deck 2 active) + 0x98 + 0x50 + + + + + + [Channel3] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD1 (in ROLL-Mode, Deck 3 active) + 0x99 + 0x50 + + + + + + [Channel4] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD1 (in ROLL-Mode, Deck 4 active) + 0x9A + 0x50 + + + + + + [Channel1] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD2 (in ROLL-Mode, Deck 1 active) + 0x97 + 0x51 + + + + + + [Channel2] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD2 (in ROLL-Mode, Deck 2 active) + 0x98 + 0x51 + + + + + + [Channel3] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD2 (in ROLL-Mode, Deck 3 active) + 0x99 + 0x51 + + + + + + [Channel4] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD2 (in ROLL-Mode, Deck 4 active) + 0x9A + 0x51 + + + + + + [Channel1] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD3 (in ROLL-Mode, Deck 1 active) + 0x97 + 0x52 + + + + + + [Channel2] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD3 (in ROLL-Mode, Deck 2 active) + 0x98 + 0x52 + + + + + + [Channel3] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD3 (in ROLL-Mode, Deck 3 active) + 0x99 + 0x52 + + + + + + [Channel4] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD3 (in ROLL-Mode, Deck 4 active) + 0x9A + 0x52 + + + + + + [Channel1] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD4 (in ROLL-Mode, Deck 1 active) + 0x97 + 0x53 + + + + + + [Channel2] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD4 (in ROLL-Mode, Deck 2 active) + 0x98 + 0x53 + + + + + + [Channel3] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD4 (in ROLL-Mode, Deck 3 active) + 0x99 + 0x53 + + + + + + [Channel4] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD4 (in ROLL-Mode, Deck 4 active) + 0x9A + 0x53 + + + + + + [Channel1] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD5 (in ROLL-Mode, Deck 1 active) + 0x97 + 0x54 + + + + + + [Channel2] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD5 (in ROLL-Mode, Deck 2 active) + 0x98 + 0x54 + + + + + + [Channel3] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD5 (in ROLL-Mode, Deck 3 active) + 0x99 + 0x54 + + + + + + [Channel4] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD5 (in ROLL-Mode, Deck 4 active) + 0x9A + 0x54 + + + + + + [Channel1] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD6 (in ROLL-Mode, Deck 1 active) + 0x97 + 0x55 + + + + + + [Channel2] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD6 (in ROLL-Mode, Deck 2 active) + 0x98 + 0x55 + + + + + + [Channel3] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD6 (in ROLL-Mode, Deck 3 active) + 0x99 + 0x55 + + + + + + [Channel4] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD6 (in ROLL-Mode, Deck 4 active) + 0x9A + 0x55 + + + + + + [Channel1] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD7 (in ROLL-Mode, Deck 1 active) + 0x97 + 0x56 + + + + + + [Channel2] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD7 (in ROLL-Mode, Deck 2 active) + 0x98 + 0x56 + + + + + + [Channel3] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD7 (in ROLL-Mode, Deck 3 active) + 0x99 + 0x56 + + + + + + [Channel4] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD7 (in ROLL-Mode, Deck 4 active) + 0x9A + 0x56 + + + + + + [Channel1] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD8 (in ROLL-Mode, Deck 1 active) + 0x97 + 0x57 + + + + + + [Channel2] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD8 (in ROLL-Mode, Deck 2 active) + 0x98 + 0x57 + + + + + + [Channel3] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD8 (in ROLL-Mode, Deck 3 active) + 0x99 + 0x57 + + + + + + [Channel4] + PioneerDDJSB3.beatloopRollButtons + Beatloop Roll, Button: PAD8 (in ROLL-Mode, Deck 4 active) + 0x9A + 0x57 + + + + + + [Sampler1] + start_play + Sampler 1 play, Button: PAD1 (in SAMPLER-Mode, Deck 1 active) + 0x97 + 0x30 + + + + + + [Sampler5] + start_play + Sampler 5 play, Button: PAD1 (in SAMPLER-Mode, Deck 2 active) + 0x98 + 0x30 + + + + + + [Sampler1] + start_play + Sampler 1 play, Button: PAD1 (in SAMPLER-Mode, Deck 3 active) + 0x99 + 0x30 + + + + + + [Sampler5] + start_play + Sampler 5 play, Button: PAD1 (in SAMPLER-Mode, Deck 4 active) + 0x9A + 0x30 + + + + + + [Sampler1] + stop + Sampler 1 stop, Button: SHIFT & PAD1 (in SAMPLER-Mode, Deck 1 active) + 0x97 + 0x38 + + + + + + [Sampler5] + stop + Sampler 5 stop, Button: SHIFT & PAD1 (in SAMPLER-Mode, Deck 2 active) + 0x98 + 0x38 + + + + + + [Sampler1] + stop + Sampler 1 stop, Button: SHIFT & PAD1 (in SAMPLER-Mode, Deck 3 active) + 0x99 + 0x38 + + + + + + [Sampler5] + stop + Sampler 5 stop, Button: SHIFT & PAD1 (in SAMPLER-Mode, Deck 4 active) + 0x9A + 0x38 + + + + + + [Sampler2] + start_play + Sampler 2 play, Button: PAD2 (in SAMPLER-Mode, Deck 1 active) + 0x97 + 0x31 + + + + + + [Sampler6] + start_play + Sampler 6 play, Button: PAD2 (in SAMPLER-Mode, Deck 2 active) + 0x98 + 0x31 + + + + + + [Sampler2] + start_play + Sampler 2 play, Button: PAD2 (in SAMPLER-Mode, Deck 3 active) + 0x99 + 0x31 + + + + + + [Sampler6] + start_play + Sampler 6 play, Button: PAD2 (in SAMPLER-Mode, Deck 4 active) + 0x9A + 0x31 + + + + + + [Sampler2] + stop + Sampler 2 stop, Button: SHIFT & PAD2 (in SAMPLER-Mode, Deck 1 active) + 0x97 + 0x39 + + + + + + [Sampler6] + stop + Sampler 6 stop, Button: SHIFT & PAD2 (in SAMPLER-Mode, Deck 2 active) + 0x98 + 0x39 + + + + + + [Sampler2] + stop + Sampler 2 stop, Button: SHIFT & PAD2 (in SAMPLER-Mode, Deck 3 active) + 0x99 + 0x39 + + + + + + [Sampler6] + stop + Sampler 6 stop, Button: SHIFT & PAD2 (in SAMPLER-Mode, Deck 4 active) + 0x9A + 0x39 + + + + + + [Sampler3] + start_play + Sampler 3 play, Button: PAD3 (in SAMPLER-Mode, Deck 1 active) + 0x97 + 0x32 + + + + + + [Sampler7] + start_play + Sampler 7 play, Button: PAD3 (in SAMPLER-Mode, Deck 2 active) + 0x98 + 0x32 + + + + + + [Sampler3] + start_play + Sampler 3 play, Button: PAD3 (in SAMPLER-Mode, Deck 3 active) + 0x99 + 0x32 + + + + + + [Sampler7] + start_play + Sampler 7 play, Button: PAD3 (in SAMPLER-Mode, Deck 4 active) + 0x9A + 0x32 + + + + + + [Sampler3] + stop + Sampler 3 stop, Button: SHIFT & PAD3 (in SAMPLER-Mode, Deck 1 active) + 0x97 + 0x3A + + + + + + [Sampler7] + stop + Sampler 7 stop, Button: SHIFT & PAD3 (in SAMPLER-Mode, Deck 2 active) + 0x98 + 0x3A + + + + + + [Sampler3] + stop + Sampler 3 stop, Button: SHIFT & PAD3 (in SAMPLER-Mode, Deck 3 active) + 0x99 + 0x3A + + + + + + [Sampler7] + stop + Sampler 7 stop, Button: SHIFT & PAD3 (in SAMPLER-Mode, Deck 4 active) + 0x9A + 0x3A + + + + + + [Sampler4] + start_play + Sampler4 play, Button: PAD4 (in SAMPLER-Mode, Deck 1 active) + 0x97 + 0x33 + + + + + + [Sampler8] + start_play + Sampler8 play, Button: PAD4 (in SAMPLER-Mode, Deck 2 active) + 0x98 + 0x33 + + + + + + [Sampler4] + start_play + Sampler4 play, Button: PAD4 (in SAMPLER-Mode, Deck 3 active) + 0x99 + 0x33 + + + + + + [Sampler8] + start_play + Sampler8 play, Button: PAD4 (in SAMPLER-Mode, Deck 4 active) + 0x9A + 0x33 + + + + + + [Sampler4] + stop + Sampler4 stop, Button: SHIFT & PAD4 (in SAMPLER-Mode, Deck 1 active) + 0x97 + 0x3B + + + + + + [Sampler8] + stop + Sampler8 stop, Button: SHIFT & PAD4 (in SAMPLER-Mode, Deck 2 active) + 0x98 + 0x3B + + + + + + [Sampler4] + stop + Sampler4 stop, Button: SHIFT & PAD4 (in SAMPLER-Mode, Deck 3 active) + 0x99 + 0x3B + + + + + + [Sampler8] + stop + Sampler8 stop, Button: SHIFT & PAD4 (in SAMPLER-Mode, Deck 4 active) + 0x9A + 0x3B + + + + + + [Sampler1] + LoadSelectedTrack + Load selected track in Sampler1, Button: PAD5 (in SAMPLER-Mode, Deck 1) + 0x97 + 0x34 + + + + + + [Sampler5] + LoadSelectedTrack + Load selected track in Sampler5, Button: PAD5 (in SAMPLER-Mode, Deck 2) + 0x98 + 0x34 + + + + + + [Sampler1] + LoadSelectedTrack + Load selected track in Sampler1, Button: PAD5 (in SAMPLER-Mode, Deck 3) + 0x99 + 0x34 + + + + + + [Sampler5] + LoadSelectedTrack + Load selected track in Sampler5, Button: PAD5 (in SAMPLER-Mode, Deck 4) + 0x9A + 0x34 + + + + + + [Sampler1] + eject + Eject Sampler1, Button: SHIFT PAD5 (in SAMPLER-Mode, Deck 1) + 0x97 + 0x3C + + + + + + [Sampler5] + eject + Eject Sampler5, Button: SHIFT PAD5 (in SAMPLER-Mode, Deck 2) + 0x98 + 0x3C + + + + + + [Sampler1] + eject + Eject Sampler1, Button: SHIFT PAD5 (in SAMPLER-Mode, Deck 3) + 0x99 + 0x3C + + + + + + [Sampler5] + eject + Eject Sampler5, Button: SHIFT PAD5 (in SAMPLER-Mode, Deck 4) + 0x9A + 0x3C + + + + + + [Sampler2] + LoadSelectedTrack + Load selected track in Sampler1, Button: PAD6 (in SAMPLER-Mode, Deck 1) + 0x97 + 0x35 + + + + + + [Sampler6] + LoadSelectedTrack + Load selected track in Sampler1, Button: PAD6 (in SAMPLER-Mode, Deck 2) + 0x98 + 0x35 + + + + + + [Sampler2] + LoadSelectedTrack + Load selected track in Sampler1, Button: PAD6 (in SAMPLER-Mode, Deck 3) + 0x99 + 0x35 + + + + + + [Sampler6] + LoadSelectedTrack + Load selected track in Sampler1, Button: PAD6 (in SAMPLER-Mode, Deck 4) + 0x9A + 0x35 + + + + + + [Sampler2] + eject + Eject Sampler2, Button: SHIFT PAD6 (in SAMPLER-Mode, Deck 1) + 0x97 + 0x3D + + + + + + [Sampler6] + eject + Eject Sampler6, Button: SHIFT PAD6 (in SAMPLER-Mode, Deck 2) + 0x98 + 0x3D + + + + + + [Sampler2] + eject + Eject Sampler2, Button: SHIFT PAD6 (in SAMPLER-Mode, Deck 3) + 0x99 + 0x3D + + + + + + [Sampler6] + eject + Eject Sampler6, Button: SHIFT PAD6 (in SAMPLER-Mode, Deck 4) + 0x9A + 0x3D + + + + + + [Sampler3] + LoadSelectedTrack + Load selected track in Sampler3, Button: PAD7 (in SAMPLER-Mode, Deck 1) + 0x97 + 0x36 + + + + + + [Sampler7] + LoadSelectedTrack + Load selected track in Sampler7, Button: PAD7 (in SAMPLER-Mode, Deck 2) + 0x98 + 0x36 + + + + + + [Sampler3] + LoadSelectedTrack + Load selected track in Sampler3, Button: PAD7 (in SAMPLER-Mode, Deck 3) + 0x99 + 0x36 + + + + + + [Sampler7] + LoadSelectedTrack + Load selected track in Sampler7, Button: PAD7 (in SAMPLER-Mode, Deck 4) + 0x9A + 0x36 + + + + + + [Sampler3] + eject + Eject Sampler3, Button: SHIFT PAD7 (in SAMPLER-Mode, Deck 1) + 0x97 + 0x3E + + + + + + [Sampler7] + eject + Eject Sampler7, Button: SHIFT PAD7 (in SAMPLER-Mode, Deck 2) + 0x98 + 0x3E + + + + + + [Sampler3] + eject + Eject Sampler3, Button: SHIFT PAD7 (in SAMPLER-Mode, Deck 3) + 0x99 + 0x3E + + + + + + [Sampler7] + eject + Eject Sampler7, Button: SHIFT PAD7 (in SAMPLER-Mode, Deck 4) + 0x9A + 0x3E + + + + + + [Sampler4] + LoadSelectedTrack + Load selected track in Sampler4, Button: PAD8 (in SAMPLER-Mode, Deck 1) + 0x97 + 0x37 + + + + + + [Sampler8] + LoadSelectedTrack + Load selected track in Sampler8, Button: PAD8 (in SAMPLER-Mode, Deck 2) + 0x98 + 0x37 + + + + + + [Sampler4] + LoadSelectedTrack + Load selected track in Sampler4, Button: PAD8 (in SAMPLER-Mode, Deck 3) + 0x99 + 0x37 + + + + + + [Sampler8] + LoadSelectedTrack + Load selected track in Sampler8, Button: PAD8 (in SAMPLER-Mode, Deck 4) + 0x9A + 0x37 + + + + + + [Sampler4] + eject + Eject Sampler4, Button: SHIFT PAD8 (in SAMPLER-Mode, Deck 1) + 0x97 + 0x3F + + + + + + [Sampler8] + eject + Eject Sampler8, Button: SHIFT PAD8 (in SAMPLER-Mode, Deck 2) + 0x98 + 0x3F + + + + + + [Sampler4] + eject + Eject Sampler4, Button: SHIFT PAD8 (in SAMPLER-Mode, Deck 3) + 0x99 + 0x3F + + + + + + [Sampler8] + eject + Eject Sampler8, Button: SHIFT PAD8 (in SAMPLER-Mode, Deck 4) + 0x9A + 0x3F + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].slicerButtons[1] + Slicer, Button: PAD1 (in SLICER-Mode, Deck 1 active) + 0x97 + 0x60 + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].slicerButtons[1] + Slicer, Button: PAD1 (in SLICER-Mode, Deck 2 active) + 0x98 + 0x60 + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].slicerButtons[1] + Slicer, Button: PAD1 (in SLICER-Mode, Deck 3 active) + 0x99 + 0x60 + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].slicerButtons[1] + Slicer, Button: PAD1 (in SLICER-Mode, Deck 4 active) + 0x9A + 0x60 + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].slicerButtons[2] + Slicer, Button: PAD2 (in SLICER-Mode, Deck 1 active) + 0x97 + 0x61 + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].slicerButtons[2] + Slicer, Button: PAD2 (in SLICER-Mode, Deck 2 active) + 0x98 + 0x61 + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].slicerButtons[2] + Slicer, Button: PAD2 (in SLICER-Mode, Deck 3 active) + 0x99 + 0x61 + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].slicerButtons[2] + Slicer, Button: PAD2 (in SLICER-Mode, Deck 4 active) + 0x9A + 0x61 + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].slicerButtons[3] + Slicer, Button: PAD3 (in SLICER-Mode, Deck 1 active) + 0x97 + 0x62 + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].slicerButtons[3] + Slicer, Button: PAD3 (in SLICER-Mode, Deck 2 active) + 0x98 + 0x62 + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].slicerButtons[3] + Slicer, Button: PAD3 (in SLICER-Mode, Deck 3 active) + 0x99 + 0x62 + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].slicerButtons[3] + Slicer, Button: PAD3 (in SLICER-Mode, Deck 4 active) + 0x9A + 0x62 + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].slicerButtons[4] + Slicer, Button: PAD4 (in SLICER-Mode, Deck 1 active) + 0x97 + 0x63 + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].slicerButtons[4] + Slicer, Button: PAD4 (in SLICER-Mode, Deck 2 active) + 0x98 + 0x63 + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].slicerButtons[4] + Slicer, Button: PAD4 (in SLICER-Mode, Deck 3 active) + 0x99 + 0x63 + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].slicerButtons[4] + Slicer, Button: PAD4 (in SLICER-Mode, Deck 4 active) + 0x9A + 0x63 + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].slicerButtons[5] + Slicer, Button: PAD5 (in SLICER-Mode, Deck 1 active) + 0x97 + 0x64 + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].slicerButtons[5] + Slicer, Button: PAD5 (in SLICER-Mode, Deck 2 active) + 0x98 + 0x64 + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].slicerButtons[5] + Slicer, Button: PAD5 (in SLICER-Mode, Deck 3 active) + 0x99 + 0x64 + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].slicerButtons[5] + Slicer, Button: PAD5 (in SLICER-Mode, Deck 4 active) + 0x9A + 0x64 + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].slicerButtons[6] + Slicer, Button: PAD6 (in SLICER-Mode, Deck 1 active) + 0x97 + 0x65 + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].slicerButtons[6] + Slicer, Button: PAD6 (in SLICER-Mode, Deck 2 active) + 0x98 + 0x65 + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].slicerButtons[6] + Slicer, Button: PAD6 (in SLICER-Mode, Deck 3 active) + 0x99 + 0x65 + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].slicerButtons[6] + Slicer, Button: PAD6 (in SLICER-Mode, Deck 4 active) + 0x9A + 0x65 + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].slicerButtons[7] + Slicer, Button: PAD7 (in SLICER-Mode, Deck 1 active) + 0x97 + 0x66 + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].slicerButtons[7] + Slicer, Button: PAD7 (in SLICER-Mode, Deck 2 active) + 0x98 + 0x66 + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].slicerButtons[7] + Slicer, Button: PAD7 (in SLICER-Mode, Deck 3 active) + 0x99 + 0x66 + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].slicerButtons[7] + Slicer, Button: PAD7 (in SLICER-Mode, Deck 4 active) + 0x9A + 0x66 + + + + + + [Channel1] + PioneerDDJSB3.padForDeck[1].slicerButtons[8] + Slicer, Button: PAD8 (in SLICER-Mode, Deck 1 active) + 0x97 + 0x67 + + + + + + [Channel2] + PioneerDDJSB3.padForDeck[2].slicerButtons[8] + Slicer, Button: PAD8 (in SLICER-Mode, Deck 2 active) + 0x98 + 0x67 + + + + + + [Channel3] + PioneerDDJSB3.padForDeck[3].slicerButtons[8] + Slicer, Button: PAD8 (in SLICER-Mode, Deck 3 active) + 0x99 + 0x67 + + + + + + [Channel4] + PioneerDDJSB3.padForDeck[4].slicerButtons[8] + Slicer, Button: PAD8 (in SLICER-Mode, Deck 4 active) + 0x9A + 0x67 + + + + + + + + From 82be65d621b04601c53fd9d29a3e5e4a3fed7a3e Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 15 May 2021 10:46:21 -0500 Subject: [PATCH 02/34] remove license notice --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 32 ---------------------- 1 file changed, 32 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index f4d35f303f0..490ac634ed6 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -50,38 +50,6 @@ PioneerDDJSB3.looprollIntervals = [1 / 16, 1 / 8, 1 / 4, 1 / 2, 1, 2, 4, 8]; - Hilton Rudham: Pioneer DDJ-SR mapping https://github.com/hrudham/Mixxx-Pioneer-DDJ-SR - GPL license notice for current version: - This program is free software; you can redistribute it and/or modify it under the terms of the - GNU General Public License as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See - the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with this program; if - not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - - MIT License for earlier versions: - Permission is hereby granted, free of charge, to any person obtaining a copy of this software - and associated documentation files (the "Software"), to deal in the Software without - restriction, including without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all copies or - substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - TODO: - - bug when touching jog wheel for first time in vinyl mode */ /////////////////////////////////////////////////////////////// From dd457b2ba02635c6eb8bd088342879936f3588a1 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 15 May 2021 10:47:50 -0500 Subject: [PATCH 03/34] fix eslint warning --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index 490ac634ed6..90315ba159d 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -91,8 +91,10 @@ PioneerDDJSB3.updateBPM = function(bpm, group) { var bpmBitsPadded = []; var offset = 16 - bpmBits.length; + + var i; - for (var i=0; i<16; i++) { + for (i=0; i<16; i++) { if (i < offset) { bpmBitsPadded[i] = "0"; } else { @@ -102,8 +104,7 @@ PioneerDDJSB3.updateBPM = function(bpm, group) { var bytes = []; - // eslint-disable-next-line no-redeclare - for (var i=0; i<4; i++) { + for (i=0; i<4; i++) { var mbyte = 0; for (var j=0; j<4; j++) { From 44909b5ee876c12db8bf40c69bcf995a402618ac Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 15 May 2021 14:27:43 -0500 Subject: [PATCH 04/34] reference functions directly --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 27 +++++++++++----------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index 90315ba159d..d4826fddd59 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -1,4 +1,3 @@ - var PioneerDDJSB3 = {}; //var PioneerDDJSB3 = {}; @@ -91,7 +90,7 @@ PioneerDDJSB3.updateBPM = function(bpm, group) { var bpmBitsPadded = []; var offset = 16 - bpmBits.length; - + var i; for (i=0; i<16; i++) { @@ -676,19 +675,19 @@ PioneerDDJSB3.bindDeckControlConnections = function(channelGroup, isUnbinding) { var i, index, controlsToFunctions = { - "pfl": "PioneerDDJSB3.headphoneCueLed", - "keylock": "PioneerDDJSB3.keyLockLed", - "loop_enabled": "PioneerDDJSB3.autoLoopLed", + "pfl": PioneerDDJSB3.headphoneCueLed, + "keylock": PioneerDDJSB3.keyLockLed, + "loop_enabled": PioneerDDJSB3.autoLoopLed, }; - controlsToFunctions.slipEnabled = "PioneerDDJSB3.slipLed"; + controlsToFunctions.slipEnabled = PioneerDDJSB3.slipLed; for (i = 1; i <= 8; i++) { - controlsToFunctions["hotcue_" + i + "_enabled"] = "PioneerDDJSB3.hotCueLeds"; + controlsToFunctions["hotcue_" + i + "_enabled"] = PioneerDDJSB3.hotCueLeds; } for (index in PioneerDDJSB3.looprollIntervals) { - controlsToFunctions["beatlooproll_" + PioneerDDJSB3.looprollIntervals[index] + "_activate"] = "PioneerDDJSB3.beatlooprollLeds"; + controlsToFunctions["beatlooproll_" + PioneerDDJSB3.looprollIntervals[index] + "_activate"] = PioneerDDJSB3.beatlooprollLeds; } script.bindConnections(channelGroup, controlsToFunctions, isUnbinding); @@ -702,13 +701,13 @@ PioneerDDJSB3.bindNonDeckControlConnections = function(isUnbinding) { } if (PioneerDDJSB3.showVumeterMaster) { - engine.connectControl("[Master]", "VuMeterL", "PioneerDDJSB3.VuMeterLeds", isUnbinding); - engine.connectControl("[Master]", "VuMeterR", "PioneerDDJSB3.VuMeterLeds", isUnbinding); + engine.connectControl("[Master]", "VuMeterL", PioneerDDJSB3.VuMeterLeds, isUnbinding); + engine.connectControl("[Master]", "VuMeterR", PioneerDDJSB3.VuMeterLeds, isUnbinding); } else { - engine.connectControl("[Channel1]", "VuMeter", "PioneerDDJSB3.VuMeterLeds", isUnbinding); - engine.connectControl("[Channel2]", "VuMeter", "PioneerDDJSB3.VuMeterLeds", isUnbinding); - engine.connectControl("[Channel3]", "VuMeter", "PioneerDDJSB3.VuMeterLeds", isUnbinding); - engine.connectControl("[Channel4]", "VuMeter", "PioneerDDJSB3.VuMeterLeds", isUnbinding); + engine.connectControl("[Channel1]", "VuMeter", PioneerDDJSB3.VuMeterLeds, isUnbinding); + engine.connectControl("[Channel2]", "VuMeter", PioneerDDJSB3.VuMeterLeds, isUnbinding); + engine.connectControl("[Channel3]", "VuMeter", PioneerDDJSB3.VuMeterLeds, isUnbinding); + engine.connectControl("[Channel4]", "VuMeter", PioneerDDJSB3.VuMeterLeds, isUnbinding); } }; From 7dbc374d36a040bab774221e1b00d52c379c7fde Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 15 May 2021 14:30:30 -0500 Subject: [PATCH 05/34] fix mixxx min version --- res/controllers/Pioneer-DDJ-SB3.midi.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-SB3.midi.xml b/res/controllers/Pioneer-DDJ-SB3.midi.xml index f222e7d8cd9..2eabba169d7 100755 --- a/res/controllers/Pioneer-DDJ-SB3.midi.xml +++ b/res/controllers/Pioneer-DDJ-SB3.midi.xml @@ -1,5 +1,5 @@ - + Pioneer DDJ-SB3 Dancephy.com From 4b6cb21b142aae8fe71f98fb160863222ab9bbcf Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 15 May 2021 14:48:54 -0500 Subject: [PATCH 06/34] add wiki, manual and forums information --- res/controllers/Pioneer-DDJ-SB3.midi.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3.midi.xml b/res/controllers/Pioneer-DDJ-SB3.midi.xml index 2eabba169d7..44131102320 100755 --- a/res/controllers/Pioneer-DDJ-SB3.midi.xml +++ b/res/controllers/Pioneer-DDJ-SB3.midi.xml @@ -1,11 +1,12 @@ - + Pioneer DDJ-SB3 Dancephy.com Mapping file for the Pioneer DDJ-SB3 controller. Version 1.1.0. - - + https://github.com/mixxxdj/mixxx/wiki/Pioneer%20DDJ-SB3 + pioneer_ddj_sb3 + https://mixxx.discourse.group/t/pioneer-ddj-sb3-mapping-v1-0-now-available/22186 @@ -5097,4 +5098,4 @@ - + \ No newline at end of file From 67ab07ca1f448da25a7f99451f68bef560e1e4f9 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 15 May 2021 15:40:56 -0500 Subject: [PATCH 07/34] remove unused setting --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index d4826fddd59..fcb63bc995b 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -160,8 +160,7 @@ PioneerDDJSB3.scratchSettings = { "alpha": 1.0 / 8, "beta": 1.0 / 8 / 32, "jogResolution": 720, - "vinylSpeed": 33 + 1 / 3, - "safeScratchTimeout": 20 + "vinylSpeed": 33 + 1 / 3 }; PioneerDDJSB3.channelGroups = { From 46b7cc94cc7d8bc16daee77b316680d6053f01cf Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 15 May 2021 15:44:21 -0500 Subject: [PATCH 08/34] pass in actual function --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index fcb63bc995b..34b839c2ba5 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -267,7 +267,7 @@ PioneerDDJSB3.init = function() { PioneerDDJSB3.initDeck("[Channel4]"); if (PioneerDDJSB3.twinkleVumeterAutodjOn) { - PioneerDDJSB3.vuMeterTimer = engine.beginTimer(100, "PioneerDDJSB3.vuMeterTwinkle()"); + PioneerDDJSB3.vuMeterTimer = engine.beginTimer(100, PioneerDDJSB3.vuMeterTwinkle()); } // request the positions of the knobs and faders from the controller From b1c796cd48cc5fa4e7adb824bd7df686a5160b4e Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 15 May 2021 15:48:35 -0500 Subject: [PATCH 09/34] fix redeclare issue --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index 34b839c2ba5..ed5ed6226bb 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -284,20 +284,20 @@ PioneerDDJSB3.Deck = function(deckNumber) { this.group = "[Channel" + deckNumber + "]"; this.shiftButton = function(channel, control, value, status, group) { + var i; if (value > 0) { theDeck.shift(); PioneerDDJSB3.shiftPressed = true; PioneerDDJSB3.chFaderStart[deckNumber] = null; PioneerDDJSB3.headphoneLevel.shift(); - for (var i = 0; i < PioneerDDJSB3.shiftListeners.length; i++) { + for (i = 0; i < PioneerDDJSB3.shiftListeners.length; i++) { PioneerDDJSB3.shiftListeners[i](group, true); } } else { theDeck.unshift(); PioneerDDJSB3.shiftPressed = false; PioneerDDJSB3.headphoneLevel.unshift(); - // eslint-disable-next-line no-redeclare - for (var i = 0; i < PioneerDDJSB3.shiftListeners.length; i++) { + for (i = 0; i < PioneerDDJSB3.shiftListeners.length; i++) { PioneerDDJSB3.shiftListeners[i](group, false); } } From fa8de7b9fc0fa53ab48fb39f8a82a7e1d6975477 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 15 May 2021 15:55:39 -0500 Subject: [PATCH 10/34] remove copyright notice --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 1 - 1 file changed, 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index ed5ed6226bb..62bb37a2b66 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -35,7 +35,6 @@ PioneerDDJSB3.looprollIntervals = [1 / 16, 1 / 8, 1 / 4, 1 / 2, 1, 2, 4, 8]; /* Pioneer DDJ-SB3 mapping for Mixxx - Copyright (c) 2019 Dancephy LLC (javier@dancephy.com), licensed under GPL version 3 or later Copyright (c) 2017 Be (be.0@gmx.com), licensed under GPL version 2 or later Copyright (c) 2014-2015 various contributors, licensed under MIT license From ef14382249ea2215fffc012070ac16b72111a1dc Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 22 May 2021 13:58:30 -0500 Subject: [PATCH 11/34] reorder and style fix --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 28 ++++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index 62bb37a2b66..d7d947ebbf3 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -92,7 +92,7 @@ PioneerDDJSB3.updateBPM = function(bpm, group) { var i; - for (i=0; i<16; i++) { + for (i = 0; i < 16; i++) { if (i < offset) { bpmBitsPadded[i] = "0"; } else { @@ -102,10 +102,10 @@ PioneerDDJSB3.updateBPM = function(bpm, group) { var bytes = []; - for (i=0; i<4; i++) { + for (i = 0; i < 4; i++) { var mbyte = 0; - for (var j=0; j<4; j++) { + for (var j = 0; j < 4; j++) { var bitIndex = (i * 4) + j; var bit = parseInt(bpmBitsPadded[bitIndex]); mbyte = mbyte | (bit << (3 - j)); @@ -1038,18 +1038,20 @@ PioneerDDJSB3.deckConverter = function(group) { }; PioneerDDJSB3.padLedControl = function(deck, groupNumber, shiftGroup, ledNumber, shift, active) { - var padLedsBaseChannel = 0x97, - padLedControl = (shiftGroup ? 0x40 : 0x00) + (shift ? 0x08 : 0x00) + groupNumber + ledNumber, - midiChannelOffset = PioneerDDJSB3.deckConverter(deck); + var midiChannelOffset = PioneerDDJSB3.deckConverter(deck); - if (midiChannelOffset !== null) { - engine.log("Pad Led: deck: " + deck + " group: " + groupNumber + " led: " + ledNumber + " active: " + !!active); - midi.sendShortMsg( - padLedsBaseChannel + midiChannelOffset, - padLedControl, - active ? 0x7F : 0x00 - ); + if (midiChannelOffset === null || midiChannelOffset === undefined) { + return; } + + var padLedsBaseChannel = 0x97; + var padLedControl = (shiftGroup ? 0x40 : 0x00) + (shift ? 0x08 : 0x00) + groupNumber + ledNumber; + + midi.sendShortMsg( + padLedsBaseChannel + midiChannelOffset, + padLedControl, + active ? 0x7F : 0x00 + ); }; PioneerDDJSB3.flashingPadLedControl = []; From 82d9923213f8652f2973257433bac0c0943c528e Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 22 May 2021 14:10:56 -0500 Subject: [PATCH 12/34] reorder and fix style --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index d7d947ebbf3..51232c72fba 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -1094,16 +1094,19 @@ PioneerDDJSB3.stopFlashingPadLedControl = function(deck, groupNumber, shiftGroup }; PioneerDDJSB3.nonPadLedControl = function(deck, ledNumber, active) { - var nonPadLedsBaseChannel = 0x90, - midiChannelOffset = PioneerDDJSB3.deckConverter(deck); - - if (midiChannelOffset !== null) { - midi.sendShortMsg( - nonPadLedsBaseChannel + midiChannelOffset, - ledNumber, - active ? 0x7F : 0x00 - ); + var midiChannelOffset = PioneerDDJSB3.deckConverter(deck); + + if (midiChannelOffset === null || midiChannelOffset === undefined) { + return; } + + var nonPadLedsBaseChannel = 0x90; + + midi.sendShortMsg( + nonPadLedsBaseChannel + midiChannelOffset, + ledNumber, + active ? 0x7F : 0x00 + ); }; From f187301b8dfa2949dc8be7468b6bc46434f8a43a Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 22 May 2021 14:58:16 -0500 Subject: [PATCH 13/34] remove unused property --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index 51232c72fba..7e9cfaad475 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -728,13 +728,6 @@ PioneerDDJSB3.deckShiftSwitchTable = { "[Channel4]": "[Channel2]" }; -PioneerDDJSB3.deckIndexTable = { - "[Channel1]": 0, - "[Channel2]": 1, - "[Channel3]": 2, - "[Channel4]": 3 -}; - PioneerDDJSB3.initDeck = function(group) { PioneerDDJSB3.bindDeckControlConnections(group, false); PioneerDDJSB3.nonPadLedControl(group, PioneerDDJSB3.nonPadLeds.shiftKeyLock, PioneerDDJSB3.channelGroups[group] > 1); From e15325caf4493fb0013e9d0ef9c7db74a83e1350 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 22 May 2021 15:19:10 -0500 Subject: [PATCH 14/34] consolidate function code --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 74 ++++++++-------------- 1 file changed, 26 insertions(+), 48 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index 7e9cfaad475..963325f09e3 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -937,6 +937,30 @@ PioneerDDJSB3.headphoneMasterUpdate = function() { } }; +PioneerDDJSB3.inValueScale= function(input) { + // Scale so that: + // from 0/4 to 3/4 - 500 of input represents 0.0 to 1.0 + // from 3/4 - 500 to 3/4 + 500 represents 1.0 + // from 3/4 + 500 to 4/4 represents 1.0 to 5.0 + var absoluteMax = 0xFFFF >> 2; + var inputMax = this.max; + + var zeroRange = (inputMax / absoluteMax) * 500; + + var inputQuart = Math.round(inputMax / 4); + + var fromInfToZero = (inputQuart * 3) - zeroRange; + var fromZeroToFive = (inputQuart * 3) + zeroRange; + + if (input < fromInfToZero) { + return input / fromInfToZero; + } else if (input > fromZeroToFive) { + return (input / inputMax) * 5.0; + } else { + return 1.0; + } +}; + PioneerDDJSB3.headphoneLevel = new components.Pot({ unshift: function() { this.group = "[Master]"; @@ -952,30 +976,7 @@ PioneerDDJSB3.headphoneLevel = new components.Pot({ this.connect(); }, - inValueScale: function(input) { - // Scale so that: - // from 0/4 to 3/4 - 500 of input represents 0.0 to 1.0 - // from 3/4 - 500 to 3/4 + 500 represents 1.0 - // from 3/4 + 500 to 4/4 represents 1.0 to 5.0 - - var absoluteMax = 0xFFFF >> 2; - var inputMax = this.max; - - var zeroRange = (inputMax / absoluteMax) * 500; - - var inputQuart = Math.round(inputMax / 4); - - var fromInfToZero = (inputQuart * 3) - zeroRange; - var fromZeroToFive = (inputQuart * 3) + zeroRange; - - if (input < fromInfToZero) { - return input / fromInfToZero; - } else if (input > fromZeroToFive) { - return (input / inputMax) * 5.0; - } else { - return 1.0; - } - } + inValueScale: PioneerDDJSB3.inValueScale }); PioneerDDJSB3.masterGain = new components.Pot({ @@ -986,30 +987,7 @@ PioneerDDJSB3.masterGain = new components.Pot({ this.connect(); }, - inValueScale: function(input) { - // Scale so that: - // from 0/4 to 3/4 - 500 of input represents 0.0 to 1.0 - // from 3/4 - 500 to 3/4 + 500 represents 1.0 - // from 3/4 + 500 to 4/4 represents 1.0 to 5.0 - - var absoluteMax = 0xFFFF >> 2; - var inputMax = this.max; - - var zeroRange = (inputMax / absoluteMax) * 500; - - var inputQuart = Math.round(inputMax / 4); - - var fromInfToZero = (inputQuart * 3) - zeroRange; - var fromZeroToFive = (inputQuart * 3) + zeroRange; - - if (input < fromInfToZero) { - return input / fromInfToZero; - } else if (input > fromZeroToFive) { - return (input / inputMax) * 5.0; - } else { - return 1.0; - } - } + inValueScale: PioneerDDJSB3.inValueScale }); /////////////////////////////////////////////////////////////// From b2e83ee3e7c2f7c4bdd48363e6421b254ee0b997 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 22 May 2021 15:31:22 -0500 Subject: [PATCH 15/34] remove unnecessary code --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index 963325f09e3..dcf4f661207 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -84,7 +84,7 @@ PioneerDDJSB3.updateBPM = function(bpm, group) { } var bpmValue = Math.round(bpm * 100); - var bpmBits = bpmValue.toString(2).split(""); + var bpmBits = bpmValue.toString(2); var bpmBitsPadded = []; From 78a963d134a89d678ff5382a8a45e8faa4917752 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 22 May 2021 15:38:51 -0500 Subject: [PATCH 16/34] fix redeclare error --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index dcf4f661207..065598d61aa 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -1431,7 +1431,9 @@ PioneerDDJSB3.EffectUnit = function(unitNumber) { } }; - for (var i = 1; i <= 3; i++) { + var i; + + for (i = 1; i <= 3; i++) { this.buttonLights[i] = new this.EffectButtonLight(i); } @@ -1495,8 +1497,7 @@ PioneerDDJSB3.EffectUnit = function(unitNumber) { this.button = []; - // eslint-disable-next-line no-redeclare - for (var i = 1; i <= 3; i++) { + for (i = 1; i <= 3; i++) { this.button[i] = new this.EffectEnableButton(i); this.button[i + 3] = new this.EffectFocusButton(i); @@ -1607,15 +1608,17 @@ PioneerDDJSB3.Slicer.prototype.PLAY_POSITION_FLOOR = 0; PioneerDDJSB3.Slicer.prototype.PLAY_POSITION_RANGE = 1 - PioneerDDJSB3.Slicer.prototype.PLAY_POSITION_FLOOR; PioneerDDJSB3.Slicer.prototype.shutdown = function() { - for (var i = 0; i < this.midiOutputBeatLeds.length; i++) { + var i; + + for (i = 0; i < this.midiOutputBeatLeds.length; i++) { var ledMidi = this.midiOutputBeatLeds[i]; if (ledMidi) { midi.sendShortMsg(this.midiOutputOp, ledMidi, 0x0); } } - // eslint-disable-next-line no-redeclare - for (var i = 0; i < this.connections.length; i++) { + + for (i = 0; i < this.connections.length; i++) { this.connections[i].disconnect(); } }; From 547deeb8fc2735740833354b4c866214681f179c Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sun, 23 May 2021 12:25:51 -0500 Subject: [PATCH 17/34] add newline --- res/controllers/Pioneer-DDJ-SB3.midi.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-SB3.midi.xml b/res/controllers/Pioneer-DDJ-SB3.midi.xml index 44131102320..73291494ca7 100755 --- a/res/controllers/Pioneer-DDJ-SB3.midi.xml +++ b/res/controllers/Pioneer-DDJ-SB3.midi.xml @@ -5098,4 +5098,4 @@ - \ No newline at end of file + From 5304f96fb7fd63a4c54f1ad3a3fe3076f53d842e Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Tue, 25 May 2021 17:38:46 -0500 Subject: [PATCH 18/34] remove shifted headphone control Co-authored-by: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com> --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index 065598d61aa..250c5c2975d 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -969,12 +969,6 @@ PioneerDDJSB3.headphoneLevel = new components.Pot({ this.connect(); }, - shift: function() { - this.group = "[Master]"; - this.inKey = "headMix"; - this.disconnect(); - this.connect(); - }, inValueScale: PioneerDDJSB3.inValueScale }); From b59c939ed70ad428f74eb91057335d0bc675b03f Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Tue, 25 May 2021 17:48:43 -0500 Subject: [PATCH 19/34] remove call to shift on headphone --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 1 - 1 file changed, 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index 250c5c2975d..ed976eda4d2 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -288,7 +288,6 @@ PioneerDDJSB3.Deck = function(deckNumber) { theDeck.shift(); PioneerDDJSB3.shiftPressed = true; PioneerDDJSB3.chFaderStart[deckNumber] = null; - PioneerDDJSB3.headphoneLevel.shift(); for (i = 0; i < PioneerDDJSB3.shiftListeners.length; i++) { PioneerDDJSB3.shiftListeners[i](group, true); } From e5ec3779819bd37f89e95ddd8ff87f7eb50044b0 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 12 Jun 2021 14:05:02 -0500 Subject: [PATCH 20/34] replace led array with start plus index --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index ed976eda4d2..616cf42534b 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -153,7 +153,8 @@ PioneerDDJSB3.flasher.removeFunction = function(fn) { }); }; -PioneerDDJSB3.midiOutputBeatLeds = [0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67]; +PioneerDDJSB3.midiOutputBeatLedsStart = 0x60; +PioneerDDJSB3.midiOutputBeatLedsCount = 8; PioneerDDJSB3.scratchSettings = { "alpha": 1.0 / 8, @@ -429,7 +430,7 @@ PioneerDDJSB3.Pad = function(padNumber) { this.slicerButtons = []; - for (var i = 1; i <= PioneerDDJSB3.midiOutputBeatLeds.length; i++) { + for (var i = 1; i <= PioneerDDJSB3.midiOutputBeatLedsCount; i++) { (function(beat) { _this.slicerButtons[beat] = function(channel, control, value, status) { if (_this.slicer) { @@ -525,7 +526,7 @@ PioneerDDJSB3.Pad.prototype.slicerMode = function(channel, control, value) { var group = "[Channel" + this.padNumber + "]"; var midiOutputOp = 0x97 + this.padNumber - 1; - this.slicer = new PioneerDDJSB3.Slicer(group, midiOutputOp, PioneerDDJSB3.midiOutputBeatLeds); + this.slicer = new PioneerDDJSB3.Slicer(group, midiOutputOp); } } }; @@ -936,7 +937,7 @@ PioneerDDJSB3.headphoneMasterUpdate = function() { } }; -PioneerDDJSB3.inValueScale= function(input) { +PioneerDDJSB3.inValueScale = function(input) { // Scale so that: // from 0/4 to 3/4 - 500 of input represents 0.0 to 1.0 // from 3/4 - 500 to 3/4 + 500 represents 1.0 @@ -1542,13 +1543,12 @@ PioneerDDJSB3.EffectUnit.prototype.setShift = function(value) { // SLICER // /////////////////////////////////////////////////////////////// -PioneerDDJSB3.Slicer = function(group, midiOutputOp, midiOutputBeatLeds) { +PioneerDDJSB3.Slicer = function(group, midiOutputOp) { var _this = this; this.group = group; this.midiOutputOp = midiOutputOp; - this.midiOutputBeatLeds = midiOutputBeatLeds; this.beatPositions = []; @@ -1560,7 +1560,7 @@ PioneerDDJSB3.Slicer = function(group, midiOutputOp, midiOutputBeatLeds) { this.buttons = []; - for (var i = 1; i <= midiOutputBeatLeds.length; i++) { + for (var i = 1; i <= PioneerDDJSB3.midiOutputBeatLedsCount; i++) { (function(beat) { _this.buttons[beat] = function(channel, control, value) { if (value) { @@ -1603,8 +1603,8 @@ PioneerDDJSB3.Slicer.prototype.PLAY_POSITION_RANGE = 1 - PioneerDDJSB3.Slicer.pr PioneerDDJSB3.Slicer.prototype.shutdown = function() { var i; - for (i = 0; i < this.midiOutputBeatLeds.length; i++) { - var ledMidi = this.midiOutputBeatLeds[i]; + for (i = 0; i < PioneerDDJSB3.midiOutputBeatLedsCount.length; i++) { + var ledMidi = PioneerDDJSB3.midiOutputBeatLedsStart + i; if (ledMidi) { midi.sendShortMsg(this.midiOutputOp, ledMidi, 0x0); @@ -1631,7 +1631,7 @@ PioneerDDJSB3.Slicer.prototype.calculateBeats = function() { PioneerDDJSB3.Slicer.prototype.generateBeatPositions = function() { this.beatPositions = []; - for (var i = 0; i < this.midiOutputBeatLeds.length; i++) { + for (var i = 0; i < PioneerDDJSB3.midiOutputBeatLedsCount; i++) { var sample = this.firstBeatSample + (i * this.samplesPerBeat); var nextSample = this.firstBeatSample + ((i + 1) * this.samplesPerBeat); @@ -1713,10 +1713,10 @@ PioneerDDJSB3.Slicer.prototype.playPositionChange = function(value) { }; PioneerDDJSB3.Slicer.prototype.midiOuputUpdate = function() { - var onLedMidi = this.midiOutputBeatLeds[this.currentBeat]; + var onLedMidi = PioneerDDJSB3.midiOutputBeatLedsStart + this.currentBeat; - for (var i = 0; i < this.midiOutputBeatLeds.length; i++) { - var ledMidi = this.midiOutputBeatLeds[i]; + for (var i = 0; i < PioneerDDJSB3.midiOutputBeatLedsCount; i++) { + var ledMidi = PioneerDDJSB3.midiOutputBeatLedsStart + i; if (ledMidi !== onLedMidi) { midi.sendShortMsg(this.midiOutputOp, ledMidi, 0x0); From 085532b243b1ff0d30ab6a5b0020491fd3cafe80 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 12 Jun 2021 14:11:35 -0500 Subject: [PATCH 21/34] replace "manual" toggle with built in function --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index 616cf42534b..a8cda01c035 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -793,11 +793,7 @@ PioneerDDJSB3.vinylButton = function(channel, control, value, status, group) { PioneerDDJSB3.slipButton = function(channel, control, value, status, group) { if (value) { - if (engine.getValue(group, "slipEnabled")) { - engine.setValue(group, "slipEnabled", false); - } else { - engine.setValue(group, "slipEnabled", true); - } + script.toggleControl(group, "slipEnabled"); } }; From 46f6fc530aabd8a7768ee20387db52b08c97b421 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 2 Oct 2021 09:39:06 -0500 Subject: [PATCH 22/34] add comment to clarify use of component --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index a8cda01c035..ebcceadb7c5 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -349,7 +349,8 @@ PioneerDDJSB3.Deck = function(deckNumber) { if (deckNumber > 2) { effectUnitNumber -= 2; } - + + // The Mixxx UI call this Gain, but on the controller the knob is labeled TRIM this.gainKnob = new components.Pot({ unshift: function() { this.group = "[Channel" + deckNumber + "]"; From 97a9c645963a8c194786df259a2a85e8c3907d01 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 2 Oct 2021 09:41:31 -0500 Subject: [PATCH 23/34] fix line endings --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index ebcceadb7c5..a1b003f882f 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -349,7 +349,7 @@ PioneerDDJSB3.Deck = function(deckNumber) { if (deckNumber > 2) { effectUnitNumber -= 2; } - + // The Mixxx UI call this Gain, but on the controller the knob is labeled TRIM this.gainKnob = new components.Pot({ unshift: function() { From 47fbd7d785d2324fa7bea30aeb5f35f62a35aeb8 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 2 Oct 2021 10:04:02 -0500 Subject: [PATCH 24/34] remove flashing of play button while paused --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 26 ++-------------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index a1b003f882f..98faf6b20a1 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -301,33 +301,11 @@ PioneerDDJSB3.Deck = function(deckNumber) { } } }; - var playButton = this.playButton = new components.PlayButton({ + this.playButton = new components.PlayButton({ midi: [0x90 + deckNumber - 1, 0x0B], shiftOffset: 60, shiftControl: true, - sendShifted: true, - connect: function() { - this.connections[0] = engine.makeConnection(this.group, "play_indicator", this.output); - this.connections[1] = engine.makeConnection(this.group, "track_loaded", this.output); - }, - flashLed: function(active) { - playButton.send(playButton.outValueScale(active)); - }, - output: function(value, group, control) { - playButton[control] = value; - - if (playButton.track_loaded) { - if (playButton.play_indicator) { - PioneerDDJSB3.flasher.removeFunction(playButton.flashLed); - playButton.send(playButton.outValueScale(true)); - } else { - PioneerDDJSB3.flasher.addFunction(playButton.flashLed); - } - } else { - PioneerDDJSB3.flasher.removeFunction(playButton.flashLed); - playButton.send(playButton.outValueScale(false)); - } - } + sendShifted: true }); this.cueButton = new components.CueButton({ From 11b225527da53ee21bc7df109bdb924795a18293 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 2 Oct 2021 10:18:06 -0500 Subject: [PATCH 25/34] remove non-standard uses of knobs --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index 98faf6b20a1..c2bb99f5590 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -335,14 +335,7 @@ PioneerDDJSB3.Deck = function(deckNumber) { this.inKey = "pregain"; this.disconnect(); this.connect(); - }, - shift: function() { - var focusedEffect = engine.getValue("[EffectRack1_EffectUnit" + effectUnitNumber + "]", "focused_effect"); - this.group = "[EffectRack1_EffectUnit" + effectUnitNumber + "_Effect" + focusedEffect + "]"; - this.inKey = "parameter1"; - this.disconnect(); - this.connect(); - }, + } }); this.eqKnob = []; @@ -354,14 +347,7 @@ PioneerDDJSB3.Deck = function(deckNumber) { this.inKey = "parameter" + this.number; this.disconnect(); this.connect(); - }, - shift: function() { - var focusedEffect = engine.getValue("[EffectRack1_EffectUnit" + effectUnitNumber + "]", "focused_effect"); - this.group = "[EffectRack1_EffectUnit" + effectUnitNumber + "_Effect" + focusedEffect + "]"; - this.inKey = "parameter" + (5 - this.number); - this.disconnect(); - this.connect(); - }, + } }); } From 0ff4beac200825eae66cfe992532ba678762d312 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 2 Oct 2021 10:43:31 -0500 Subject: [PATCH 26/34] add improvement suggestion --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index c2bb99f5590..641811f43f8 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -382,9 +382,9 @@ PioneerDDJSB3.Deck = function(deckNumber) { engine.setValue("[Channel" + deckNumber + "]", "rate_dir", -1); - PioneerDDJSB3.updateBPM(0, "[Channel" + deckNumber + "]"); this.loadConnection = engine.makeConnection("[Channel" + deckNumber + "]", "track_loaded", PioneerDDJSB3.trackLoaded); this.bpmConnection = engine.makeConnection("[Channel" + deckNumber + "]", "bpm", PioneerDDJSB3.updateBPM); + this.bpmConnection.trigger(); }; PioneerDDJSB3.Deck.prototype = components.ComponentContainer.prototype; From a015f27218f34cb6db76e3174add11da39d8a2bc Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 2 Oct 2021 12:53:34 -0500 Subject: [PATCH 27/34] replace padmode magic numbers with "enum" --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 44 +++++++++++++--------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index 641811f43f8..02a6a974a7b 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -1,5 +1,15 @@ var PioneerDDJSB3 = {}; -//var PioneerDDJSB3 = {}; + +PioneerDDJSB3.PadMode = { + HotCue: 0x1B, + FxFadeMix: 0x1E, + PadScratch: 0x20, + Sampler: 0x22, + BeatJump: 0x69, + Roll: 0x6B, + Slicer: 0x6D, + Trans: 0x6E +}; /////////////////////////////////////////////////////////////// // USER OPTIONS // @@ -427,14 +437,14 @@ PioneerDDJSB3.Pad = function(padNumber) { }; PioneerDDJSB3.Pad.prototype.setModeActive = function(activeMode) { - midi.sendShortMsg(0x90 + this.padNumber - 1, 0x1B, activeMode === 0x1B ? 0x7F : 0x0); - midi.sendShortMsg(0x90 + this.padNumber - 1, 0x1E, activeMode === 0x1E ? 0x7F : 0x0); - midi.sendShortMsg(0x90 + this.padNumber - 1, 0x20, activeMode === 0x20 ? 0x7F : 0x0); - midi.sendShortMsg(0x90 + this.padNumber - 1, 0x22, activeMode === 0x22 ? 0x7F : 0x0); - midi.sendShortMsg(0x90 + this.padNumber - 1, 0x69, activeMode === 0x69 ? 0x7F : 0x0); - midi.sendShortMsg(0x90 + this.padNumber - 1, 0x6B, activeMode === 0x6B ? 0x7F : 0x0); - midi.sendShortMsg(0x90 + this.padNumber - 1, 0x6D, activeMode === 0x6D ? 0x7F : 0x0); - midi.sendShortMsg(0x90 + this.padNumber - 1, 0x6E, activeMode === 0x6E ? 0x7F : 0x0); + midi.sendShortMsg(0x90 + this.padNumber - 1, PioneerDDJSB3.PadMode.HotCue, activeMode === PioneerDDJSB3.PadMode.HotCue ? 0x7F : 0x0); + midi.sendShortMsg(0x90 + this.padNumber - 1, PioneerDDJSB3.PadMode.FxFadeMix, activeMode === PioneerDDJSB3.PadMode.FxFadeMix ? 0x7F : 0x0); + midi.sendShortMsg(0x90 + this.padNumber - 1, PioneerDDJSB3.PadMode.PadScratch, activeMode === PioneerDDJSB3.PadMode.PadScratch ? 0x7F : 0x0); + midi.sendShortMsg(0x90 + this.padNumber - 1, PioneerDDJSB3.PadMode.Sampler, activeMode === PioneerDDJSB3.PadMode.Sampler ? 0x7F : 0x0); + midi.sendShortMsg(0x90 + this.padNumber - 1, PioneerDDJSB3.PadMode.BeatJump, activeMode === PioneerDDJSB3.PadMode.BeatJump ? 0x7F : 0x0); + midi.sendShortMsg(0x90 + this.padNumber - 1, PioneerDDJSB3.PadMode.Roll, activeMode === PioneerDDJSB3.PadMode.Roll ? 0x7F : 0x0); + midi.sendShortMsg(0x90 + this.padNumber - 1, PioneerDDJSB3.PadMode.Slicer, activeMode === PioneerDDJSB3.PadMode.Slicer ? 0x7F : 0x0); + midi.sendShortMsg(0x90 + this.padNumber - 1, PioneerDDJSB3.PadMode.Trans, activeMode === PioneerDDJSB3.PadMode.Trans ? 0x7F : 0x0); }; PioneerDDJSB3.Pad.prototype.clearSlicer = function() { @@ -446,14 +456,14 @@ PioneerDDJSB3.Pad.prototype.clearSlicer = function() { PioneerDDJSB3.Pad.prototype.hotcueMode = function(channel, control, value) { if (value) { - this.setModeActive(0x1B); + this.setModeActive(PioneerDDJSB3.PadMode.HotCue); this.clearSlicer(); } }; PioneerDDJSB3.Pad.prototype.beatJumpMode = function(channel, control, value) { if (value) { - this.setModeActive(0x69); + this.setModeActive(PioneerDDJSB3.PadMode.BeatJump); this.clearSlicer(); // Let jump pad led on @@ -464,28 +474,28 @@ PioneerDDJSB3.Pad.prototype.beatJumpMode = function(channel, control, value) { PioneerDDJSB3.Pad.prototype.fxFadeMode = function(channel, control, value) { if (value) { - this.setModeActive(0x1E); + this.setModeActive(PioneerDDJSB3.PadMode.FxFadeMix); this.clearSlicer(); } }; PioneerDDJSB3.Pad.prototype.rollMode = function(channel, control, value) { if (value) { - this.setModeActive(0x6B); + this.setModeActive(PioneerDDJSB3.PadMode.Roll); this.clearSlicer(); } }; PioneerDDJSB3.Pad.prototype.padScratchMode = function(channel, control, value) { if (value) { - this.setModeActive(0x20); + this.setModeActive(PioneerDDJSB3.PadMode.PadScratch); this.clearSlicer(); } }; PioneerDDJSB3.Pad.prototype.slicerMode = function(channel, control, value) { if (value) { - this.setModeActive(0x6D); + this.setModeActive(PioneerDDJSB3.PadMode.Slicer); if (!this.slicer) { var group = "[Channel" + this.padNumber + "]"; @@ -498,14 +508,14 @@ PioneerDDJSB3.Pad.prototype.slicerMode = function(channel, control, value) { PioneerDDJSB3.Pad.prototype.samplerMode = function(channel, control, value) { if (value) { - this.setModeActive(0x22); + this.setModeActive(PioneerDDJSB3.PadMode.Sampler); this.clearSlicer(); } }; PioneerDDJSB3.Pad.prototype.transMode = function(channel, control, value) { if (value) { - this.setModeActive(0x6E); + this.setModeActive(PioneerDDJSB3.PadMode.Trans); this.clearSlicer(); } }; From 96ae21f744438d1d468f78b1ca7e514649e8b107 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 2 Oct 2021 12:56:20 -0500 Subject: [PATCH 28/34] fix version --- res/controllers/Pioneer-DDJ-SB3.midi.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-SB3.midi.xml b/res/controllers/Pioneer-DDJ-SB3.midi.xml index 73291494ca7..0c983939c2a 100755 --- a/res/controllers/Pioneer-DDJ-SB3.midi.xml +++ b/res/controllers/Pioneer-DDJ-SB3.midi.xml @@ -1,5 +1,5 @@ - + Pioneer DDJ-SB3 Dancephy.com From 34e65a3c50976752c144d714f992b08fc4d4b48c Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 18 Dec 2021 17:19:01 -0600 Subject: [PATCH 29/34] move padmode after user options --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index 02a6a974a7b..cb4bf21efd3 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -1,16 +1,5 @@ var PioneerDDJSB3 = {}; -PioneerDDJSB3.PadMode = { - HotCue: 0x1B, - FxFadeMix: 0x1E, - PadScratch: 0x20, - Sampler: 0x22, - BeatJump: 0x69, - Roll: 0x6B, - Slicer: 0x6D, - Trans: 0x6E -}; - /////////////////////////////////////////////////////////////// // USER OPTIONS // /////////////////////////////////////////////////////////////// @@ -60,6 +49,17 @@ PioneerDDJSB3.looprollIntervals = [1 / 16, 1 / 8, 1 / 4, 1 / 2, 1, 2, 4, 8]; */ +PioneerDDJSB3.PadMode = { + HotCue: 0x1B, + FxFadeMix: 0x1E, + PadScratch: 0x20, + Sampler: 0x22, + BeatJump: 0x69, + Roll: 0x6B, + Slicer: 0x6D, + Trans: 0x6E +}; + /////////////////////////////////////////////////////////////// // INIT, SHUTDOWN & GLOBAL HELPER // /////////////////////////////////////////////////////////////// From 7e52ecc7fca01016c63f36847ff70942ca6ab687 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sun, 26 Dec 2021 14:47:45 -0600 Subject: [PATCH 30/34] enable hotcues 5-8 --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 29 +----- res/controllers/Pioneer-DDJ-SB3.midi.xml | 104 ++++++++++----------- 2 files changed, 53 insertions(+), 80 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index cb4bf21efd3..eb17325500b 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -1129,42 +1129,15 @@ PioneerDDJSB3.hotCueLeds = function(value, group, control) { for (hotCueNum = 1; hotCueNum <= 8; hotCueNum++) { if (control === "hotcue_" + hotCueNum + "_enabled") { padNum = (hotCueNum - 1); - - if (hotCueNum <= 4) { - PioneerDDJSB3.padLedControl(group, PioneerDDJSB3.ledGroups.hotCue, shiftedGroup, padNum, false, value); - } else { - PioneerDDJSB3.hotCueLedStates[group].states[hotCueNum] = value; - PioneerDDJSB3.updateHotCueLeds(); - } + PioneerDDJSB3.padLedControl(group, PioneerDDJSB3.ledGroups.hotCue, shiftedGroup, padNum, false, value); } } }; PioneerDDJSB3.shiftListeners.push(function(group, isShifted) { PioneerDDJSB3.hotCueLedStates[group].isShifted = isShifted; - PioneerDDJSB3.updateHotCueLeds(); }); -PioneerDDJSB3.updateHotCueLeds = function() { - var shiftedGroup = false; - - for (var channelIdx = 1; channelIdx <= 4; channelIdx++) { - var group = "[Channel" + channelIdx + "]"; - var channel = PioneerDDJSB3.hotCueLedStates[group]; - - - for (var hotCue = 5; hotCue <= 8; hotCue++) { - var padNum = hotCue - 1; - - if (channel.isShifted && channel.states[hotCue]) { - PioneerDDJSB3.padLedControl(group, PioneerDDJSB3.ledGroups.hotCue, shiftedGroup, padNum, false, true); - } else { - PioneerDDJSB3.padLedControl(group, PioneerDDJSB3.ledGroups.hotCue, shiftedGroup, padNum, false, false); - } - } - } -}; - PioneerDDJSB3.VuMeterLeds = function(value, group, control) { // The red LED lights up with MIDI values 119 (0x77) and above. That should only light up when // the track is clipping. diff --git a/res/controllers/Pioneer-DDJ-SB3.midi.xml b/res/controllers/Pioneer-DDJ-SB3.midi.xml index 0c983939c2a..0f649e1bf2e 100755 --- a/res/controllers/Pioneer-DDJ-SB3.midi.xml +++ b/res/controllers/Pioneer-DDJ-SB3.midi.xml @@ -3177,8 +3177,8 @@ [Channel1] - start - Start of track Deck 1, Button: PAD5 (in HOT-CUE-Mode, Deck 1 active) + hotcue_5_activate + Hot-Cue 5 Deck 1, Button: PAD5 (in HOT-CUE-Mode, Deck 1 active) 0x97 0x04 @@ -3187,8 +3187,8 @@ [Channel2] - start - Start of track Deck 2, Button: PAD5 (in HOT-CUE-Mode, Deck 2 active) + hotcue_5_activate + Hot-Cue 5 Deck 2, Button: PAD5 (in HOT-CUE-Mode, Deck 2 active) 0x98 0x04 @@ -3197,8 +3197,8 @@ [Channel3] - start - Start of track Deck 3, Button: PAD5 (in HOT-CUE-Mode, Deck 3 active) + hotcue_5_activate + Hot-Cue 5 Deck 3, Button: PAD5 (in HOT-CUE-Mode, Deck 3 active) 0x99 0x04 @@ -3207,8 +3207,8 @@ [Channel4] - start - Start of track Deck 4, Button: PAD5 (in HOT-CUE-Mode, Deck 4 active) + hotcue_5_activate + Hot-Cue 5 Deck 4, Button: PAD5 (in HOT-CUE-Mode, Deck 4 active) 0x9A 0x04 @@ -3217,7 +3217,7 @@ [Channel1] - hotcue_5_activate + hotcue_5_clear Hot-Cue 5 Deck 1, Button: SHIFT + PAD5 (in HOT-CUE-Mode, Deck 1 active) 0x97 0x0C @@ -3227,7 +3227,7 @@ [Channel2] - hotcue_5_activate + hotcue_5_clear Hot-Cue 5 Deck 2, Button: SHIFT + PAD5 (in HOT-CUE-Mode, Deck 2 active) 0x98 0x0C @@ -3237,7 +3237,7 @@ [Channel3] - hotcue_5_activate + hotcue_5_clear Hot-Cue 5 Deck 3, Button: SHIFT + PAD5 (in HOT-CUE-Mode, Deck 3 active) 0x99 0x0C @@ -3247,7 +3247,7 @@ [Channel4] - hotcue_5_activate + hotcue_5_clear Hot-Cue 5 Deck 4, Button: SHIFT + PAD5 (in HOT-CUE-Mode, Deck 4 active) 0x9A 0x0C @@ -3257,8 +3257,8 @@ [Channel1] - back - Back for track Deck 1, Button: PAD6 (in HOT-CUE-Mode, Deck 1 active) + hotcue_6_activate + Hot-Cue 6 Deck 1, Button: PAD6 (in HOT-CUE-Mode, Deck 1 active) 0x97 0x05 @@ -3267,8 +3267,8 @@ [Channel2] - back - Back for track Deck 2, Button: PAD6 (in HOT-CUE-Mode, Deck 2 active) + hotcue_6_activate + Hot-Cue 6 Deck 2, Button: PAD6 (in HOT-CUE-Mode, Deck 2 active) 0x98 0x05 @@ -3277,8 +3277,8 @@ [Channel3] - back - Back for track Deck 3, Button: PAD6 (in HOT-CUE-Mode, Deck 3 active) + hotcue_6_activate + Hot-Cue 6 Deck 3, Button: PAD6 (in HOT-CUE-Mode, Deck 3 active) 0x99 0x05 @@ -3287,8 +3287,8 @@ [Channel4] - back - Back for track Deck 4, Button: PAD6 (in HOT-CUE-Mode, Deck 4 active) + hotcue_6_activate + Hot-Cue 6 Deck 4, Button: SHIFT (in HOT-CUE-Mode, Deck 4 active) 0x9A 0x05 @@ -3297,7 +3297,7 @@ [Channel1] - hotcue_6_activate + hotcue_6_clear Hot-Cue 6 Deck 1, Button: SHIFT + PAD6 (in HOT-CUE-Mode, Deck 1 active) 0x97 0x0D @@ -3307,7 +3307,7 @@ [Channel2] - hotcue_6_activate + hotcue_6_clear Hot-Cue 6 Deck 2, Button: SHIFT + PAD6 (in HOT-CUE-Mode, Deck 2 active) 0x98 0x0D @@ -3317,7 +3317,7 @@ [Channel3] - hotcue_6_activate + hotcue_6_clear Hot-Cue 6 Deck 3, Button: SHIFT + PAD6 (in HOT-CUE-Mode, Deck 3 active) 0x99 0x0D @@ -3327,7 +3327,7 @@ [Channel4] - hotcue_6_activate + hotcue_6_clear Hot-Cue 6 Deck 4, Button: SHIFT + PAD6 (in HOT-CUE-Mode, Deck 4 active) 0x9A 0x0D @@ -3337,8 +3337,8 @@ [Channel1] - fwd - Forward for track Deck 1, Button: PAD7 (in HOT-CUE-Mode, Deck 1 active) + hotcue_7_activate + Hot-Cue 7 Deck 1, Button: PAD7 (in HOT-CUE-Mode, Deck 1 active) 0x97 0x06 @@ -3347,8 +3347,8 @@ [Channel2] - fwd - Forward for track Deck 2, Button: PAD7 (in HOT-CUE-Mode, Deck 2 active) + hotcue_7_activate + Hot-Cue 7 Deck 2, Button: PAD7 (in HOT-CUE-Mode, Deck 2 active) 0x98 0x06 @@ -3357,8 +3357,8 @@ [Channel3] - fwd - Forward for track Deck 3, Button: PAD7 (in HOT-CUE-Mode, Deck 3 active) + hotcue_7_activate + Hot-Cue 7 Deck 3, Button: PAD7 (in HOT-CUE-Mode, Deck 3 active) 0x99 0x06 @@ -3367,8 +3367,8 @@ [Channel4] - fwd - Forward for track Deck 4, Button: PAD7 (in HOT-CUE-Mode, Deck 4 active) + hotcue_7_activate + Hot-Cue 7 Deck 4, Button: PAD7 (in HOT-CUE-Mode, Deck 4 active) 0x9A 0x06 @@ -3377,48 +3377,48 @@ [Channel1] - hotcue_7_activate + hotcue_7_clear Hot-Cue 7 Deck 1, Button: SHIFT + PAD7 (in HOT-CUE-Mode, Deck 1 active) 0x97 - 0x0e + 0x0E [Channel2] - hotcue_7_activate + hotcue_7_clear Hot-Cue 7 Deck 2, Button: SHIFT + PAD7 (in HOT-CUE-Mode, Deck 2 active) 0x98 - 0x0e + 0x0E [Channel3] - hotcue_7_activate + hotcue_7_clear Hot-Cue 7 Deck 3, Button: SHIFT + PAD7 (in HOT-CUE-Mode, Deck 3 active) 0x99 - 0x0e + 0x0E [Channel4] - hotcue_7_activate + hotcue_7_clear Hot-Cue 7 Deck 4, Button: SHIFT + PAD7 (in HOT-CUE-Mode, Deck 4 active) 0x9A - 0x0e + 0x0E [Channel1] - reverse - Set track Deck 1 to reverse, Button: PAD8 (in HOT-CUE-Mode, Deck 1 active) + hotcue_8_activate + Hot-Cue 8 Deck 1, Button: PAD8 (in HOT-CUE-Mode, Deck 1 active) 0x97 0x07 @@ -3427,8 +3427,8 @@ [Channel2] - reverse - Set track Deck 2 to reverse, Button: PAD8 (in HOT-CUE-Mode, Deck 2 active) + hotcue_8_activate + Hot-Cue 8 Deck 2, Button: PAD8 (in HOT-CUE-Mode, Deck 2 active) 0x98 0x07 @@ -3437,8 +3437,8 @@ [Channel3] - reverse - Set track Deck 3 to reverse, Button: PAD8 (in HOT-CUE-Mode, Deck 3 active) + hotcue_8_activate + Hot-Cue 8 Deck 3, Button: PAD8 (in HOT-CUE-Mode, Deck 3 active) 0x99 0x07 @@ -3447,8 +3447,8 @@ [Channel4] - reverse - Set track Deck 4 to reverse, Button: PAD8 (in HOT-CUE-Mode, Deck 4 active) + hotcue_8_activate + Hot-Cue 8 Deck 4, Button: PAD8 (in HOT-CUE-Mode, Deck 4 active) 0x9A 0x07 @@ -3457,7 +3457,7 @@ [Channel1] - hotcue_8_activate + hotcue_8_clear Hot-Cue 8 Deck 1, Button: SHIFT + PAD8 (in HOT-CUE-Mode, Deck 1 active) 0x97 0x0F @@ -3467,7 +3467,7 @@ [Channel2] - hotcue_8_activate + hotcue_8_clear Hot-Cue 8 Deck 2, Button: SHIFT + PAD8 (in HOT-CUE-Mode, Deck 2 active) 0x98 0x0F @@ -3477,7 +3477,7 @@ [Channel3] - hotcue_8_activate + hotcue_8_clear Hot-Cue 8 Deck 3, Button: SHIFT + PAD8 (in HOT-CUE-Mode, Deck 3 active) 0x99 0x0F @@ -3487,7 +3487,7 @@ [Channel4] - hotcue_8_activate + hotcue_8_clear Hot-Cue 8 Deck 4, Button: SHIFT + PAD8 (in HOT-CUE-Mode, Deck 4 active) 0x9A 0x0F From e359977e670bb4365c616ab7ec638b74c08e2440 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sun, 26 Dec 2021 14:53:55 -0600 Subject: [PATCH 31/34] fix spelling --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index eb17325500b..6c63b9a3385 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -13,7 +13,7 @@ PioneerDDJSB3.vinylModeOnStartup = false; PioneerDDJSB3.reverseRollOnShiftCue = false; // Sets the jogwheels sensivity. 1 is default, 2 is twice as sensitive, 0.5 is half as sensitive. -PioneerDDJSB3.jogwheelSensivity = 1.0; +PioneerDDJSB3.jogwheelSensitivity = 1.0; // Sets how much more sensitive the jogwheels get when holding shift. // Set to 1 to disable jogwheel sensitivity increase when holding shift. @@ -1281,7 +1281,7 @@ PioneerDDJSB3.toggleScratch = function(channel, control, value, status, group) { PioneerDDJSB3.pitchBendFromJog = function(channel, movement) { var group = (typeof channel === "string" ? channel : "[Channel" + channel + 1 + "]"); - engine.setValue(group, "jog", movement / 5 * PioneerDDJSB3.jogwheelSensivity); + engine.setValue(group, "jog", movement / 5 * PioneerDDJSB3.jogwheelSensitivity); }; From 51985e7c3a055df183373f2a713c0980eed9f0e3 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Tue, 28 Dec 2021 11:00:24 -0600 Subject: [PATCH 32/34] remove mapping of the haedphones and master levels --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 47 ---------------------- res/controllers/Pioneer-DDJ-SB3.midi.xml | 42 +------------------ 2 files changed, 1 insertion(+), 88 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index 6c63b9a3385..1ca5c6ed1d7 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -908,53 +908,6 @@ PioneerDDJSB3.headphoneMasterUpdate = function() { } }; -PioneerDDJSB3.inValueScale = function(input) { - // Scale so that: - // from 0/4 to 3/4 - 500 of input represents 0.0 to 1.0 - // from 3/4 - 500 to 3/4 + 500 represents 1.0 - // from 3/4 + 500 to 4/4 represents 1.0 to 5.0 - var absoluteMax = 0xFFFF >> 2; - var inputMax = this.max; - - var zeroRange = (inputMax / absoluteMax) * 500; - - var inputQuart = Math.round(inputMax / 4); - - var fromInfToZero = (inputQuart * 3) - zeroRange; - var fromZeroToFive = (inputQuart * 3) + zeroRange; - - if (input < fromInfToZero) { - return input / fromInfToZero; - } else if (input > fromZeroToFive) { - return (input / inputMax) * 5.0; - } else { - return 1.0; - } -}; - -PioneerDDJSB3.headphoneLevel = new components.Pot({ - unshift: function() { - this.group = "[Master]"; - this.inKey = "headGain"; - this.disconnect(); - this.connect(); - }, - - - inValueScale: PioneerDDJSB3.inValueScale -}); - -PioneerDDJSB3.masterGain = new components.Pot({ - unshift: function() { - this.group = "[Master]"; - this.inKey = "gain"; - this.disconnect(); - this.connect(); - }, - - inValueScale: PioneerDDJSB3.inValueScale -}); - /////////////////////////////////////////////////////////////// // LED HELPERS // /////////////////////////////////////////////////////////////// diff --git a/res/controllers/Pioneer-DDJ-SB3.midi.xml b/res/controllers/Pioneer-DDJ-SB3.midi.xml index 0f649e1bf2e..5f42167f248 100755 --- a/res/controllers/Pioneer-DDJ-SB3.midi.xml +++ b/res/controllers/Pioneer-DDJ-SB3.midi.xml @@ -1915,26 +1915,6 @@ - - [Master] - PioneerDDJSB3.headphoneLevel.inputMSB - Headphone volume / (Shift for headphone master mix), Button: Headphones Vol (MSB) - 0xB6 - 0x0D - - - - - - [Master] - PioneerDDJSB3.headphoneLevel.inputLSB - Headphone volume / (Shift for headphone master mix), Button: Headphones Vol (LSB) - 0xB6 - 0x2D - - - - [Channel1] PioneerDDJSB3.autoLoopButton @@ -2194,27 +2174,7 @@ - - - [Master] - PioneerDDJSB3.masterGain.inputMSB - Master Gain (MSB), Master Volume - 0xB6 - 0x08 - - - - - - [Master] - PioneerDDJSB3.masterGain.inputLSB - Master Gain (LSB), Master Volume - 0xB6 - 0x28 - - - - + [Channel1] PioneerDDJSB3.padForDeck[1].beatJumpDivide From 27b5a5483fa3d36e39a882dc8d5b8c7e32dc4b64 Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sat, 8 Jan 2022 16:06:29 -0600 Subject: [PATCH 33/34] fix spelling --- res/controllers/Pioneer-DDJ-SB3-scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-SB3-scripts.js b/res/controllers/Pioneer-DDJ-SB3-scripts.js index 1ca5c6ed1d7..e5740e7d48e 100755 --- a/res/controllers/Pioneer-DDJ-SB3-scripts.js +++ b/res/controllers/Pioneer-DDJ-SB3-scripts.js @@ -12,7 +12,7 @@ PioneerDDJSB3.vinylModeOnStartup = false; // the beginning of the track and stops playback. PioneerDDJSB3.reverseRollOnShiftCue = false; -// Sets the jogwheels sensivity. 1 is default, 2 is twice as sensitive, 0.5 is half as sensitive. +// Sets the jogwheels sensitivity. 1 is default, 2 is twice as sensitive, 0.5 is half as sensitive. PioneerDDJSB3.jogwheelSensitivity = 1.0; // Sets how much more sensitive the jogwheels get when holding shift. From f05dcf2afdea8df7795265b5b2bc37258f73cfec Mon Sep 17 00:00:00 2001 From: Javier Vilalta Date: Sun, 9 Jan 2022 15:06:15 -0600 Subject: [PATCH 34/34] fix whitespace --- res/controllers/Pioneer-DDJ-SB3.midi.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-SB3.midi.xml b/res/controllers/Pioneer-DDJ-SB3.midi.xml index 5f42167f248..ec79699afee 100755 --- a/res/controllers/Pioneer-DDJ-SB3.midi.xml +++ b/res/controllers/Pioneer-DDJ-SB3.midi.xml @@ -2174,7 +2174,7 @@ - + [Channel1] PioneerDDJSB3.padForDeck[1].beatJumpDivide