From b6946458fbefa704551a678a802e5430bc186185 Mon Sep 17 00:00:00 2001 From: Dan Giddins Date: Mon, 2 Dec 2019 16:30:04 +0000 Subject: [PATCH 01/13] add in xml and js file for ddj-200 --- res/controllers/Pioneer DDJ-200.midi.xml | 526 +++++++++++++++++++++ res/controllers/Pioneer-DDJ-200-scripts.js | 35 ++ 2 files changed, 561 insertions(+) create mode 100644 res/controllers/Pioneer DDJ-200.midi.xml create mode 100644 res/controllers/Pioneer-DDJ-200-scripts.js diff --git a/res/controllers/Pioneer DDJ-200.midi.xml b/res/controllers/Pioneer DDJ-200.midi.xml new file mode 100644 index 00000000000..61eaec081b9 --- /dev/null +++ b/res/controllers/Pioneer DDJ-200.midi.xml @@ -0,0 +1,526 @@ + + + + Pioneer DDJ-200 + Dan Giddins + Pioneer DDJ-200 configuration for 2 decks. + + + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter3 + MIDI Learned from 364 messages. + 0xB0 + 0x07 + + + + + + [Channel1] + DDJ200.scratch + Channel 1 scratch. + 0xB0 + 0x22 + + + + + + [EffectRack1_EffectUnit2_Effect2] + enabled + MIDI Learned from 28 messages. + 0x99 + 0x05 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter3 + MIDI Learned from 392 messages. + 0xB1 + 0x07 + + + + + + [Channel2] + DDJ200.scratch + Channel 2 scratch. + 0xB1 + 0x22 + + + + + + [EffectRack1_EffectUnit1_Effect1] + enabled + MIDI Learned from 12 messages. + 0x97 + 0x04 + + + + + + [QuickEffectRack1_[Channel1]] + super1 + MIDI Learned from 1540 messages. + 0xB6 + 0x17 + + + + + + [Channel2] + beatlooproll_1_activate + MIDI Learned from 36 messages. + 0x99 + 0x02 + + + + + + [Channel1] + beatlooproll_0.5_activate + MIDI Learned from 6 messages. + 0x97 + 0x01 + + + + + + [Channel1] + volume + MIDI Learned from 6342 messages. + 0xB0 + 0x33 + + + + + + [Channel2] + volume + MIDI Learned from 5984 messages. + 0xB1 + 0x33 + + + + + + [EffectRack1_EffectUnit2_Effect1] + enabled + MIDI Learned from 26 messages. + 0x99 + 0x04 + + + + + + [QuickEffectRack1_[Channel2]] + super1 + MIDI Learned from 1248 messages. + 0xB6 + 0x38 + + + + + + [Channel2] + beatlooproll_0.5_activate + MIDI Learned from 34 messages. + 0x99 + 0x01 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter1 + MIDI Learned from 512 messages. + 0xB1 + 0x2F + + + + + + [Channel1] + beatlooproll_0.25_activate + MIDI Learned from 2 messages. + 0x97 + 0x00 + + + + + + [Channel1] + play + MIDI Learned from 4 messages. + 0x90 + 0x0B + + + + + + [Channel1] + DDJ200.jog + Channel 1 jog. + 0xB0 + 0x21 + + + + + + [Channel2] + play + MIDI Learned from 8 messages. + 0x91 + 0x0B + + + + + + [Channel2] + DDJ200.jog + Channel 2 jog. + 0xB1 + 0x21 + + + + + + [Master] + crossfader + MIDI Learned from 2300 messages. + 0xB6 + 0x3F + + + + + + [Channel1] + volume + MIDI Learned from 6342 messages. + 0xB0 + 0x13 + + + + + + [Channel2] + volume + MIDI Learned from 5984 messages. + 0xB1 + 0x13 + + + + + + [Channel2] + beatlooproll_0.25_activate + MIDI Learned from 32 messages. + 0x99 + 0x00 + + + + + + [QuickEffectRack1_[Channel2]] + super1 + MIDI Learned from 1248 messages. + 0xB6 + 0x18 + + + + + + [Channel1] + sync_enabled + MIDI Learned from 2 messages. + 0x90 + 0x58 + + + + + + [Channel2] + sync_enabled + MIDI Learned from 4 messages. + 0x91 + 0x58 + + + + + + [Channel1] + rate + MIDI Learned from 920 messages. + 0xB0 + 0x20 + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter1 + MIDI Learned from 2486 messages. + 0xB0 + 0x0F + + + + + + [Channel2] + rate + MIDI Learned from 1352 messages. + 0xB1 + 0x20 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter1 + MIDI Learned from 512 messages. + 0xB1 + 0x0F + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter2 + MIDI Learned from 624 messages. + 0xB0 + 0x2B + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter2 + MIDI Learned from 540 messages. + 0xB1 + 0x2B + + + + + + [Channel1] + cue_default + MIDI Learned from 2 messages. + 0x90 + 0x0C + + + + + + [Channel2] + cue_default + MIDI Learned from 6 messages. + 0x91 + 0x0C + + + + + + [Channel1] + pfl + MIDI Learned from 34 messages. + 0x90 + 0x54 + + + + + + [Channel2] + pfl + MIDI Learned from 36 messages. + 0x91 + 0x54 + + + + + + [Master] + crossfader + MIDI Learned from 2300 messages. + 0xB6 + 0x1F + + + + + + [EffectRack1_EffectUnit1_Effect3] + enabled + MIDI Learned from 18 messages. + 0x97 + 0x06 + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter3 + MIDI Learned from 364 messages. + 0xB0 + 0x27 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter3 + MIDI Learned from 392 messages. + 0xB1 + 0x27 + + + + + + [Channel1] + beatlooproll_2_activate + MIDI Learned from 10 messages. + 0x97 + 0x03 + + + + + + [Channel1] + rate + MIDI Learned from 920 messages. + 0xB0 + 0x00 + + + + + + [QuickEffectRack1_[Channel1]] + super1 + MIDI Learned from 1540 messages. + 0xB6 + 0x37 + + + + + + [EffectRack1_EffectUnit2_Effect3] + enabled + MIDI Learned from 30 messages. + 0x99 + 0x06 + + + + + + [Channel2] + rate + MIDI Learned from 1352 messages. + 0xB1 + 0x00 + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter2 + MIDI Learned from 624 messages. + 0xB0 + 0x0B + + + + + + [EffectRack1_EffectUnit1_Effect2] + enabled + MIDI Learned from 16 messages. + 0x97 + 0x05 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter2 + MIDI Learned from 540 messages. + 0xB1 + 0x0B + + + + + + [Channel2] + beatlooproll_2_activate + MIDI Learned from 38 messages. + 0x99 + 0x03 + + + + + + [Channel1] + beatlooproll_1_activate + MIDI Learned from 8 messages. + 0x97 + 0x02 + + + + + + + + diff --git a/res/controllers/Pioneer-DDJ-200-scripts.js b/res/controllers/Pioneer-DDJ-200-scripts.js new file mode 100644 index 00000000000..d21070be9e7 --- /dev/null +++ b/res/controllers/Pioneer-DDJ-200-scripts.js @@ -0,0 +1,35 @@ +var DDJ200 = {}; + +DDJ200.scratching = []; + +DDJ200.init = function (id, debugging) {} + +DDJ200.shutdown = function() {} + +DDJ200.scratch = function (channel, control, value, status, group) { + // enable scractch + var deckNumber = script.deckFromGroup(group); + if (!DDJ200.scratching[deckNumber]) { + var alpha = 1.0 / 8; + var beta = alpha / 32; + engine.scratchEnable(deckNumber, 128, 33 + 1 / 3, alpha, beta); + DDJ200.scratching[deckNumber] = true; + } + // For a control that centers on 0x40 (64): + // Convert value down to +1/-1 + // Register the movement + engine.scratchTick(deckNumber, value - 64); +} + +DDJ200.jog = function (channel, control, value, status, group) { + // disable scractch + var deckNumber = script.deckFromGroup(group); + if (DDJ200.scratching[deckNumber]) { + engine.scratchDisable(script.deckFromGroup(group)); + DDJ200.scratching[deckNumber] = false; + } + // For a control that centers on 0x40 (64): + // Convert value down to +1/-1 + // Register the movement + engine.setValue(group, 'jog', value - 64); +} From b846250bb6bd3836232605bf948863442a830d3d Mon Sep 17 00:00:00 2001 From: Dan Giddins Date: Mon, 2 Dec 2019 16:50:35 +0000 Subject: [PATCH 02/13] remove unused parameters --- res/controllers/Pioneer-DDJ-200-scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-200-scripts.js b/res/controllers/Pioneer-DDJ-200-scripts.js index d21070be9e7..5f4ed16c427 100644 --- a/res/controllers/Pioneer-DDJ-200-scripts.js +++ b/res/controllers/Pioneer-DDJ-200-scripts.js @@ -2,9 +2,9 @@ var DDJ200 = {}; DDJ200.scratching = []; -DDJ200.init = function (id, debugging) {} +DDJ200.init = function () {} -DDJ200.shutdown = function() {} +DDJ200.shutdown = function () {} DDJ200.scratch = function (channel, control, value, status, group) { // enable scractch From 1d0ebc4ace430f2e6de182817c07e8492bd9475e Mon Sep 17 00:00:00 2001 From: Dan Giddins Date: Mon, 2 Dec 2019 17:01:13 +0000 Subject: [PATCH 03/13] remove noise descriptions --- res/controllers/Pioneer DDJ-200.midi.xml | 47 ------------------------ 1 file changed, 47 deletions(-) diff --git a/res/controllers/Pioneer DDJ-200.midi.xml b/res/controllers/Pioneer DDJ-200.midi.xml index 61eaec081b9..0c0b68d284b 100644 --- a/res/controllers/Pioneer DDJ-200.midi.xml +++ b/res/controllers/Pioneer DDJ-200.midi.xml @@ -13,7 +13,6 @@ [EqualizerRack1_[Channel1]_Effect1] parameter3 - MIDI Learned from 364 messages. 0xB0 0x07 @@ -33,7 +32,6 @@ [EffectRack1_EffectUnit2_Effect2] enabled - MIDI Learned from 28 messages. 0x99 0x05 @@ -43,7 +41,6 @@ [EqualizerRack1_[Channel2]_Effect1] parameter3 - MIDI Learned from 392 messages. 0xB1 0x07 @@ -63,7 +60,6 @@ [EffectRack1_EffectUnit1_Effect1] enabled - MIDI Learned from 12 messages. 0x97 0x04 @@ -73,7 +69,6 @@ [QuickEffectRack1_[Channel1]] super1 - MIDI Learned from 1540 messages. 0xB6 0x17 @@ -83,7 +78,6 @@ [Channel2] beatlooproll_1_activate - MIDI Learned from 36 messages. 0x99 0x02 @@ -93,7 +87,6 @@ [Channel1] beatlooproll_0.5_activate - MIDI Learned from 6 messages. 0x97 0x01 @@ -103,7 +96,6 @@ [Channel1] volume - MIDI Learned from 6342 messages. 0xB0 0x33 @@ -113,7 +105,6 @@ [Channel2] volume - MIDI Learned from 5984 messages. 0xB1 0x33 @@ -123,7 +114,6 @@ [EffectRack1_EffectUnit2_Effect1] enabled - MIDI Learned from 26 messages. 0x99 0x04 @@ -133,7 +123,6 @@ [QuickEffectRack1_[Channel2]] super1 - MIDI Learned from 1248 messages. 0xB6 0x38 @@ -143,7 +132,6 @@ [Channel2] beatlooproll_0.5_activate - MIDI Learned from 34 messages. 0x99 0x01 @@ -153,7 +141,6 @@ [EqualizerRack1_[Channel2]_Effect1] parameter1 - MIDI Learned from 512 messages. 0xB1 0x2F @@ -163,7 +150,6 @@ [Channel1] beatlooproll_0.25_activate - MIDI Learned from 2 messages. 0x97 0x00 @@ -173,7 +159,6 @@ [Channel1] play - MIDI Learned from 4 messages. 0x90 0x0B @@ -193,7 +178,6 @@ [Channel2] play - MIDI Learned from 8 messages. 0x91 0x0B @@ -213,7 +197,6 @@ [Master] crossfader - MIDI Learned from 2300 messages. 0xB6 0x3F @@ -223,7 +206,6 @@ [Channel1] volume - MIDI Learned from 6342 messages. 0xB0 0x13 @@ -233,7 +215,6 @@ [Channel2] volume - MIDI Learned from 5984 messages. 0xB1 0x13 @@ -243,7 +224,6 @@ [Channel2] beatlooproll_0.25_activate - MIDI Learned from 32 messages. 0x99 0x00 @@ -253,7 +233,6 @@ [QuickEffectRack1_[Channel2]] super1 - MIDI Learned from 1248 messages. 0xB6 0x18 @@ -263,7 +242,6 @@ [Channel1] sync_enabled - MIDI Learned from 2 messages. 0x90 0x58 @@ -273,7 +251,6 @@ [Channel2] sync_enabled - MIDI Learned from 4 messages. 0x91 0x58 @@ -283,7 +260,6 @@ [Channel1] rate - MIDI Learned from 920 messages. 0xB0 0x20 @@ -293,7 +269,6 @@ [EqualizerRack1_[Channel1]_Effect1] parameter1 - MIDI Learned from 2486 messages. 0xB0 0x0F @@ -303,7 +278,6 @@ [Channel2] rate - MIDI Learned from 1352 messages. 0xB1 0x20 @@ -313,7 +287,6 @@ [EqualizerRack1_[Channel2]_Effect1] parameter1 - MIDI Learned from 512 messages. 0xB1 0x0F @@ -323,7 +296,6 @@ [EqualizerRack1_[Channel1]_Effect1] parameter2 - MIDI Learned from 624 messages. 0xB0 0x2B @@ -333,7 +305,6 @@ [EqualizerRack1_[Channel2]_Effect1] parameter2 - MIDI Learned from 540 messages. 0xB1 0x2B @@ -343,7 +314,6 @@ [Channel1] cue_default - MIDI Learned from 2 messages. 0x90 0x0C @@ -353,7 +323,6 @@ [Channel2] cue_default - MIDI Learned from 6 messages. 0x91 0x0C @@ -363,7 +332,6 @@ [Channel1] pfl - MIDI Learned from 34 messages. 0x90 0x54 @@ -373,7 +341,6 @@ [Channel2] pfl - MIDI Learned from 36 messages. 0x91 0x54 @@ -383,7 +350,6 @@ [Master] crossfader - MIDI Learned from 2300 messages. 0xB6 0x1F @@ -393,7 +359,6 @@ [EffectRack1_EffectUnit1_Effect3] enabled - MIDI Learned from 18 messages. 0x97 0x06 @@ -403,7 +368,6 @@ [EqualizerRack1_[Channel1]_Effect1] parameter3 - MIDI Learned from 364 messages. 0xB0 0x27 @@ -413,7 +377,6 @@ [EqualizerRack1_[Channel2]_Effect1] parameter3 - MIDI Learned from 392 messages. 0xB1 0x27 @@ -423,7 +386,6 @@ [Channel1] beatlooproll_2_activate - MIDI Learned from 10 messages. 0x97 0x03 @@ -433,7 +395,6 @@ [Channel1] rate - MIDI Learned from 920 messages. 0xB0 0x00 @@ -443,7 +404,6 @@ [QuickEffectRack1_[Channel1]] super1 - MIDI Learned from 1540 messages. 0xB6 0x37 @@ -453,7 +413,6 @@ [EffectRack1_EffectUnit2_Effect3] enabled - MIDI Learned from 30 messages. 0x99 0x06 @@ -463,7 +422,6 @@ [Channel2] rate - MIDI Learned from 1352 messages. 0xB1 0x00 @@ -473,7 +431,6 @@ [EqualizerRack1_[Channel1]_Effect1] parameter2 - MIDI Learned from 624 messages. 0xB0 0x0B @@ -483,7 +440,6 @@ [EffectRack1_EffectUnit1_Effect2] enabled - MIDI Learned from 16 messages. 0x97 0x05 @@ -493,7 +449,6 @@ [EqualizerRack1_[Channel2]_Effect1] parameter2 - MIDI Learned from 540 messages. 0xB1 0x0B @@ -503,7 +458,6 @@ [Channel2] beatlooproll_2_activate - MIDI Learned from 38 messages. 0x99 0x03 @@ -513,7 +467,6 @@ [Channel1] beatlooproll_1_activate - MIDI Learned from 8 messages. 0x97 0x02 From 6a5a1b1a5df1dcada9aae82d45957f8876e8f312 Mon Sep 17 00:00:00 2001 From: Dan Giddins Date: Sat, 4 Apr 2020 14:47:39 +0100 Subject: [PATCH 04/13] improve and optimise script logic --- res/controllers/Pioneer-DDJ-200-scripts.js | 31 ++++++++++------------ 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-200-scripts.js b/res/controllers/Pioneer-DDJ-200-scripts.js index 5f4ed16c427..41002914f32 100644 --- a/res/controllers/Pioneer-DDJ-200-scripts.js +++ b/res/controllers/Pioneer-DDJ-200-scripts.js @@ -1,35 +1,32 @@ var DDJ200 = {}; -DDJ200.scratching = []; - DDJ200.init = function () {} DDJ200.shutdown = function () {} DDJ200.scratch = function (channel, control, value, status, group) { - // enable scractch - var deckNumber = script.deckFromGroup(group); - if (!DDJ200.scratching[deckNumber]) { - var alpha = 1.0 / 8; - var beta = alpha / 32; - engine.scratchEnable(deckNumber, 128, 33 + 1 / 3, alpha, beta); - DDJ200.scratching[deckNumber] = true; - } // For a control that centers on 0x40 (64): // Convert value down to +1/-1 // Register the movement - engine.scratchTick(deckNumber, value - 64); + engine.scratchTick(script.deckFromGroup(group), value - 64); } DDJ200.jog = function (channel, control, value, status, group) { - // disable scractch - var deckNumber = script.deckFromGroup(group); - if (DDJ200.scratching[deckNumber]) { - engine.scratchDisable(script.deckFromGroup(group)); - DDJ200.scratching[deckNumber] = false; - } // For a control that centers on 0x40 (64): // Convert value down to +1/-1 // Register the movement engine.setValue(group, 'jog', value - 64); } + +DDJ200.touch = function (channel, control, value, status, group) { + var deckNumber = script.deckFromGroup(group); + if (value == 0) { + // disable scratch + engine.scratchDisable(script.deckFromGroup(group)); + } else { + // enable scratch + var alpha = 1.0 / 8; + var beta = alpha / 32; + engine.scratchEnable(deckNumber, 128, 33 + 1 / 3, alpha, beta); + } +} From 5e9bb40f931ceb42c44c5f2968999d878a4a711d Mon Sep 17 00:00:00 2001 From: Dan Giddins Date: Sat, 4 Apr 2020 17:24:43 +0100 Subject: [PATCH 05/13] give good descriptions --- res/controllers/Pioneer DDJ-200.midi.xml | 665 +++++++++++++++++------ 1 file changed, 501 insertions(+), 164 deletions(-) diff --git a/res/controllers/Pioneer DDJ-200.midi.xml b/res/controllers/Pioneer DDJ-200.midi.xml index 0c0b68d284b..71d438227ab 100644 --- a/res/controllers/Pioneer DDJ-200.midi.xml +++ b/res/controllers/Pioneer DDJ-200.midi.xml @@ -1,5 +1,5 @@ - + Pioneer DDJ-200 Dan Giddins @@ -11,91 +11,109 @@ - [EqualizerRack1_[Channel1]_Effect1] - parameter3 - 0xB0 - 0x07 + [Channel2] + cue_set + Deck 2: Set cue point + 0x91 + 0x47 - + [Channel1] - DDJ200.scratch - Channel 1 scratch. - 0xB0 - 0x22 + pfl + Deck 1: Headphone listen (pfl) button + 0x90 + 0x54 - + - [EffectRack1_EffectUnit2_Effect2] - enabled - 0x99 - 0x05 + [Channel2] + pfl + Deck 2: Headphone listen (pfl) button + 0x91 + 0x54 - [EqualizerRack1_[Channel2]_Effect1] - parameter3 - 0xB1 - 0x07 + [EqualizerRack1_[Channel1]_Effect1] + parameter2 + Deck 1: Adjust Mid EQ + 0xB0 + 0x0B - [Channel2] - DDJ200.scratch - Channel 2 scratch. + [EqualizerRack1_[Channel2]_Effect1] + parameter2 + Deck 2: Adjust Mid EQ 0xB1 - 0x22 + 0x0B - + - [EffectRack1_EffectUnit1_Effect1] - enabled - 0x97 - 0x04 + [Master] + crossfader + Master crossfader + 0xB6 + 0x3F - + - [QuickEffectRack1_[Channel1]] - super1 - 0xB6 - 0x17 + [Channel1] + bpm_tap + Deck 1: BPM tap button + 0x90 + 0x60 - + [Channel2] - beatlooproll_1_activate - 0x99 - 0x02 + bpm_tap + Deck 2: BPM tap button + 0x91 + 0x60 - [Channel1] - beatlooproll_0.5_activate - 0x97 - 0x01 + [EqualizerRack1_[Channel1]_Effect1] + parameter3 + Deck 1: Adjust High EQ + 0xB0 + 0x27 - + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter3 + Deck 2: Adjust High EQ + 0xB1 + 0x27 + + [Channel1] volume + Deck 1: Volume Fader 0xB0 0x33 @@ -105,6 +123,7 @@ [Channel2] volume + Deck 2: Volume Fader 0xB1 0x33 @@ -112,10 +131,11 @@ - [EffectRack1_EffectUnit2_Effect1] - enabled - 0x99 - 0x04 + [Channel1] + cue_gotoandstop + Deck 1: Go to cue point and stop + 0x90 + 0x48 @@ -123,61 +143,77 @@ [QuickEffectRack1_[Channel2]] super1 + Quick Effect: Quick Effect Super Knob (control linked effect parameters) 0xB6 - 0x38 + 0x18 - + [Channel2] - beatlooproll_0.5_activate - 0x99 - 0x01 + cue_gotoandstop + Deck 2: Go to cue point and stop + 0x91 + 0x48 + + [EqualizerRack1_[Channel1]_Effect1] + parameter1 + Deck 1: Adjust Low EQ + 0xB0 + 0x0F + + + + [EqualizerRack1_[Channel2]_Effect1] parameter1 + Deck 2: Adjust Low EQ 0xB1 - 0x2F + 0x0F - + [Channel1] - beatlooproll_0.25_activate - 0x97 + rate + Deck 1: Playback speed control + 0xB0 0x00 - + - [Channel1] - play - 0x90 - 0x0B + [Channel2] + rate + Deck 2: Playback speed control (Vinyl "Pitch" slider) + 0xB1 + 0x00 - + [Channel1] - DDJ200.jog - Channel 1 jog. - 0xB0 - 0x21 + play + Deck 1: Play button + 0x90 + 0x0B - + [Channel2] play + Deck 2: Play button 0x91 0x0B @@ -185,45 +221,49 @@ - [Channel2] - DDJ200.jog - Channel 2 jog. - 0xB1 - 0x21 + [Channel1] + cue_default + Deck 1: Cue button + 0x90 + 0x0C - + - [Master] - crossfader - 0xB6 - 0x3F + [Channel2] + cue_default + Deck 2: Cue button + 0x91 + 0x0C - + - [Channel1] - volume - 0xB0 - 0x13 + [QuickEffectRack1_[Channel1]] + super1 + Quick Effect: Quick Effect Super Knob (control linked effect parameters) + 0xB6 + 0x37 - + - [Channel2] - volume - 0xB1 - 0x13 + [Channel1] + hotcue_1_clear + Deck 1: Clear hotcue 1 + 0x98 + 0x00 - + [Channel2] - beatlooproll_0.25_activate + hotcue_1_activate + Deck 2: Set, preview from of jump to hotcue 1 0x99 0x00 @@ -231,17 +271,19 @@ - [QuickEffectRack1_[Channel2]] - super1 - 0xB6 - 0x18 + [Channel2] + hotcue_1_clear + Deck 2: Clear hotcue 1 + 0x9A + 0x00 - + [Channel1] sync_enabled + Deck 1: Tap to sync tempo (and phase with quantize enabled), hold to enable permanent sync 0x90 0x58 @@ -251,6 +293,7 @@ [Channel2] sync_enabled + Deck 2: Tap to sync tempo (and phase with quantize enabled), hold to enable permanent sync 0x91 0x58 @@ -259,43 +302,98 @@ [Channel1] - rate - 0xB0 - 0x20 + hotcue_2_clear + Deck 1: Clear hotcue 2 + 0x98 + 0x01 - + - [EqualizerRack1_[Channel1]_Effect1] - parameter1 - 0xB0 - 0x0F + [Channel2] + hotcue_2_activate + Deck 2: Set, preview from of jump to hotcue 2 + 0x99 + 0x01 [Channel2] - rate - 0xB1 - 0x20 + hotcue_2_clear + Deck 2: Clear hotcue 2 + 0x9A + 0x01 - + - [EqualizerRack1_[Channel2]_Effect1] - parameter1 - 0xB1 - 0x0F + [Master] + crossfader + Master crossfader + 0xB6 + 0x1F + + [Channel1] + hotcue_3_clear + Deck 1: Clear hotcue 3 + 0x98 + 0x02 + + + + + + [Channel2] + hotcue_3_activate + Deck 2: Set, preview from of jump to hotcue 3 + 0x99 + 0x02 + + + + + + [Channel2] + hotcue_3_clear + Deck 2: Clear hotcue 3 + 0x9A + 0x02 + + + + + + [Channel1] + hotcue_1_activate + Deck 1: Set, preview from or jump to hotcue 1 + 0x97 + 0x00 + + + + + + [AutoDJ] + enabled + Toggle Auto DJ On/Off + 0x96 + 0x59 + + + + [EqualizerRack1_[Channel1]_Effect1] parameter2 + Deck 1: Adjust Mid EQ 0xB0 0x2B @@ -305,6 +403,7 @@ [EqualizerRack1_[Channel2]_Effect1] parameter2 + Deck 2: Adjust Mid EQ 0xB1 0x2B @@ -313,81 +412,300 @@ [Channel1] - cue_default + hotcue_4_clear + Deck 1: Clear hotcue 4 + 0x98 + 0x03 + + + + + + [Channel1] + DDJ200.touch + Deck 1: Touch 0x90 - 0x0C + 0x36 + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter3 + Deck 1: Adjust High EQ + 0xB0 + 0x07 + + + + + + [Channel2] + hotcue_4_activate + Deck 2: Set, preview from of jump to hotcue 4 + 0x99 + 0x03 [Channel2] - cue_default + DDJ200.touch + Deck 2: Touch 0x91 - 0x0C + 0x36 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter3 + Deck 2: Adjust High EQ + 0xB1 + 0x07 + + + + + + [Channel2] + hotcue_4_clear + Deck 2: Clear hotcue 4 + 0x9A + 0x03 [Channel1] - pfl - 0x90 - 0x54 + hotcue_2_activate + Deck 1: Set, preview from or jump to hotcue 2 + 0x97 + 0x01 + + + + + + [AutoDJ] + fade_now + Trigger the transition to the next track + 0x96 + 0x5A + + + + + + [Channel1] + hotcue_5_clear + Deck 1: Clear hotcue 5 + 0x98 + 0x04 [Channel2] - pfl - 0x91 - 0x54 + hotcue_5_activate + Deck 2: Set, preview from of jump to hotcue 5 + 0x99 + 0x04 - [Master] - crossfader - 0xB6 - 0x1F + [Channel2] + hotcue_5_clear + Deck 2: Clear hotcue 5 + 0x9A + 0x04 + + + + + + [Channel1] + hotcue_3_activate + Deck 1: Set, preview from or jump to hotcue 3 + 0x97 + 0x02 + + + + + + [Channel1] + volume + Deck 1: Volume Fader + 0xB0 + 0x13 - [EffectRack1_EffectUnit1_Effect3] - enabled + [Channel1] + hotcue_6_clear + Deck 1: Clear hotcue 6 + 0x98 + 0x05 + + + + + + [Channel2] + volume + Deck 2: Volume Fader + 0xB1 + 0x13 + + + + + + [Channel2] + hotcue_6_activate + Deck 2: Set, preview from of jump to hotcue 6 + 0x99 + 0x05 + + + + + + [Channel2] + hotcue_6_clear + Deck 2: Clear hotcue 6 + 0x9A + 0x05 + + + + + + [Channel1] + hotcue_4_activate + Deck 1: Set, preview from or jump to hotcue 4 0x97 + 0x03 + + + + + + [Channel1] + hotcue_7_clear + Deck 1: Clear hotcue 7 + 0x98 + 0x06 + + + + + + [Channel2] + hotcue_7_activate + Deck 2: Set, preview from of jump to hotcue 7 + 0x99 0x06 + + [Channel2] + hotcue_7_clear + Deck 2: Clear hotcue 7 + 0x9A + 0x06 + + + + + + [QuickEffectRack1_[Channel2]] + super1 + Quick Effect: Quick Effect Super Knob (control linked effect parameters) + 0xB6 + 0x38 + + + + + + [Channel1] + hotcue_5_activate + Deck 1: Set, preview from or jump to hotcue 5 + 0x97 + 0x04 + + + + [EqualizerRack1_[Channel1]_Effect1] - parameter3 + parameter1 + Deck 1: Adjust Low EQ 0xB0 - 0x27 + 0x2F [EqualizerRack1_[Channel2]_Effect1] - parameter3 + parameter1 + Deck 2: Adjust Low EQ 0xB1 - 0x27 + 0x2F [Channel1] - beatlooproll_2_activate + hotcue_8_clear + Deck 1: Clear hotcue 8 + 0x98 + 0x07 + + + + + + [Channel2] + hotcue_8_activate + Deck 2: Set, preview from of jump to hotcue 8 + 0x99 + 0x07 + + + + + + [Channel2] + hotcue_8_clear + Deck 2: Clear hotcue 8 + 0x9A + 0x07 + + + + + + [Channel1] + hotcue_6_activate + Deck 1: Set, preview from or jump to hotcue 6 0x97 - 0x03 + 0x05 @@ -395,80 +713,99 @@ [Channel1] rate + Deck 1: Playback speed control 0xB0 - 0x00 + 0x20 - + - [QuickEffectRack1_[Channel1]] - super1 - 0xB6 - 0x37 + [Channel2] + rate + Deck 2: Playback speed control (Vinyl "Pitch" slider) + 0xB1 + 0x20 - [EffectRack1_EffectUnit2_Effect3] - enabled - 0x99 + [Channel1] + hotcue_7_activate + Deck 1: Set, preview from or jump to hotcue 7 + 0x97 0x06 - [Channel2] - rate - 0xB1 - 0x00 + [Channel1] + DDJ200.jog + Deck 1: Jog + 0xB0 + 0x21 - + - [EqualizerRack1_[Channel1]_Effect1] - parameter2 - 0xB0 - 0x0B + [Channel2] + DDJ200.jog + Deck 2: Jog + 0xB1 + 0x21 - + - [EffectRack1_EffectUnit1_Effect2] - enabled + [Channel1] + hotcue_8_activate + Deck 1: Set, preview from or jump to hotcue 8 0x97 - 0x05 + 0x07 - [EqualizerRack1_[Channel2]_Effect1] - parameter2 - 0xB1 - 0x0B + [Channel1] + DDJ200.scratch + Deck 1: Scratch + 0xB0 + 0x22 + + + + + + [QuickEffectRack1_[Channel1]] + super1 + Quick Effect: Quick Effect Super Knob (control linked effect parameters) + 0xB6 + 0x17 [Channel2] - beatlooproll_2_activate - 0x99 - 0x03 + DDJ200.scratch + Deck 2: Scratch + 0xB1 + 0x22 - + [Channel1] - beatlooproll_1_activate - 0x97 - 0x02 + cue_set + Deck 1: Set cue point + 0x90 + 0x47 From b1c9724098466acd5cb42ed695c5872f16262523 Mon Sep 17 00:00:00 2001 From: Dan Giddins Date: Sun, 5 Apr 2020 12:13:34 +0100 Subject: [PATCH 06/13] add support for seeking --- res/controllers/Pioneer DDJ-200.midi.xml | 20 ++++++++++++++++++++ res/controllers/Pioneer-DDJ-200-scripts.js | 15 ++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/res/controllers/Pioneer DDJ-200.midi.xml b/res/controllers/Pioneer DDJ-200.midi.xml index 71d438227ab..a09dedfc7cc 100644 --- a/res/controllers/Pioneer DDJ-200.midi.xml +++ b/res/controllers/Pioneer DDJ-200.midi.xml @@ -810,6 +810,26 @@ + + [Channel1] + DDJ200.seek + Deck 1: Seek + 0xB0 + 0x29 + + + + + + [Channel2] + DDJ200.seek + Deck 2: Seek + 0xB1 + 0x29 + + + + diff --git a/res/controllers/Pioneer-DDJ-200-scripts.js b/res/controllers/Pioneer-DDJ-200-scripts.js index 41002914f32..dd5f5158374 100644 --- a/res/controllers/Pioneer-DDJ-200-scripts.js +++ b/res/controllers/Pioneer-DDJ-200-scripts.js @@ -22,11 +22,20 @@ DDJ200.touch = function (channel, control, value, status, group) { var deckNumber = script.deckFromGroup(group); if (value == 0) { // disable scratch - engine.scratchDisable(script.deckFromGroup(group)); + engine.scratchDisable(deckNumber); } else { // enable scratch var alpha = 1.0 / 8; - var beta = alpha / 32; - engine.scratchEnable(deckNumber, 128, 33 + 1 / 3, alpha, beta); + engine.scratchEnable(deckNumber, 128, 33 + 1 / 3, alpha, alpha / 32); } } + +DDJ200.seek = function (channel, control, value, status, group) { + var oldPos = engine.getValue(group, "playposition"); + // Since ‘playposition’ is normalized to unity, we need to scale by + // song duration in order for the jog wheel to cover the same amount + // of time given a constant turning angle. + var duration = engine.getValue(group, "duration"); + var newPos = Math.max(0, oldPos + ((value - 64) * 0.2 / duration)); + engine.setValue(group, "playposition", newPos); // Strip search +} From 96a4b3494dc66ca89bd747e671b15b4c0dfc9583 Mon Sep 17 00:00:00 2001 From: Dan Giddins Date: Fri, 2 Oct 2020 13:54:48 +0100 Subject: [PATCH 07/13] add support for LEDs --- res/controllers/Pioneer DDJ-200.midi.xml | 1024 ++++++++++++++-------- 1 file changed, 638 insertions(+), 386 deletions(-) diff --git a/res/controllers/Pioneer DDJ-200.midi.xml b/res/controllers/Pioneer DDJ-200.midi.xml index a09dedfc7cc..fcd9fa82d34 100644 --- a/res/controllers/Pioneer DDJ-200.midi.xml +++ b/res/controllers/Pioneer DDJ-200.midi.xml @@ -1,141 +1,152 @@ - + Pioneer DDJ-200 - Dan Giddins + Dan Giddins, Frank Breitling Pioneer DDJ-200 configuration for 2 decks. - + [Channel2] - cue_set - Deck 2: Set cue point + sync_enabled + Deck 2: Tap to sync tempo (and phase with quantize enabled), hold to enable permanent sync 0x91 - 0x47 + 0x58 [Channel1] - pfl - Deck 1: Headphone listen (pfl) button + sync_enabled + Deck 1: Tap to sync tempo (and phase with quantize enabled), hold to enable permanent sync 0x90 - 0x54 + 0x58 - [Channel2] - pfl - Deck 2: Headphone listen (pfl) button - 0x91 - 0x54 + [Master] + crossfader + Master crossfader + 0xB6 + 0x3F - + + - [EqualizerRack1_[Channel1]_Effect1] - parameter2 - Deck 1: Adjust Mid EQ - 0xB0 - 0x0B + [Channel2] + DDJ200.seek + Deck 2: Seek + 0xB1 + 0x29 - + - [EqualizerRack1_[Channel2]_Effect1] - parameter2 - Deck 2: Adjust Mid EQ - 0xB1 - 0x0B + [Channel1] + DDJ200.seek + Deck 1: Seek + 0xB0 + 0x29 - + - [Master] - crossfader - Master crossfader - 0xB6 - 0x3F + [AutoDJ] + enabled + Toggle Auto DJ On/Off + 0x96 + 0x59 - + - [Channel1] - bpm_tap - Deck 1: BPM tap button - 0x90 - 0x60 + [AutoDJ] + fade_now + Trigger the transition to the next track + 0x96 + 0x5A [Channel2] - bpm_tap - Deck 2: BPM tap button + DDJ200.touch + Deck 2: Touch 0x91 - 0x60 + 0x36 - + - [EqualizerRack1_[Channel1]_Effect1] - parameter3 - Deck 1: Adjust High EQ - 0xB0 - 0x27 + [Channel1] + DDJ200.touch + Deck 1: Touch + 0x90 + 0x36 - + [EqualizerRack1_[Channel2]_Effect1] - parameter3 - Deck 2: Adjust High EQ + parameter2 + Deck 2: Adjust Mid EQ 0xB1 - 0x27 + 0x2B - [Channel1] - volume - Deck 1: Volume Fader + [EqualizerRack1_[Channel1]_Effect1] + parameter2 + Deck 1: Adjust Mid EQ 0xB0 - 0x33 + 0x2B - [Channel2] - volume - Deck 2: Volume Fader + [EqualizerRack1_[Channel2]_Effect1] + parameter3 + Deck 2: Adjust High EQ 0xB1 - 0x33 + 0x07 - + - [Channel1] - cue_gotoandstop - Deck 1: Go to cue point and stop - 0x90 - 0x48 + [EqualizerRack1_[Channel1]_Effect1] + parameter3 + Deck 1: Adjust High EQ + 0xB0 + 0x07 + + + + + + [Channel2] + bpm_tap + Deck 2: BPM tap button + 0x91 + 0x60 @@ -150,6 +161,36 @@ + + [Channel1] + bpm_tap + Deck 1: BPM tap button + 0x90 + 0x60 + + + + + + [Channel2] + volume + Deck 2: Volume Fader + 0xB1 + 0x33 + + + + + + [Channel1] + volume + Deck 1: Volume Fader + 0xB0 + 0x33 + + + + [Channel2] cue_gotoandstop @@ -161,13 +202,13 @@ - [EqualizerRack1_[Channel1]_Effect1] - parameter1 - Deck 1: Adjust Low EQ - 0xB0 - 0x0F + [Channel1] + cue_gotoandstop + Deck 1: Go to cue point and stop + 0x90 + 0x48 - + @@ -175,29 +216,40 @@ parameter1 Deck 2: Adjust Low EQ 0xB1 - 0x0F + 0x2F - + - [Channel1] - rate - Deck 1: Playback speed control + [EqualizerRack1_[Channel1]_Effect1] + parameter1 + Deck 1: Adjust Low EQ 0xB0 - 0x00 + 0x2F - + + + + + [Channel2] + play + Deck 2: Play button + 0x91 + 0x0B + + [Channel2] rate - Deck 2: Playback speed control (Vinyl "Pitch" slider) + Deck 2: Playback speed control 0xB1 - 0x00 + 0x20 - + + @@ -211,30 +263,31 @@ - [Channel2] - play - Deck 2: Play button - 0x91 - 0x0B + [Channel1] + rate + Deck 1: Playback speed control + 0xB0 + 0x20 - + + - [Channel1] + [Channel2] cue_default - Deck 1: Cue button - 0x90 + Deck 2: Cue button + 0x91 0x0C - [Channel2] + [Channel1] cue_default - Deck 2: Cue button - 0x91 + Deck 1: Cue button + 0x90 0x0C @@ -251,270 +304,271 @@ - [Channel1] - hotcue_1_clear - Deck 1: Clear hotcue 1 - 0x98 - 0x00 + [Channel2] + DDJ200.jog + Deck 2: Jog + 0xB1 + 0x21 - + - [Channel2] - hotcue_1_activate - Deck 2: Set, preview from of jump to hotcue 1 - 0x99 - 0x00 + [Channel1] + DDJ200.jog + Deck 1: Jog + 0xB0 + 0x21 - + [Channel2] - hotcue_1_clear - Deck 2: Clear hotcue 1 - 0x9A - 0x00 + DDJ200.scratch + Deck 2: Scratch + 0xB1 + 0x22 - + [Channel1] - sync_enabled - Deck 1: Tap to sync tempo (and phase with quantize enabled), hold to enable permanent sync - 0x90 - 0x58 + DDJ200.scratch + Deck 1: Scratch + 0xB0 + 0x22 - + - [Channel2] - sync_enabled - Deck 2: Tap to sync tempo (and phase with quantize enabled), hold to enable permanent sync - 0x91 - 0x58 + [Master] + crossfader + Master crossfader + 0xB6 + 0x1F - + + - [Channel1] - hotcue_2_clear - Deck 1: Clear hotcue 2 - 0x98 - 0x01 + [Channel2] + pfl + Deck 2: Headphone listen (pfl) button + 0x91 + 0x54 - [Channel2] - hotcue_2_activate - Deck 2: Set, preview from of jump to hotcue 2 - 0x99 - 0x01 + [Channel1] + pfl + Deck 1: Headphone listen (pfl) button + 0x90 + 0x54 - [Channel2] - hotcue_2_clear - Deck 2: Clear hotcue 2 - 0x9A - 0x01 + [EqualizerRack1_[Channel2]_Effect1] + parameter2 + Deck 2: Adjust Mid EQ + 0xB1 + 0x0B - + - [Master] - crossfader - Master crossfader - 0xB6 - 0x1F + [EqualizerRack1_[Channel1]_Effect1] + parameter2 + Deck 1: Adjust Mid EQ + 0xB0 + 0x0B [Channel1] - hotcue_3_clear - Deck 1: Clear hotcue 3 - 0x98 - 0x02 + hotcue_1_activate + Deck 1: Set, preview from or jump to hotcue 1 + 0x97 + 0x00 - [Channel2] - hotcue_3_activate - Deck 2: Set, preview from of jump to hotcue 3 - 0x99 - 0x02 + [Channel1] + hotcue_2_activate + Deck 1: Set, preview from or jump to hotcue 2 + 0x97 + 0x01 [Channel2] - hotcue_3_clear - Deck 2: Clear hotcue 3 - 0x9A - 0x02 + hotcue_1_activate + Deck 2: Set, preview from of jump to hotcue 1 + 0x99 + 0x00 [Channel1] - hotcue_1_activate - Deck 1: Set, preview from or jump to hotcue 1 - 0x97 + hotcue_1_clear + Deck 1: Clear hotcue 1 + 0x98 0x00 - [AutoDJ] - enabled - Toggle Auto DJ On/Off - 0x96 - 0x59 + [Channel1] + hotcue_3_activate + Deck 1: Set, preview from or jump to hotcue 3 + 0x97 + 0x02 - [EqualizerRack1_[Channel1]_Effect1] - parameter2 - Deck 1: Adjust Mid EQ - 0xB0 - 0x2B + [Channel2] + hotcue_1_clear + Deck 2: Clear hotcue 1 + 0x9A + 0x00 - + [EqualizerRack1_[Channel2]_Effect1] - parameter2 - Deck 2: Adjust Mid EQ + parameter3 + Deck 2: Adjust High EQ 0xB1 - 0x2B + 0x27 - [Channel1] - hotcue_4_clear - Deck 1: Clear hotcue 4 - 0x98 - 0x03 + [Channel2] + hotcue_2_activate + Deck 2: Set, preview from of jump to hotcue 2 + 0x99 + 0x01 - - [Channel1] - DDJ200.touch - Deck 1: Touch - 0x90 - 0x36 - - - - [EqualizerRack1_[Channel1]_Effect1] parameter3 Deck 1: Adjust High EQ 0xB0 - 0x07 + 0x27 - + - [Channel2] - hotcue_4_activate - Deck 2: Set, preview from of jump to hotcue 4 - 0x99 - 0x03 + [Channel1] + hotcue_2_clear + Deck 1: Clear hotcue 2 + 0x98 + 0x01 [Channel2] - DDJ200.touch - Deck 2: Touch - 0x91 - 0x36 + volume + Deck 2: Volume Fader + 0xB1 + 0x13 - + - [EqualizerRack1_[Channel2]_Effect1] - parameter3 - Deck 2: Adjust High EQ - 0xB1 - 0x07 + [Channel1] + hotcue_4_activate + Deck 1: Set, preview from or jump to hotcue 4 + 0x97 + 0x03 + + + + + + [Channel1] + volume + Deck 1: Volume Fader + 0xB0 + 0x13 [Channel2] - hotcue_4_clear - Deck 2: Clear hotcue 4 + hotcue_2_clear + Deck 2: Clear hotcue 2 0x9A - 0x03 + 0x01 - [Channel1] - hotcue_2_activate - Deck 1: Set, preview from or jump to hotcue 2 - 0x97 - 0x01 + [QuickEffectRack1_[Channel2]] + super1 + Quick Effect: Quick Effect Super Knob (control linked effect parameters) + 0xB6 + 0x38 - + - [AutoDJ] - fade_now - Trigger the transition to the next track - 0x96 - 0x5A + [Channel2] + hotcue_3_activate + Deck 2: Set, preview from of jump to hotcue 3 + 0x99 + 0x02 [Channel1] - hotcue_5_clear - Deck 1: Clear hotcue 5 + hotcue_3_clear + Deck 1: Clear hotcue 3 0x98 - 0x04 + 0x02 - [Channel2] + [Channel1] hotcue_5_activate - Deck 2: Set, preview from of jump to hotcue 5 - 0x99 + Deck 1: Set, preview from or jump to hotcue 5 + 0x97 0x04 @@ -522,39 +576,59 @@ [Channel2] - hotcue_5_clear - Deck 2: Clear hotcue 5 + hotcue_3_clear + Deck 2: Clear hotcue 3 0x9A - 0x04 + 0x02 - [Channel1] - hotcue_3_activate - Deck 1: Set, preview from or jump to hotcue 3 - 0x97 - 0x02 + [EqualizerRack1_[Channel2]_Effect1] + parameter1 + Deck 2: Adjust Low EQ + 0xB1 + 0x0F - + - [Channel1] - volume - Deck 1: Volume Fader - 0xB0 - 0x13 + [Channel2] + hotcue_4_activate + Deck 2: Set, preview from of jump to hotcue 4 + 0x99 + 0x03 + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter1 + Deck 1: Adjust Low EQ + 0xB0 + 0x0F [Channel1] - hotcue_6_clear - Deck 1: Clear hotcue 6 + hotcue_4_clear + Deck 1: Clear hotcue 4 0x98 + 0x03 + + + + + + [Channel1] + hotcue_6_activate + Deck 1: Set, preview from or jump to hotcue 6 + 0x97 0x05 @@ -562,59 +636,61 @@ [Channel2] - volume - Deck 2: Volume Fader - 0xB1 - 0x13 + hotcue_4_clear + Deck 2: Clear hotcue 4 + 0x9A + 0x03 - + [Channel2] - hotcue_6_activate - Deck 2: Set, preview from of jump to hotcue 6 - 0x99 - 0x05 + rate + Deck 2: Playback speed control + 0xB1 + 0x00 - + + [Channel2] - hotcue_6_clear - Deck 2: Clear hotcue 6 - 0x9A - 0x05 + hotcue_5_activate + Deck 2: Set, preview from of jump to hotcue 5 + 0x99 + 0x04 [Channel1] - hotcue_4_activate - Deck 1: Set, preview from or jump to hotcue 4 - 0x97 - 0x03 + rate + Deck 1: Playback speed control + 0xB0 + 0x00 - + + [Channel1] - hotcue_7_clear - Deck 1: Clear hotcue 7 + hotcue_5_clear + Deck 1: Clear hotcue 5 0x98 - 0x06 + 0x04 - [Channel2] + [Channel1] hotcue_7_activate - Deck 2: Set, preview from of jump to hotcue 7 - 0x99 + Deck 1: Set, preview from or jump to hotcue 7 + 0x97 0x06 @@ -622,69 +698,49 @@ [Channel2] - hotcue_7_clear - Deck 2: Clear hotcue 7 + hotcue_5_clear + Deck 2: Clear hotcue 5 0x9A - 0x06 + 0x04 - [QuickEffectRack1_[Channel2]] + [QuickEffectRack1_[Channel1]] super1 Quick Effect: Quick Effect Super Knob (control linked effect parameters) 0xB6 - 0x38 + 0x17 - + - [Channel1] - hotcue_5_activate - Deck 1: Set, preview from or jump to hotcue 5 - 0x97 - 0x04 + [Channel2] + hotcue_6_activate + Deck 2: Set, preview from of jump to hotcue 6 + 0x99 + 0x05 - - [EqualizerRack1_[Channel1]_Effect1] - parameter1 - Deck 1: Adjust Low EQ - 0xB0 - 0x2F - - - - - - [EqualizerRack1_[Channel2]_Effect1] - parameter1 - Deck 2: Adjust Low EQ - 0xB1 - 0x2F - - - - [Channel1] - hotcue_8_clear - Deck 1: Clear hotcue 8 + hotcue_6_clear + Deck 1: Clear hotcue 6 0x98 - 0x07 + 0x05 - [Channel2] + [Channel1] hotcue_8_activate - Deck 2: Set, preview from of jump to hotcue 8 - 0x99 + Deck 1: Set, preview from or jump to hotcue 8 + 0x97 0x07 @@ -692,49 +748,19 @@ [Channel2] - hotcue_8_clear - Deck 2: Clear hotcue 8 + hotcue_6_clear + Deck 2: Clear hotcue 6 0x9A - 0x07 - - - - - - [Channel1] - hotcue_6_activate - Deck 1: Set, preview from or jump to hotcue 6 - 0x97 0x05 - - [Channel1] - rate - Deck 1: Playback speed control - 0xB0 - 0x20 - - - - [Channel2] - rate - Deck 2: Playback speed control (Vinyl "Pitch" slider) - 0xB1 - 0x20 - - - - - - [Channel1] hotcue_7_activate - Deck 1: Set, preview from or jump to hotcue 7 - 0x97 + Deck 2: Set, preview from of jump to hotcue 7 + 0x99 0x06 @@ -742,29 +768,29 @@ [Channel1] - DDJ200.jog - Deck 1: Jog - 0xB0 - 0x21 + hotcue_7_clear + Deck 1: Clear hotcue 7 + 0x98 + 0x06 - + [Channel2] - DDJ200.jog - Deck 2: Jog - 0xB1 - 0x21 + hotcue_7_clear + Deck 2: Clear hotcue 7 + 0x9A + 0x06 - + - [Channel1] + [Channel2] hotcue_8_activate - Deck 1: Set, preview from or jump to hotcue 8 - 0x97 + Deck 2: Set, preview from of jump to hotcue 8 + 0x99 0x07 @@ -772,32 +798,22 @@ [Channel1] - DDJ200.scratch - Deck 1: Scratch - 0xB0 - 0x22 - - - - - - [QuickEffectRack1_[Channel1]] - super1 - Quick Effect: Quick Effect Super Knob (control linked effect parameters) - 0xB6 - 0x17 + hotcue_8_clear + Deck 1: Clear hotcue 8 + 0x98 + 0x07 - + [Channel2] - DDJ200.scratch - Deck 2: Scratch - 0xB1 - 0x22 + cue_set + Deck 2: Set cue point + 0x91 + 0x47 - + @@ -810,27 +826,263 @@ - - [Channel1] - DDJ200.seek - Deck 1: Seek - 0xB0 - 0x29 - - - - [Channel2] - DDJ200.seek - Deck 2: Seek - 0xB1 - 0x29 + hotcue_8_clear + Deck 2: Clear hotcue 8 + 0x9A + 0x07 - + - - + + + + [Channel1] + play + Deck 1: Play LED + 0x90 + 0x0B + 0x7F + 0x00 + 0.5 + + + [Channel2] + play + Deck 2: Play LED + 0x91 + 0x0B + 0x7F + 0x00 + 0.5 + + + [Channel1] + sync_enabled + Deck 2: Beat sync LED + 0x90 + 0x58 + 0x7F + 0x00 + 0.5 + + + [Channel2] + sync_enabled + Deck 2: Beat sync LED + 0x91 + 0x58 + 0x7F + 0x00 + 0.5 + + + [Channel1] + cue_default + Deck 1: Cue LED + 0x90 + 0x0C + 0x7F + 0x00 + 0.5 + + + [Channel2] + cue_default + Deck 2: Cue LED + 0x91 + 0x0C + 0x7F + 0x00 + 0.5 + + + [Channel1] + pfl + Deck 1: Headphone listen (pfl) LED + 0x90 + 0x54 + 0x7F + 0x00 + 0.5 + + + [Channel2] + pfl + Deck 2: Headphone listen (pfl) LED + 0x91 + 0x54 + 0x7F + 0x00 + 0.5 + + + + + [Channel1] + hotcue_1_enabled + Deck 1: hotcue 1 LED + 0x97 + 0x00 + 0x7F + 0x00 + 0.5 + + + [Channel1] + hotcue_2_enabled + Deck 1: hotcue 2 LED + 0x97 + 0x01 + 0x7F + 0x00 + 0.5 + + + [Channel1] + hotcue_3_enabled + Deck 1: hotcue 3 LED + 0x97 + 0x02 + 0x7F + 0x00 + 0.5 + + + [Channel1] + hotcue_4_enabled + Deck 1: hotcue 4 LED + 0x97 + 0x03 + 0x7F + 0x00 + 0.5 + + + [Channel1] + hotcue_5_enabled + Deck 1: hotcue 5 LED + 0x97 + 0x04 + 0x7F + 0x00 + 0.5 + + + [Channel1] + hotcue_6_enabled + Deck 1: hotcue 6 LED + 0x97 + 0x05 + 0x7F + 0x00 + 0.5 + + + [Channel1] + hotcue_7_enabled + Deck 1: hotcue 7 LED + 0x97 + 0x06 + 0x7F + 0x00 + 0.5 + + + [Channel1] + hotcue_8_enabled + Deck 1: hotcue 8 LED + 0x97 + 0x07 + 0x7F + 0x00 + 0.5 + + + + [Channel2] + hotcue_1_enabled + Deck 2: hotcue 1 LED + 0x99 + 0x00 + 0x7F + 0x00 + 0.5 + + + [Channel2] + hotcue_2_enabled + Deck 2: hotcue 2 LED + 0x99 + 0x01 + 0x7F + 0x00 + 0.5 + + + [Channel2] + hotcue_3_enabled + Deck 2: hotcue 3 LED + 0x99 + 0x02 + 0x7F + 0x00 + 0.5 + + + [Channel2] + hotcue_4_enabled + Deck 2: hotcue 4 LED + 0x99 + 0x03 + 0x7F + 0x00 + 0.5 + + + [Channel2] + hotcue_5_enabled + Deck 2: hotcue 5 LED + 0x99 + 0x04 + 0x7F + 0x00 + 0.5 + + + [Channel2] + hotcue_6_enabled + Deck 2: hotcue 6 LED + 0x99 + 0x05 + 0x7F + 0x00 + 0.5 + + + [Channel2] + hotcue_7_enabled + Deck 2: hotcue 7 LED + 0x99 + 0x06 + 0x7F + 0x00 + 0.5 + + + [Channel2] + hotcue_8_enabled + Deck 2: hotcue 8 LED + 0x99 + 0x07 + 0x7F + 0x00 + 0.5 + + + + From b4fb08d982cc3dae966058b9a4e18ad36abf4c3c Mon Sep 17 00:00:00 2001 From: Dan Giddins Date: Sun, 11 Oct 2020 18:05:01 +0100 Subject: [PATCH 08/13] get headphones master button working --- res/controllers/Pioneer DDJ-200.midi.xml | 12 +++++++++- res/controllers/Pioneer-DDJ-200-scripts.js | 26 ++++++++++++++++------ 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/res/controllers/Pioneer DDJ-200.midi.xml b/res/controllers/Pioneer DDJ-200.midi.xml index fcd9fa82d34..e95b12bd0b3 100644 --- a/res/controllers/Pioneer DDJ-200.midi.xml +++ b/res/controllers/Pioneer DDJ-200.midi.xml @@ -354,6 +354,16 @@ + + [Master] + DDJ200.headmix + Headphones master button as headMix knob + 0x96 + 0x63 + + + + [Channel2] pfl @@ -862,7 +872,7 @@ [Channel1] sync_enabled - Deck 2: Beat sync LED + Deck 1: Beat sync LED 0x90 0x58 0x7F diff --git a/res/controllers/Pioneer-DDJ-200-scripts.js b/res/controllers/Pioneer-DDJ-200-scripts.js index dd5f5158374..8de20b3563c 100644 --- a/res/controllers/Pioneer-DDJ-200-scripts.js +++ b/res/controllers/Pioneer-DDJ-200-scripts.js @@ -1,22 +1,24 @@ -var DDJ200 = {}; +var DDJ200 = { + headMix_switch : 0 +}; -DDJ200.init = function () {} +DDJ200.init = function () {}; -DDJ200.shutdown = function () {} +DDJ200.shutdown = function () {}; DDJ200.scratch = function (channel, control, value, status, group) { // For a control that centers on 0x40 (64): // Convert value down to +1/-1 // Register the movement engine.scratchTick(script.deckFromGroup(group), value - 64); -} +}; DDJ200.jog = function (channel, control, value, status, group) { // For a control that centers on 0x40 (64): // Convert value down to +1/-1 // Register the movement engine.setValue(group, 'jog', value - 64); -} +}; DDJ200.touch = function (channel, control, value, status, group) { var deckNumber = script.deckFromGroup(group); @@ -28,7 +30,7 @@ DDJ200.touch = function (channel, control, value, status, group) { var alpha = 1.0 / 8; engine.scratchEnable(deckNumber, 128, 33 + 1 / 3, alpha, alpha / 32); } -} +}; DDJ200.seek = function (channel, control, value, status, group) { var oldPos = engine.getValue(group, "playposition"); @@ -38,4 +40,14 @@ DDJ200.seek = function (channel, control, value, status, group) { var duration = engine.getValue(group, "duration"); var newPos = Math.max(0, oldPos + ((value - 64) * 0.2 / duration)); engine.setValue(group, "playposition", newPos); // Strip search -} +}; + +DDJ200.headmix = function (channel, control, value, status, group) { + if (value == 0) { return; } + DDJ200.headMix_switch = 1 - DDJ200.headMix_switch; + // toggle headMix knob to values of -1 and 1 + engine.setValue("[Master]", "headMix", 2 * DDJ200.headMix_switch - 1); + + // now switch headMix LED with midi.sendShortMsg(0x96, 0x63, 0x7F or 0); + midi.sendShortMsg(0x90+channel, control, 0x7F * DDJ200.headMix_switch); +}; From a17ff8727a65b6791fb7dbd0dfbaa43ad3d229a1 Mon Sep 17 00:00:00 2001 From: Dan Giddins Date: Mon, 12 Oct 2020 11:50:50 +0100 Subject: [PATCH 09/13] remove unused arguments --- res/controllers/Pioneer-DDJ-200-scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Pioneer-DDJ-200-scripts.js b/res/controllers/Pioneer-DDJ-200-scripts.js index 8de20b3563c..f4cdf59e222 100644 --- a/res/controllers/Pioneer-DDJ-200-scripts.js +++ b/res/controllers/Pioneer-DDJ-200-scripts.js @@ -42,7 +42,7 @@ DDJ200.seek = function (channel, control, value, status, group) { engine.setValue(group, "playposition", newPos); // Strip search }; -DDJ200.headmix = function (channel, control, value, status, group) { +DDJ200.headmix = function (channel, control, value) { if (value == 0) { return; } DDJ200.headMix_switch = 1 - DDJ200.headMix_switch; // toggle headMix knob to values of -1 and 1 From 91e2171702962d19c763149d6dcd7557549e08d0 Mon Sep 17 00:00:00 2001 From: Frank Breitling Date: Sun, 18 Oct 2020 17:22:42 +0200 Subject: [PATCH 10/13] Changes according to pre-commit hook --- res/controllers/Pioneer DDJ-200.midi.xml | 2 +- res/controllers/Pioneer-DDJ-200-scripts.js | 37 +++++++++++++--------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/res/controllers/Pioneer DDJ-200.midi.xml b/res/controllers/Pioneer DDJ-200.midi.xml index e95b12bd0b3..a5b700075c3 100644 --- a/res/controllers/Pioneer DDJ-200.midi.xml +++ b/res/controllers/Pioneer DDJ-200.midi.xml @@ -930,7 +930,7 @@ 0.5 - + [Channel1] hotcue_1_enabled diff --git a/res/controllers/Pioneer-DDJ-200-scripts.js b/res/controllers/Pioneer-DDJ-200-scripts.js index f4cdf59e222..892ee762ca4 100644 --- a/res/controllers/Pioneer-DDJ-200-scripts.js +++ b/res/controllers/Pioneer-DDJ-200-scripts.js @@ -1,28 +1,35 @@ var DDJ200 = { - headMix_switch : 0 + headMixSwitch: 0, + jogDisabled: new Array(false, false, false, false, false) }; -DDJ200.init = function () {}; +DDJ200.init = function() {}; -DDJ200.shutdown = function () {}; +DDJ200.shutdown = function() {}; -DDJ200.scratch = function (channel, control, value, status, group) { +DDJ200.scratch = function(channel, control, value, status, group) { // For a control that centers on 0x40 (64): // Convert value down to +1/-1 // Register the movement engine.scratchTick(script.deckFromGroup(group), value - 64); }; -DDJ200.jog = function (channel, control, value, status, group) { +DDJ200.jog = function(channel, control, value, status, group) { // For a control that centers on 0x40 (64): // Convert value down to +1/-1 // Register the movement - engine.setValue(group, 'jog', value - 64); + var deckNumber = script.deckFromGroup(group); + if (DDJ200.jogDisabled[deckNumber]) { return; } + engine.setValue(group, "jog", value - 64); }; -DDJ200.touch = function (channel, control, value, status, group) { +DDJ200.touch = function(channel, control, value, status, group) { var deckNumber = script.deckFromGroup(group); - if (value == 0) { + if (value === 0) { + // disable jog to not prevent alignment and enable it after 900 ms + DDJ200.jogDisabled[deckNumber] = true; + engine.beginTimer(900, "DDJ200.jogDisabled["+deckNumber+"] = false;", + true); // disable scratch engine.scratchDisable(deckNumber); } else { @@ -32,7 +39,7 @@ DDJ200.touch = function (channel, control, value, status, group) { } }; -DDJ200.seek = function (channel, control, value, status, group) { +DDJ200.seek = function(channel, control, value, status, group) { var oldPos = engine.getValue(group, "playposition"); // Since ‘playposition’ is normalized to unity, we need to scale by // song duration in order for the jog wheel to cover the same amount @@ -42,12 +49,12 @@ DDJ200.seek = function (channel, control, value, status, group) { engine.setValue(group, "playposition", newPos); // Strip search }; -DDJ200.headmix = function (channel, control, value) { - if (value == 0) { return; } - DDJ200.headMix_switch = 1 - DDJ200.headMix_switch; +DDJ200.headmix = function(channel, control, value) { + if (value === 0) { return; } + DDJ200.headMixSwitch = 1 - DDJ200.headMixSwitch; // toggle headMix knob to values of -1 and 1 - engine.setValue("[Master]", "headMix", 2 * DDJ200.headMix_switch - 1); - + engine.setValue("[Master]", "headMix", 2 * DDJ200.headMixSwitch - 1); + // now switch headMix LED with midi.sendShortMsg(0x96, 0x63, 0x7F or 0); - midi.sendShortMsg(0x90+channel, control, 0x7F * DDJ200.headMix_switch); + midi.sendShortMsg(0x90+channel, control, 0x7F * DDJ200.headMixSwitch); }; From 11425e1a511ef25e1e177c53347026788d7464de Mon Sep 17 00:00:00 2001 From: Frank Breitling Date: Sun, 18 Oct 2020 19:08:38 +0200 Subject: [PATCH 11/13] Change from code review by Holzhaus --- res/controllers/Pioneer-DDJ-200-scripts.js | 29 +++++++++++----------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/res/controllers/Pioneer-DDJ-200-scripts.js b/res/controllers/Pioneer-DDJ-200-scripts.js index 892ee762ca4..a7b662bbd4f 100644 --- a/res/controllers/Pioneer-DDJ-200-scripts.js +++ b/res/controllers/Pioneer-DDJ-200-scripts.js @@ -1,5 +1,4 @@ var DDJ200 = { - headMixSwitch: 0, jogDisabled: new Array(false, false, false, false, false) }; @@ -19,23 +18,24 @@ DDJ200.jog = function(channel, control, value, status, group) { // Convert value down to +1/-1 // Register the movement var deckNumber = script.deckFromGroup(group); - if (DDJ200.jogDisabled[deckNumber]) { return; } - engine.setValue(group, "jog", value - 64); + if (! DDJ200.jogDisabled[deckNumber]) { + engine.setValue(group, "jog", value - 64); + } }; DDJ200.touch = function(channel, control, value, status, group) { var deckNumber = script.deckFromGroup(group); - if (value === 0) { + if (value) { + // enable scratch + var alpha = 1.0 / 8; + engine.scratchEnable(deckNumber, 128, 33 + 1 / 3, alpha, alpha / 32); + } else { // disable jog to not prevent alignment and enable it after 900 ms DDJ200.jogDisabled[deckNumber] = true; engine.beginTimer(900, "DDJ200.jogDisabled["+deckNumber+"] = false;", true); // disable scratch engine.scratchDisable(deckNumber); - } else { - // enable scratch - var alpha = 1.0 / 8; - engine.scratchEnable(deckNumber, 128, 33 + 1 / 3, alpha, alpha / 32); } }; @@ -50,11 +50,10 @@ DDJ200.seek = function(channel, control, value, status, group) { }; DDJ200.headmix = function(channel, control, value) { - if (value === 0) { return; } - DDJ200.headMixSwitch = 1 - DDJ200.headMixSwitch; - // toggle headMix knob to values of -1 and 1 - engine.setValue("[Master]", "headMix", 2 * DDJ200.headMixSwitch - 1); - - // now switch headMix LED with midi.sendShortMsg(0x96, 0x63, 0x7F or 0); - midi.sendShortMsg(0x90+channel, control, 0x7F * DDJ200.headMixSwitch); + if (value) { + var masterMixEnabled = (engine.getValue("[Master]", "headMix") > 0); + // toggle headMix knob between values of -1 and 1 + engine.setValue("[Master]", "headMix", masterMixEnabled ? -1 : 1); + midi.sendShortMsg(0x96, 0x63, masterMixEnabled ? 0x7F : 0); // set LED + } }; From bf7b943a3f044f839496b71db2239da07f184272 Mon Sep 17 00:00:00 2001 From: Frank Breitling Date: Mon, 19 Oct 2020 10:38:01 +0200 Subject: [PATCH 12/13] Updated metadata --- res/controllers/Pioneer DDJ-200.midi.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/res/controllers/Pioneer DDJ-200.midi.xml b/res/controllers/Pioneer DDJ-200.midi.xml index a5b700075c3..593b82de1ac 100644 --- a/res/controllers/Pioneer DDJ-200.midi.xml +++ b/res/controllers/Pioneer DDJ-200.midi.xml @@ -2,8 +2,10 @@ Pioneer DDJ-200 - Dan Giddins, Frank Breitling - Pioneer DDJ-200 configuration for 2 decks. + Dan Giddins, Frank.Breitling at gmx.de + 2-deck USB & Bluetooth MIDI controller + https://mixxx.discourse.group/t/pioneer-ddj-200-mapping/18259 + pioneer_ddj_200 From c32bf4a159266785cdd55c03f11f9306daa073e8 Mon Sep 17 00:00:00 2001 From: Frank Breitling Date: Mon, 19 Oct 2020 23:59:28 +0200 Subject: [PATCH 13/13] Change in metadata Co-authored-by: Jan Holthuis --- res/controllers/Pioneer DDJ-200.midi.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Pioneer DDJ-200.midi.xml b/res/controllers/Pioneer DDJ-200.midi.xml index 593b82de1ac..f8f79c6215e 100644 --- a/res/controllers/Pioneer DDJ-200.midi.xml +++ b/res/controllers/Pioneer DDJ-200.midi.xml @@ -3,7 +3,7 @@ Pioneer DDJ-200 Dan Giddins, Frank.Breitling at gmx.de - 2-deck USB & Bluetooth MIDI controller + 2-deck USB and Bluetooth MIDI controller. https://mixxx.discourse.group/t/pioneer-ddj-200-mapping/18259 pioneer_ddj_200