diff --git a/res/controllers/Pioneer DDJ-200.midi.xml b/res/controllers/Pioneer DDJ-200.midi.xml new file mode 100644 index 00000000000..e95b12bd0b3 --- /dev/null +++ b/res/controllers/Pioneer DDJ-200.midi.xml @@ -0,0 +1,1098 @@ + + + + Pioneer DDJ-200 + Dan Giddins, Frank Breitling + Pioneer DDJ-200 configuration for 2 decks. + + + + + + + + [Channel2] + sync_enabled + Deck 2: Tap to sync tempo (and phase with quantize enabled), hold to enable permanent sync + 0x91 + 0x58 + + + + + + [Channel1] + sync_enabled + Deck 1: Tap to sync tempo (and phase with quantize enabled), hold to enable permanent sync + 0x90 + 0x58 + + + + + + [Master] + crossfader + Master crossfader + 0xB6 + 0x3F + + + + + + + [Channel2] + DDJ200.seek + Deck 2: Seek + 0xB1 + 0x29 + + + + + + [Channel1] + DDJ200.seek + Deck 1: Seek + 0xB0 + 0x29 + + + + + + [AutoDJ] + enabled + Toggle Auto DJ On/Off + 0x96 + 0x59 + + + + + + [AutoDJ] + fade_now + Trigger the transition to the next track + 0x96 + 0x5A + + + + + + [Channel2] + DDJ200.touch + Deck 2: Touch + 0x91 + 0x36 + + + + + + [Channel1] + DDJ200.touch + Deck 1: Touch + 0x90 + 0x36 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter2 + Deck 2: Adjust Mid EQ + 0xB1 + 0x2B + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter2 + Deck 1: Adjust Mid EQ + 0xB0 + 0x2B + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter3 + Deck 2: Adjust High EQ + 0xB1 + 0x07 + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter3 + Deck 1: Adjust High EQ + 0xB0 + 0x07 + + + + + + [Channel2] + bpm_tap + Deck 2: BPM tap button + 0x91 + 0x60 + + + + + + [QuickEffectRack1_[Channel2]] + super1 + Quick Effect: Quick Effect Super Knob (control linked effect parameters) + 0xB6 + 0x18 + + + + + + [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 + Deck 2: Go to cue point and stop + 0x91 + 0x48 + + + + + + [Channel1] + cue_gotoandstop + Deck 1: Go to cue point and stop + 0x90 + 0x48 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter1 + Deck 2: Adjust Low EQ + 0xB1 + 0x2F + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter1 + Deck 1: Adjust Low EQ + 0xB0 + 0x2F + + + + + + [Channel2] + play + Deck 2: Play button + 0x91 + 0x0B + + + + + + [Channel2] + rate + Deck 2: Playback speed control + 0xB1 + 0x20 + + + + + + + [Channel1] + play + Deck 1: Play button + 0x90 + 0x0B + + + + + + [Channel1] + rate + Deck 1: Playback speed control + 0xB0 + 0x20 + + + + + + + [Channel2] + cue_default + Deck 2: Cue button + 0x91 + 0x0C + + + + + + [Channel1] + cue_default + Deck 1: Cue button + 0x90 + 0x0C + + + + + + [QuickEffectRack1_[Channel1]] + super1 + Quick Effect: Quick Effect Super Knob (control linked effect parameters) + 0xB6 + 0x37 + + + + + + [Channel2] + DDJ200.jog + Deck 2: Jog + 0xB1 + 0x21 + + + + + + [Channel1] + DDJ200.jog + Deck 1: Jog + 0xB0 + 0x21 + + + + + + [Channel2] + DDJ200.scratch + Deck 2: Scratch + 0xB1 + 0x22 + + + + + + [Channel1] + DDJ200.scratch + Deck 1: Scratch + 0xB0 + 0x22 + + + + + + [Master] + crossfader + Master crossfader + 0xB6 + 0x1F + + + + + + + [Master] + DDJ200.headmix + Headphones master button as headMix knob + 0x96 + 0x63 + + + + + + [Channel2] + pfl + Deck 2: Headphone listen (pfl) button + 0x91 + 0x54 + + + + + + [Channel1] + pfl + Deck 1: Headphone listen (pfl) button + 0x90 + 0x54 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter2 + Deck 2: Adjust Mid EQ + 0xB1 + 0x0B + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter2 + Deck 1: Adjust Mid EQ + 0xB0 + 0x0B + + + + + + [Channel1] + hotcue_1_activate + Deck 1: Set, preview from or jump to hotcue 1 + 0x97 + 0x00 + + + + + + [Channel1] + hotcue_2_activate + Deck 1: Set, preview from or jump to hotcue 2 + 0x97 + 0x01 + + + + + + [Channel2] + hotcue_1_activate + Deck 2: Set, preview from of jump to hotcue 1 + 0x99 + 0x00 + + + + + + [Channel1] + hotcue_1_clear + Deck 1: Clear hotcue 1 + 0x98 + 0x00 + + + + + + [Channel1] + hotcue_3_activate + Deck 1: Set, preview from or jump to hotcue 3 + 0x97 + 0x02 + + + + + + [Channel2] + hotcue_1_clear + Deck 2: Clear hotcue 1 + 0x9A + 0x00 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter3 + Deck 2: Adjust High EQ + 0xB1 + 0x27 + + + + + + [Channel2] + hotcue_2_activate + Deck 2: Set, preview from of jump to hotcue 2 + 0x99 + 0x01 + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter3 + Deck 1: Adjust High EQ + 0xB0 + 0x27 + + + + + + [Channel1] + hotcue_2_clear + Deck 1: Clear hotcue 2 + 0x98 + 0x01 + + + + + + [Channel2] + volume + Deck 2: Volume Fader + 0xB1 + 0x13 + + + + + + [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_2_clear + Deck 2: Clear hotcue 2 + 0x9A + 0x01 + + + + + + [QuickEffectRack1_[Channel2]] + super1 + Quick Effect: Quick Effect Super Knob (control linked effect parameters) + 0xB6 + 0x38 + + + + + + [Channel2] + hotcue_3_activate + Deck 2: Set, preview from of jump to hotcue 3 + 0x99 + 0x02 + + + + + + [Channel1] + hotcue_3_clear + Deck 1: Clear hotcue 3 + 0x98 + 0x02 + + + + + + [Channel1] + hotcue_5_activate + Deck 1: Set, preview from or jump to hotcue 5 + 0x97 + 0x04 + + + + + + [Channel2] + hotcue_3_clear + Deck 2: Clear hotcue 3 + 0x9A + 0x02 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter1 + Deck 2: Adjust Low EQ + 0xB1 + 0x0F + + + + + + [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_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 + + + + + + [Channel2] + hotcue_4_clear + Deck 2: Clear hotcue 4 + 0x9A + 0x03 + + + + + + [Channel2] + rate + Deck 2: Playback speed control + 0xB1 + 0x00 + + + + + + + [Channel2] + hotcue_5_activate + Deck 2: Set, preview from of jump to hotcue 5 + 0x99 + 0x04 + + + + + + [Channel1] + rate + Deck 1: Playback speed control + 0xB0 + 0x00 + + + + + + + [Channel1] + hotcue_5_clear + Deck 1: Clear hotcue 5 + 0x98 + 0x04 + + + + + + [Channel1] + hotcue_7_activate + Deck 1: Set, preview from or jump to hotcue 7 + 0x97 + 0x06 + + + + + + [Channel2] + hotcue_5_clear + Deck 2: Clear hotcue 5 + 0x9A + 0x04 + + + + + + [QuickEffectRack1_[Channel1]] + super1 + Quick Effect: Quick Effect Super Knob (control linked effect parameters) + 0xB6 + 0x17 + + + + + + [Channel2] + hotcue_6_activate + Deck 2: Set, preview from of jump to hotcue 6 + 0x99 + 0x05 + + + + + + [Channel1] + hotcue_6_clear + Deck 1: Clear hotcue 6 + 0x98 + 0x05 + + + + + + [Channel1] + hotcue_8_activate + Deck 1: Set, preview from or jump to hotcue 8 + 0x97 + 0x07 + + + + + + [Channel2] + hotcue_6_clear + Deck 2: Clear hotcue 6 + 0x9A + 0x05 + + + + + + [Channel2] + hotcue_7_activate + Deck 2: Set, preview from of jump to hotcue 7 + 0x99 + 0x06 + + + + + + [Channel1] + hotcue_7_clear + Deck 1: Clear hotcue 7 + 0x98 + 0x06 + + + + + + [Channel2] + hotcue_7_clear + Deck 2: Clear hotcue 7 + 0x9A + 0x06 + + + + + + [Channel2] + hotcue_8_activate + Deck 2: Set, preview from of jump to hotcue 8 + 0x99 + 0x07 + + + + + + [Channel1] + hotcue_8_clear + Deck 1: Clear hotcue 8 + 0x98 + 0x07 + + + + + + [Channel2] + cue_set + Deck 2: Set cue point + 0x91 + 0x47 + + + + + + [Channel1] + cue_set + Deck 1: Set cue point + 0x90 + 0x47 + + + + + + [Channel2] + 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 1: 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 + + + + + diff --git a/res/controllers/Pioneer-DDJ-SB.midi.xml b/res/controllers/Pioneer DDJ-SB.midi.xml similarity index 100% rename from res/controllers/Pioneer-DDJ-SB.midi.xml rename to res/controllers/Pioneer DDJ-SB.midi.xml diff --git a/res/controllers/Pioneer-DDJ-SB2.midi.xml b/res/controllers/Pioneer DDJ-SB2.midi.xml similarity index 100% rename from res/controllers/Pioneer-DDJ-SB2.midi.xml rename to res/controllers/Pioneer DDJ-SB2.midi.xml diff --git a/res/controllers/Pioneer-DDJ-200-scripts.js b/res/controllers/Pioneer-DDJ-200-scripts.js new file mode 100644 index 00000000000..f4cdf59e222 --- /dev/null +++ b/res/controllers/Pioneer-DDJ-200-scripts.js @@ -0,0 +1,53 @@ +var DDJ200 = { + headMix_switch : 0 +}; + +DDJ200.init = 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); + if (value == 0) { + // disable scratch + engine.scratchDisable(deckNumber); + } else { + // enable scratch + 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"); + // 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 +}; + +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 + 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); +};