diff --git a/build/nsis/Mixxx.nsi b/build/nsis/Mixxx.nsi index a38c6b4a9174..480d680cd8ac 100644 --- a/build/nsis/Mixxx.nsi +++ b/build/nsis/Mixxx.nsi @@ -363,9 +363,11 @@ Section "Uninstall" Delete "$INSTDIR\controllers\Behringer BCD2000.midi.xml" Delete "$INSTDIR\controllers\Behringer BCD3000 Advanced.midi.xml" Delete "$INSTDIR\controllers\Behringer BCD3000.midi.xml" + Delete "$INSTDIR\controllers\Behringer CMDStudio4a.midi.xml" Delete "$INSTDIR\controllers\Behringer-BCD2000-scripts.js" Delete "$INSTDIR\controllers\Behringer-BCD3000-Advanced-scripts.js" Delete "$INSTDIR\controllers\Behringer-BCD3000-scripts.js" + Delete "$INSTDIR\controllers\Behringer-CMDStudio4a-scripts.js" Delete "$INSTDIR\controllers\common-bulk-midi.js" Delete "$INSTDIR\controllers\common-controller-scripts.js" Delete "$INSTDIR\controllers\common-hid-devices.js" diff --git a/res/controllers/Behringer CMDStudio4a.midi.xml b/res/controllers/Behringer CMDStudio4a.midi.xml new file mode 100644 index 000000000000..ba51a19a80a7 --- /dev/null +++ b/res/controllers/Behringer CMDStudio4a.midi.xml @@ -0,0 +1,3544 @@ + + + + Behringer CMD STUDIO 4a + Craig Easton + Controller mapping for the Behringer CMD STUDIO 4a. V 1.4 Created Jan 2016 for Mixxx 2.0.0 + http://www.mixxx.org/wiki/doku.php/behringer_cmd_studio_4a + http://www.mixxx.org/forums/viewtopic.php?f=7&t=7868 + + + + + + + + + [Playlist] + SelectTrackKnob + Browse knob. + 0xB0 + 0x01 + + + + + + [Playlist] + ToggleSelectedSidebarItem + ENTER button. + 0x90 + 0x01 + + + + + + [Playlist] + BehringerCMDStudio4a.browseLR + Browse left button. + 0x90 + 0x02 + + + + + + [Playlist] + BehringerCMDStudio4a.browseLR + Browse right button. + 0x90 + 0x03 + + + + + + + + [Channel1] + pregain + Deck A Gain. + 0xB0 + 0x10 + + + + + + [Channel2] + pregain + Deck B Gain. + 0xB1 + 0x30 + + + + + + [Channel3] + pregain + Deck C Gain. + 0xB2 + 0x10 + + + + + + [Channel4] + pregain + Deck D Gain. + 0xB3 + 0x30 + + + + + + + [Channel1] + slip_enabled + Deck A FX 1 button. + 0x90 + 0x10 + + + + + + [Channel2] + slip_enabled + Deck B FX 1 button. + 0x91 + 0x30 + + + + + + [Channel3] + slip_enabled + Deck C FX 1 button. + 0x92 + 0x10 + + + + + + [Channel4] + slip_enabled + Deck D FX 1 button. + 0x93 + 0x30 + + + + + + + [Channel1] + repeat + Deck A FX 2 button. + 0x90 + 0x11 + + + + + + [Channel2] + repeat + Deck B FX 2 button. + 0x91 + 0x31 + + + + + + [Channel3] + repeat + Deck C FX 2 button. + 0x92 + 0x11 + + + + + + [Channel4] + repeat + Deck D FX 2 button. + 0x93 + 0x31 + + + + + + + [Channel1] + beats_translate_curpos + Deck A FX 3 button push. + 0x90 + 0x12 + + + + + + [Channel1] + beats_translate_curpos + Deck A FX 3 button release. + 0x80 + 0x12 + + + + + + [Channel2] + beats_translate_curpos + Deck B FX 3 button push. + 0x91 + 0x32 + + + + + + [Channel2] + beats_translate_curpos + Deck B FX 3 button release. + 0x81 + 0x32 + + + + + + [Channel3] + beats_translate_curpos + Deck C FX 3 button push. + 0x92 + 0x12 + + + + + + [Channel3] + beats_translate_curpos + Deck C FX 3 button release. + 0x82 + 0x12 + + + + + + [Channel4] + beats_translate_curpos + Deck D FX 3 button push. + 0x93 + 0x32 + + + + + + [Channel4] + beats_translate_curpos + Deck D FX 3 button release. + 0x83 + 0x32 + + + + + + + [Channel1] + quantize + Deck A FX 4 button. + 0x90 + 0x13 + + + + + + [Channel2] + quantize + Deck B FX 4 button. + 0x91 + 0x33 + + + + + + [Channel3] + quantize + Deck C FX 4 button. + 0x92 + 0x13 + + + + + + [Channel4] + quantize + Deck D FX 4 button. + 0x93 + 0x33 + + + + + + + [EffectRack1_EffectUnit1] + super1 + Deck A FX knob 2. + 0xB0 + 0x11 + + + + + + [EffectRack1_EffectUnit2] + super1 + Deck A FX knob 3. + 0xB0 + 0x12 + + + + + + [EffectRack1_EffectUnit3] + super1 + Deck B FX knob 2. + 0xB1 + 0x31 + + + + + + [EffectRack1_EffectUnit4] + super1 + Deck B FX knob 3. + 0xB1 + 0x32 + + + + + + [EffectRack1_EffectUnit1] + super1 + Deck C FX knob 2. + 0xB2 + 0x11 + + + + + + [EffectRack1_EffectUnit2] + super1 + Deck C FX knob 3. + 0xB2 + 0x12 + + + + + + [EffectRack1_EffectUnit3] + super1 + Deck D FX knob 2. + 0xB3 + 0x31 + + + + + + [EffectRack1_EffectUnit4] + super1 + Deck D FX knob 3. + 0xB3 + 0x32 + + + + + + + [QuickEffectRack1_[Channel1]] + super1 + Deck A FX knob 4. + 0xB0 + 0x13 + + + + + + [QuickEffectRack1_[Channel2]] + super1 + Deck B FX knob 4. + 0xB1 + 0x33 + + + + + + [QuickEffectRack1_[Channel3]] + super1 + Deck C FX knob 4. + 0xB2 + 0x13 + + + + + + [QuickEffectRack1_[Channel4]] + super1 + Deck D FX knob 4. + 0xB3 + 0x33 + + + + + + + [Channel1] + BehringerCMDStudio4a.scratch + Deck A Scratch button. + 0x90 + 0x16 + + + + + + [Channel2] + BehringerCMDStudio4a.scratch + Deck B Scratch button. + 0x91 + 0x36 + + + + + + [Channel3] + BehringerCMDStudio4a.scratch + Deck C Scratch button. + 0x92 + 0x16 + + + + + + [Channel4] + BehringerCMDStudio4a.scratch + Deck D Scratch button. + 0x93 + 0x36 + + + + + + + [Channel1] + loop_in + Deck A loop start push. + 0x90 + 0x17 + + + + + + [Channel1] + loop_in + Deck A loop start release. + 0x80 + 0x17 + + + + + + [Channel1] + loop_out + Deck A loop end push. + 0x90 + 0x18 + + + + + + [Channel1] + loop_out + Deck A loop end release. + 0x80 + 0x18 + + + + + + [Channel1] + reloop_exit + Deck A loop ON/OFF. + 0x90 + 0x19 + + + + + + [Channel2] + loop_in + Deck B loop start push. + 0x91 + 0x38 + + + + + + [Channel2] + loop_in + Deck B loop start release. + 0x81 + 0x38 + + + + + + [Channel2] + loop_out + Deck B loop end push. + 0x91 + 0x37 + + + + + + [Channel2] + loop_out + Deck B loop end release. + 0x81 + 0x37 + + + + + + [Channel2] + reloop_exit + Deck B loop ON/OFF. + 0x91 + 0x39 + + + + + + [Channel3] + loop_in + Deck C loop start push. + 0x92 + 0x17 + + + + + + [Channel3] + loop_in + Deck C loop start release. + 0x82 + 0x17 + + + + + + [Channel3] + loop_out + Deck C loop end push. + 0x92 + 0x18 + + + + + + [Channel3] + loop_out + Deck C loop end release. + 0x82 + 0x18 + + + + + + [Channel3] + reloop_exit + Deck C loop ON/OFF. + 0x92 + 0x19 + + + + + + [Channel4] + loop_in + Deck D loop start push. + 0x93 + 0x38 + + + + + + [Channel4] + loop_in + Deck D loop start release. + 0x83 + 0x38 + + + + + + [Channel4] + loop_out + Deck D loop end push. + 0x93 + 0x37 + + + + + + [Channel4] + loop_out + Deck D loop end release. + 0x83 + 0x37 + + + + + + [Channel4] + reloop_exit + Deck D loop ON/OFF. + 0x93 + 0x39 + + + + + + + [Channel1] + BehringerCMDStudio4a.wheelTouch + Deck A wheel toutch. + 0x90 + 0x1A + + + + + + [Channel1] + BehringerCMDStudio4a.wheelTouch + Deck A wheel release. + 0x80 + 0x1A + + + + + + [Channel1] + BehringerCMDStudio4a.wheelTurn + Deck A wheel turn. + 0xB0 + 0x1A + + + + + + [Channel2] + BehringerCMDStudio4a.wheelTouch + Deck B wheel toutch. + 0x91 + 0x3A + + + + + + [Channel2] + BehringerCMDStudio4a.wheelTouch + Deck B wheel release. + 0x81 + 0x3A + + + + + + [Channel2] + BehringerCMDStudio4a.wheelTurn + Deck B wheel turn. + 0xB1 + 0x3A + + + + + + [Channel3] + BehringerCMDStudio4a.wheelTouch + Deck C wheel toutch. + 0x92 + 0x1A + + + + + + [Channel3] + BehringerCMDStudio4a.wheelTouch + Deck C wheel release. + 0x82 + 0x1A + + + + + + [Channel3] + BehringerCMDStudio4a.wheelTurn + Deck C wheel turn. + 0xB2 + 0x1A + + + + + + [Channel4] + BehringerCMDStudio4a.wheelTouch + Deck D wheel toutch. + 0x93 + 0x3A + + + + + + [Channel4] + BehringerCMDStudio4a.wheelTouch + Deck D wheel release. + 0x83 + 0x3A + + + + + + [Channel4] + BehringerCMDStudio4a.wheelTurn + Deck D wheel turn. + 0xB3 + 0x3A + + + + + + + [Channel1] + keylock + Deck A LOCK button. + 0x90 + 0x1B + + + + + + [Channel2] + keylock + Deck B LOCK button. + 0x91 + 0x3B + + + + + + [Channel3] + keylock + Deck C LOCK button. + 0x92 + 0x1B + + + + + + [Channel4] + keylock + Deck D LOCK button. + 0x93 + 0x3B + + + + + + + [Channel1] + BehringerCMDStudio4a.pitch + Deck A pitch- push. + 0x90 + 0x20 + + + + + + [Channel1] + BehringerCMDStudio4a.pitch + Deck A pitch- release. + 0x80 + 0x20 + + + + + + [Channel1] + BehringerCMDStudio4a.pitch + Deck A pitch+ push. + 0x90 + 0x21 + + + + + + [Channel1] + BehringerCMDStudio4a.pitch + Deck A pitch+ release. + 0x80 + 0x21 + + + + + + [Channel2] + BehringerCMDStudio4a.pitch + Deck B pitch- push. + 0x91 + 0x40 + + + + + + [Channel2] + BehringerCMDStudio4a.pitch + Deck B pitch- release. + 0x81 + 0x40 + + + + + + [Channel2] + BehringerCMDStudio4a.pitch + Deck B pitch+ push. + 0x91 + 0x41 + + + + + + [Channel2] + BehringerCMDStudio4a.pitch + Deck B pitch+ release. + 0x81 + 0x41 + + + + + + [Channel3] + BehringerCMDStudio4a.pitch + Deck C pitch- push. + 0x92 + 0x20 + + + + + + [Channel3] + BehringerCMDStudio4a.pitch + Deck C pitch- release. + 0x82 + 0x20 + + + + + + [Channel3] + BehringerCMDStudio4a.pitch + Deck C pitch+ push. + 0x92 + 0x21 + + + + + + [Channel3] + BehringerCMDStudio4a.pitch + Deck C pitch+ release. + 0x82 + 0x21 + + + + + + [Channel4] + BehringerCMDStudio4a.pitch + Deck D pitch- push. + 0x93 + 0x40 + + + + + + [Channel4] + BehringerCMDStudio4a.pitch + Deck D pitch- release. + 0x83 + 0x40 + + + + + + [Channel4] + BehringerCMDStudio4a.pitch + Deck D pitch+ push. + 0x93 + 0x41 + + + + + + [Channel4] + BehringerCMDStudio4a.pitch + Deck D pitch+ release. + 0x83 + 0x41 + + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 1 push. + 0x90 + 0x22 + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 1 release. + 0x80 + 0x22 + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 2 push. + 0x90 + 0x23 + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 2 release. + 0x80 + 0x23 + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 3 push. + 0x90 + 0x24 + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 3 release. + 0x80 + 0x24 + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 4 push. + 0x90 + 0x25 + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 4 release. + 0x80 + 0x25 + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 5 push. + 0x90 + 0x26 + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 5 release. + 0x80 + 0x26 + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 6 push. + 0x90 + 0x27 + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 6 release. + 0x80 + 0x27 + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 7 push. + 0x90 + 0x28 + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 7 release. + 0x80 + 0x28 + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 8 push. + 0x90 + 0x29 + + + + + + [Channel1] + BehringerCMDStudio4a.hotcue + Deck A hotcue 8 release. + 0x80 + 0x29 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 1 push. + 0x91 + 0x42 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 1 release. + 0x81 + 0x42 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 2 push. + 0x91 + 0x43 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 2 release. + 0x81 + 0x43 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 3 push. + 0x91 + 0x44 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 3 release. + 0x81 + 0x44 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 4 push. + 0x91 + 0x45 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 4 release. + 0x81 + 0x45 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 5 push. + 0x91 + 0x46 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 5 release. + 0x81 + 0x46 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 6 push. + 0x91 + 0x47 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 6 release. + 0x81 + 0x47 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 7 push. + 0x91 + 0x48 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 7 release. + 0x81 + 0x48 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 8 push. + 0x91 + 0x49 + + + + + + [Channel2] + BehringerCMDStudio4a.hotcue + Deck B hotcue 8 release. + 0x81 + 0x49 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 1 push. + 0x92 + 0x22 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 1 release. + 0x82 + 0x22 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 2 push. + 0x92 + 0x23 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 2 release. + 0x82 + 0x23 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 3 push. + 0x92 + 0x24 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 3 release. + 0x82 + 0x24 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 4 push. + 0x92 + 0x25 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 4 release. + 0x82 + 0x25 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 5 push. + 0x92 + 0x26 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 5 release. + 0x82 + 0x26 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 6 push. + 0x92 + 0x27 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 6 release. + 0x82 + 0x27 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 7 push. + 0x92 + 0x28 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 7 release. + 0x82 + 0x28 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 8 push. + 0x92 + 0x29 + + + + + + [Channel3] + BehringerCMDStudio4a.hotcue + Deck C hotcue 8 release. + 0x82 + 0x29 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 1 push. + 0x93 + 0x42 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 1 release. + 0x83 + 0x42 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 2 push. + 0x93 + 0x43 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 2 release. + 0x83 + 0x43 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 3 push. + 0x93 + 0x44 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 3 release. + 0x83 + 0x44 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 4 push. + 0x93 + 0x45 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 4 release. + 0x83 + 0x45 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 5 push. + 0x93 + 0x46 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 5 release. + 0x83 + 0x46 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 6 push. + 0x93 + 0x47 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 6 release. + 0x83 + 0x47 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 7 push. + 0x93 + 0x48 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 7 release. + 0x83 + 0x48 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 8 push. + 0x93 + 0x49 + + + + + + [Channel4] + BehringerCMDStudio4a.hotcue + Deck D hotcue 8 release. + 0x83 + 0x49 + + + + + + + [Channel1] + BehringerCMDStudio4a.del + Deck A DEL button push. + 0x90 + 0x2A + + + + + + [Channel1] + BehringerCMDStudio4a.del + Deck A DEL button release. + 0x80 + 0x2A + + + + + + [Channel2] + BehringerCMDStudio4a.del + Deck B DEL button push. + 0x91 + 0x4A + + + + + + [Channel2] + BehringerCMDStudio4a.del + Deck B DEL button release. + 0x81 + 0x4A + + + + + + [Channel3] + BehringerCMDStudio4a.del + Deck C DEL button push. + 0x92 + 0x2A + + + + + + [Channel3] + BehringerCMDStudio4a.del + Deck C DEL button release. + 0x82 + 0x2A + + + + + + [Channel4] + BehringerCMDStudio4a.del + Deck D DEL button push. + 0x93 + 0x4A + + + + + + [Channel4] + BehringerCMDStudio4a.del + Deck D DEL button release. + 0x83 + 0x4A + + + + + + + [Channel1] + BehringerCMDStudio4a.cue + Deck A CUE push. + 0x90 + 0x2B + + + + + + [Channel1] + BehringerCMDStudio4a.cue + Deck A CUE release. + 0x80 + 0x2B + + + + + + [Channel2] + BehringerCMDStudio4a.cue + Deck B CUE push. + 0x91 + 0x4B + + + + + + [Channel2] + BehringerCMDStudio4a.cue + Deck B CUE release. + 0x81 + 0x4B + + + + + + [Channel3] + BehringerCMDStudio4a.cue + Deck C CUE push. + 0x92 + 0x2B + + + + + + [Channel3] + BehringerCMDStudio4a.cue + Deck C CUE release. + 0x82 + 0x2B + + + + + + [Channel4] + BehringerCMDStudio4a.cue + Deck D CUE push. + 0x93 + 0x4B + + + + + + [Channel4] + BehringerCMDStudio4a.cue + Deck D CUE release. + 0x83 + 0x4B + + + + + + + [Channel1] + BehringerCMDStudio4a.play + Deck A PLAY push. + 0x90 + 0x2C + + + + + + [Channel1] + BehringerCMDStudio4a.play + Deck A PLAY release. + 0x80 + 0x2C + + + + + + [Channel2] + BehringerCMDStudio4a.play + Deck B PLAY push. + 0x91 + 0x4C + + + + + + [Channel2] + BehringerCMDStudio4a.play + Deck B PLAY release. + 0x81 + 0x4C + + + + + + [Channel3] + BehringerCMDStudio4a.play + Deck C PLAY push. + 0x92 + 0x2C + + + + + + [Channel3] + BehringerCMDStudio4a.play + Deck C PLAY release. + 0x82 + 0x2C + + + + + + [Channel4] + BehringerCMDStudio4a.play + Deck D PLAY push. + 0x93 + 0x4C + + + + + + [Channel4] + BehringerCMDStudio4a.play + Deck D PLAY release. + 0x83 + 0x4C + + + + + + + [Channel1] + sync_enabled + Deck A Sync button. + 0x90 + 0x2D + + + + + + [Channel2] + sync_enabled + Deck B Sync button. + 0x91 + 0x4D + + + + + + [Channel3] + sync_enabled + Deck C Sync button. + 0x92 + 0x2D + + + + + + [Channel4] + sync_enabled + Deck D Sync button. + 0x93 + 0x4D + + + + + + + [Channel1] + LoadSelectedTrack + Deck A LOAD button. + 0x90 + 0x50 + + + + + + [Channel2] + LoadSelectedTrack + Deck B LOAD button. + 0x91 + 0x51 + + + + + + [Channel3] + LoadSelectedTrack + Deck C LOAD button. + 0x92 + 0x50 + + + + + + [Channel4] + LoadSelectedTrack + Deck D LOAD button. + 0x93 + 0x51 + + + + + + + [EffectRack1_EffectUnit1] + BehringerCMDStudio4a.fxAssign + Deck A FX Assign 1 push. + 0x90 + 0x52 + + + + + + [EffectRack1_EffectUnit1] + BehringerCMDStudio4a.fxAssign + Deck A FX Assign 1 release. + 0x80 + 0x52 + + + + + + [EffectRack1_EffectUnit2] + BehringerCMDStudio4a.fxAssign + Deck A FX Assign 2 push. + 0x90 + 0x53 + + + + + + [EffectRack1_EffectUnit2] + BehringerCMDStudio4a.fxAssign + Deck A FX Assign 2 release. + 0x80 + 0x53 + + + + + + [EffectRack1_EffectUnit3] + BehringerCMDStudio4a.fxAssign + Deck B FX Assign 1 push. + 0x91 + 0x54 + + + + + + [EffectRack1_EffectUnit3] + BehringerCMDStudio4a.fxAssign + Deck B FX Assign 1 release. + 0x81 + 0x54 + + + + + + [EffectRack1_EffectUnit4] + BehringerCMDStudio4a.fxAssign + Deck B FX Assign 2 push. + 0x91 + 0x55 + + + + + + [EffectRack1_EffectUnit4] + BehringerCMDStudio4a.fxAssign + Deck B FX Assign 2 release. + 0x81 + 0x55 + + + + + + [EffectRack1_EffectUnit1] + BehringerCMDStudio4a.fxAssign + Deck C FX Assign 1 push. + 0x92 + 0x52 + + + + + + [EffectRack1_EffectUnit1] + BehringerCMDStudio4a.fxAssign + Deck C FX Assign 1 release. + 0x82 + 0x52 + + + + + + [EffectRack1_EffectUnit2] + BehringerCMDStudio4a.fxAssign + Deck C FX Assign 2 push. + 0x92 + 0x53 + + + + + + [EffectRack1_EffectUnit2] + BehringerCMDStudio4a.fxAssign + Deck C FX Assign 2 release. + 0x82 + 0x53 + + + + + + [EffectRack1_EffectUnit3] + BehringerCMDStudio4a.fxAssign + Deck D FX Assign 1 push. + 0x93 + 0x54 + + + + + + [EffectRack1_EffectUnit3] + BehringerCMDStudio4a.fxAssign + Deck D FX Assign 1 release. + 0x83 + 0x54 + + + + + + [EffectRack1_EffectUnit4] + BehringerCMDStudio4a.fxAssign + Deck D FX Assign 2 push. + 0x93 + 0x55 + + + + + + [EffectRack1_EffectUnit4] + BehringerCMDStudio4a.fxAssign + Deck D FX Assign 2 release. + 0x83 + 0x55 + + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter3 + Deck A Hi knob. + 0xB0 + 0x60 + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter2 + Deck A Mid knob. + 0xB0 + 0x61 + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter1 + Deck A Low knob. + 0xB0 + 0x62 + + + + + + [EqualizerRack1_[Channel1]_Effect1] + button_parameter3 + Deck A Hi KILL. + 0x90 + 0x60 + + + + + + [EqualizerRack1_[Channel1]_Effect1] + button_parameter2 + Deck A Mid KILL. + 0x90 + 0x61 + + + + + + [EqualizerRack1_[Channel1]_Effect1] + button_parameter1 + Deck A Low KILL. + 0x90 + 0x62 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter3 + Deck B Hi knob. + 0xB1 + 0x63 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter2 + Deck B Mid knob. + 0xB1 + 0x64 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter1 + Deck B Low knob. + 0xB1 + 0x65 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + button_parameter3 + Deck B Hi KILL. + 0x91 + 0x63 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + button_parameter2 + Deck B Mid KILL. + 0x91 + 0x64 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + button_parameter1 + Deck B Low KILL. + 0x91 + 0x65 + + + + + + [EqualizerRack1_[Channel3]_Effect1] + button_parameter3 + Deck C Hi knob. + 0x92 + 0x60 + + + + + + [EqualizerRack1_[Channel3]_Effect1] + button_parameter2 + Deck C Mid knob. + 0x92 + 0x61 + + + + + + [EqualizerRack1_[Channel3]_Effect1] + button_parameter1 + Deck C Low knob. + 0x92 + 0x62 + + + + + + [EqualizerRack1_[Channel3]_Effect1] + parameter3 + Deck C Hi KILL. + 0xB2 + 0x60 + + + + + + [EqualizerRack1_[Channel3]_Effect1] + parameter2 + Deck C Mid KILL. + 0xB2 + 0x61 + + + + + + [EqualizerRack1_[Channel3]_Effect1] + parameter1 + Deck C Low KILL. + 0xB2 + 0x62 + + + + + + [EqualizerRack1_[Channel4]_Effect1] + button_parameter3 + Deck D Hi knob. + 0x93 + 0x63 + + + + + + [EqualizerRack1_[Channel4]_Effect1] + button_parameter2 + Deck D Mid knob. + 0x93 + 0x64 + + + + + + [EqualizerRack1_[Channel4]_Effect1] + button_parameter1 + Deck D Low knob. + 0x93 + 0x65 + + + + + + [EqualizerRack1_[Channel4]_Effect1] + parameter3 + Deck D Hi KILL. + 0xB3 + 0x63 + + + + + + [EqualizerRack1_[Channel4]_Effect1] + parameter2 + Deck D Mid KILL. + 0xB3 + 0x64 + + + + + + [EqualizerRack1_[Channel4]_Effect1] + parameter1 + Deck D Low KILL. + 0xB3 + 0x65 + + + + + + + [Channel1] + pfl + Deck A PHONES button. + 0x90 + 0x6A + + + + + + [Channel2] + pfl + Deck B PHONES button. + 0x91 + 0x6B + + + + + + [Channel3] + pfl + Deck C PHONES button. + 0x92 + 0x6A + + + + + + [Channel4] + pfl + Deck D PHONES button. + 0x93 + 0x6B + + + + + + + [Channel1] + volume + Deck A Fader. + 0xB0 + 0x70 + + + + + + [Channel2] + volume + Deck B Fader. + 0xB1 + 0x71 + + + + + + [Channel3] + volume + Deck C Fader. + 0xB2 + 0x70 + + + + + + [Channel4] + volume + Deck D Fader. + 0xB3 + 0x71 + + + + + + + [Channel1] + rate + Deck A Pitch Slider. + 0xE0 + + + + + + [Channel2] + rate + Deck B Pitch Slider. + 0xE1 + + + + + + [Channel3] + rate + Deck C Pitch Slider. + 0xE2 + + + + + + [Channel4] + rate + Deck D Pitch Slider. + 0xE3 + + + + + + + [Master] + gain + Main knob. + 0xB0 + 0x2F + + + + + + [Master] + crossfader + Crossfader. + 0xB0 + 0x72 + + + + + + [Master] + headMix + PHONES MIX knob. + 0xB0 + 0x7A + + + + + + [Master] + headGain + PHONES VOLUME knob. + 0xB0 + 0x7B + + + + + + + + + + [Channel1] + slip_enabled + Deck A FX 1 button. + 0x90 + 0x10 + 0x01 + 0.1 + + + [Channel2] + slip_enabled + Deck B FX 1 button. + 0x91 + 0x30 + 0x01 + 0.1 + + + [Channel3] + slip_enabled + Deck C FX 1 button. + 0x92 + 0x10 + 0x01 + 0.1 + + + [Channel4] + slip_enabled + Deck D FX 1 button. + 0x93 + 0x30 + 0x01 + 0.1 + + + + [Channel1] + repeat + Deck A FX 4 button. + 0x90 + 0x11 + 0x01 + 0.1 + + + [Channel2] + repeat + Deck B FX 4 button. + 0x91 + 0x31 + 0x01 + 0.1 + + + [Channel3] + repeat + Deck C FX 4 button. + 0x92 + 0x11 + 0x01 + 0.1 + + + [Channel4] + repeat + Deck D FX 4 button. + 0x93 + 0x31 + 0x01 + 0.1 + + + + [Channel1] + quantize + Deck A FX 4 button. + 0x90 + 0x13 + 0x01 + 0.1 + + + [Channel2] + quantize + Deck B FX 4 button. + 0x91 + 0x33 + 0x01 + 0.1 + + + [Channel3] + quantize + Deck C FX 4 button. + 0x92 + 0x13 + 0x01 + 0.1 + + + [Channel4] + quantize + Deck D FX 4 button. + 0x93 + 0x33 + 0x01 + 0.1 + + + + [Channel1] + loop_start_position + Deck A loop start. + + 0x90 + 0x17 + 0x02 + 0x01 + 1e+09 + + + [Channel1] + loop_end_position + Deck A loop stop. + + 0x90 + 0x18 + 0x02 + 0x01 + 1e+09 + + + [Channel1] + loop_enabled + Deck A loop ON/OFF. + 0x90 + 0x19 + 0x01 + 0.1 + + + [Channel2] + loop_start_position + Deck B loop start. + Indicates loop position has been set. + 0x91 + 0x38 + 0x02 + 0x01 + 1e+09 + + + [Channel2] + loop_end_position + Deck B loop stop. + + 0x91 + 0x37 + 0x02 + 0x01 + 1e+09 + + + [Channel2] + loop_enabled + Deck B loop ON/OFF. + 0x91 + 0x39 + 0x01 + 0.1 + + + [Channel3] + loop_start_position + Deck C loop start. + + 0x92 + 0x17 + 0x02 + 0x01 + 1e+09 + + + [Channel3] + loop_end_position + Deck C loop stop. + Indicates loop position has been set. + 0x92 + 0x18 + 0x02 + 0x01 + 1e+09 + + + [Channel3] + loop_enabled + Deck C loop ON/OFF. + 0x92 + 0x19 + 0x01 + 0.1 + + + [Channel4] + loop_start_position + Deck D loop start. + Indicates loop position has been set. + 0x93 + 0x38 + 0x02 + 0x01 + 1e+09 + + + [Channel4] + loop_end_position + Deck D loop stop. + Indicates loop position has been set. + 0x93 + 0x37 + 0x02 + 0x01 + 1e+09 + + + [Channel4] + loop_enabled + Deck D loop ON/OFF. + 0x93 + 0x39 + 0x01 + 0.1 + + + + [Channel1] + keylock + Deck A LOCK button. + 0x90 + 0x1B + 0x01 + 0.1 + + + [Channel2] + keylock + Deck B LOCK button. + 0x91 + 0x3B + 0x01 + 0.1 + + + [Channel3] + keylock + Deck C LOCK button. + 0x92 + 0x1B + 0x01 + 0.1 + + + [Channel4] + keylock + Deck D LOCK button. + 0x93 + 0x3B + 0x01 + 0.1 + + + + [Channel1] + pitch + Deck A pitch-. + 0x90 + 0x20 + 0x02 + 0x01 + -0.01 + -10 + + + [Channel1] + pitch + Deck A pitch+. + 0x90 + 0x21 + 0x02 + 0x01 + 10 + 0.01 + + + [Channel2] + pitch + Deck B pitch-. + 0x91 + 0x41 + 0x02 + 0x01 + -0.01 + -10 + + + [Channel2] + pitch + Deck B pitch+. + 0x91 + 0x40 + 0x02 + 0x01 + 10 + 0.01 + + + [Channel3] + pitch + Deck C pitch-. + 0x92 + 0x20 + 0x02 + 0x01 + -0.01 + -10 + + + [Channel3] + pitch + Deck C pitch+. + 0x92 + 0x21 + 0x02 + 0x01 + 10 + 0.01 + + + [Channel4] + pitch + Deck D pitch-. + 0x93 + 0x41 + 0x02 + 0x01 + -0.01 + -10 + + + [Channel4] + pitch + Deck D pitch+. + 0x93 + 0x40 + 0x02 + 0x01 + 10 + 0.01 + + + + [Channel1] + hotcue_1_enabled + Deck A hotcue 1. + 0x90 + 0x22 + 0x01 + 0.1 + + + [Channel1] + hotcue_2_enabled + Deck A hotcue 2. + 0x90 + 0x23 + 0x01 + 0.1 + + + [Channel1] + hotcue_3_enabled + Deck A hotcue 3. + 0x90 + 0x24 + 0x01 + 0.1 + + + [Channel1] + hotcue_4_enabled + Deck A hotcue 4. + 0x90 + 0x25 + 0x01 + 0.1 + + + [Channel1] + hotcue_5_enabled + Deck A hotcue 5. + 0x90 + 0x26 + 0x01 + 0.1 + + + [Channel1] + hotcue_6_enabled + Deck A hotcue 6. + 0x90 + 0x27 + 0x01 + 0.1 + + + [Channel1] + hotcue_7_enabled + Deck A hotcue 7. + 0x90 + 0x28 + 0x01 + 0.1 + + + [Channel1] + hotcue_8_enabled + Deck A hotcue 8. + 0x90 + 0x29 + 0x01 + 0.1 + + + [Channel2] + hotcue_1_enabled + Deck B hotcue 1. + 0x91 + 0x42 + 0x01 + 0.1 + + + [Channel2] + hotcue_2_enabled + Deck B hotcue 2. + 0x91 + 0x43 + 0x01 + 0.1 + + + [Channel2] + hotcue_3_enabled + Deck B hotcue 3. + 0x91 + 0x44 + 0x01 + 0.1 + + + [Channel2] + hotcue_4_enabled + Deck B hotcue 4. + 0x91 + 0x45 + 0x01 + 0.1 + + + [Channel2] + hotcue_5_enabled + Deck B hotcue 5. + 0x91 + 0x46 + 0x01 + 0.1 + + + [Channel2] + hotcue_6_enabled + Deck B hotcue 6. + 0x91 + 0x47 + 0x01 + 0.1 + + + [Channel2] + hotcue_7_enabled + Deck B hotcue 7. + 0x91 + 0x48 + 0x01 + 0.1 + + + [Channel2] + hotcue_8_enabled + Deck B hotcue 8. + 0x91 + 0x49 + 0x01 + 0.1 + + + [Channel3] + hotcue_1_enabled + Deck C hotcue 1. + 0x92 + 0x22 + 0x01 + 0.1 + + + [Channel3] + hotcue_2_enabled + Deck C hotcue 2. + 0x92 + 0x23 + 0x01 + 0.1 + + + [Channel3] + hotcue_3_enabled + Deck C hotcue 3. + 0x92 + 0x24 + 0x01 + 0.1 + + + [Channel3] + hotcue_4_enabled + Deck C hotcue 4. + 0x92 + 0x25 + 0x01 + 0.1 + + + [Channel3] + hotcue_5_enabled + Deck C hotcue 5. + 0x92 + 0x26 + 0x01 + 0.1 + + + [Channel3] + hotcue_6_enabled + Deck C hotcue 6. + 0x92 + 0x27 + 0x01 + 0.1 + + + [Channel3] + hotcue_7_enabled + Deck C hotcue 7. + 0x92 + 0x28 + 0x01 + 0.1 + + + [Channel3] + hotcue_8_enabled + Deck C hotcue 8. + 0x92 + 0x29 + 0x01 + 0.1 + + + [Channel4] + hotcue_1_enabled + Deck D hotcue 1. + 0x93 + 0x42 + 0x01 + 0.1 + + + [Channel4] + hotcue_2_enabled + Deck D hotcue 2. + 0x93 + 0x43 + 0x01 + 0.1 + + + [Channel4] + hotcue_3_enabled + Deck D hotcue 3. + 0x93 + 0x44 + 0x01 + 0.1 + + + [Channel4] + hotcue_4_enabled + Deck D hotcue 4. + 0x93 + 0x45 + 0x01 + 0.1 + + + [Channel4] + hotcue_5_enabled + Deck D hotcue 5. + 0x93 + 0x46 + 0x01 + 0.1 + + + [Channel4] + hotcue_6_enabled + Deck D hotcue 6. + 0x93 + 0x47 + 0x01 + 0.1 + + + [Channel4] + hotcue_7_enabled + Deck D hotcue 7. + 0x93 + 0x48 + 0x01 + 0.1 + + + [Channel4] + hotcue_8_enabled + Deck D hotcue 8. + 0x93 + 0x49 + 0x01 + 0.1 + + + + [Channel1] + cue_indicator + Deck A CUE button. + 0x90 + 0x2B + 0x01 + 0.1 + + + [Channel2] + cue_indicator + Deck B CUE button. + 0x91 + 0x4B + 0x01 + 0.1 + + + [Channel3] + cue_indicator + Deck C CUE button. + 0x92 + 0x2B + 0x01 + 0.1 + + + [Channel4] + cue_indicator + Deck D CUE button. + 0x93 + 0x4B + 0x01 + 0.1 + + + + [Channel1] + play_indicator + Deck A PLAY button. + 0x90 + 0x2C + 0x01 + 0.1 + + + [Channel2] + play_indicator + Deck B PLAY button. + 0x91 + 0x4C + 0x01 + 0.1 + + + [Channel3] + play_indicator + Deck C PLAY button. + 0x92 + 0x2C + 0x01 + 0.1 + + + [Channel4] + play_indicator + Deck D PLAY button. + 0x93 + 0x4C + 0x01 + 0.1 + + + + [Channel1] + sync_enabled + Deck A Sync button. + 0x90 + 0x2D + 0x01 + 0.1 + + + [Channel2] + sync_enabled + Deck B Sync button. + 0x91 + 0x4D + 0x01 + 0.1 + + + [Channel3] + sync_enabled + Deck C Sync button. + 0x92 + 0x2D + 0x01 + 0.1 + + + [Channel4] + sync_enabled + Deck D Sync button. + 0x93 + 0x4D + 0x01 + 0.1 + + + + [Channel1] + duration + Deck A LOAD button. + 0x90 + 0x50 + 0x01 + 999999 + 1 + + + [Channel2] + duration + Deck B LOAD button. + 0x91 + 0x51 + 0x01 + 999999 + 1 + + + [Channel3] + duration + Deck C LOAD button. + 0x92 + 0x50 + 0x01 + 999999 + 1 + + + [Channel4] + duration + Deck D LOAD button. + 0x93 + 0x51 + 0x01 + 999999 + 1 + + + + [EffectRack1_EffectUnit1] + group_[Channel1]_enable + Deck A FX Assign 1. + 0x90 + 0x52 + 0x01 + 0.1 + + + [EffectRack1_EffectUnit2] + group_[Channel1]_enable + Deck A FX Assign 2. + 0x90 + 0x53 + 0x01 + 0.1 + + + [EffectRack1_EffectUnit3] + group_[Channel2]_enable + Deck B FX Assign 1. + 0x91 + 0x54 + 0x01 + 0.1 + + + [EffectRack1_EffectUnit4] + group_[Channel2]_enable + Deck B FX Assign 2. + 0x91 + 0x55 + 0x01 + 0.1 + + + [EffectRack1_EffectUnit1] + group_[Channel3]_enable + Deck C FX Assign 1. + 0x92 + 0x52 + 0x01 + 0.1 + + + [EffectRack1_EffectUnit2] + group_[Channel3]_enable + Deck C FX Assign 2. + 0x92 + 0x53 + 0x01 + 0.1 + + + [EffectRack1_EffectUnit3] + group_[Channel4]_enable + Deck D FX Assign 1. + 0x93 + 0x54 + 0x01 + 0.1 + + + [EffectRack1_EffectUnit4] + group_[Channel4]_enable + Deck D FX Assign 2. + 0x93 + 0x55 + 0x01 + 0.1 + + + + [EqualizerRack1_[Channel1]_Effect1] + button_parameter3 + Deck A Hi KILL. + 0x90 + 0x60 + 0x01 + 0.1 + + + [EqualizerRack1_[Channel1]_Effect1] + button_parameter2 + Deck A Mid KILL. + 0x90 + 0x61 + 0x01 + 0.1 + + + [EqualizerRack1_[Channel1]_Effect1] + button_parameter1 + Deck A Low KILL. + 0x90 + 0x62 + 0x01 + 0.1 + + + [EqualizerRack1_[Channel2]_Effect1] + button_parameter3 + Deck B Hi KILL. + 0x91 + 0x63 + 0x01 + 0.1 + + + [EqualizerRack1_[Channel2]_Effect1] + button_parameter2 + Deck B Mid KILL. + 0x91 + 0x64 + 0x01 + 0.1 + + + [EqualizerRack1_[Channel2]_Effect1] + button_parameter1 + Deck B Low KILL. + 0x91 + 0x65 + 0x01 + 0.1 + + + [EqualizerRack1_[Channel3]_Effect1] + button_parameter3 + Deck C Hi KILL. + 0x92 + 0x60 + 0x01 + 0.1 + + + [EqualizerRack1_[Channel3]_Effect1] + button_parameter2 + Deck C Mid KILL. + 0x92 + 0x61 + 0x01 + 0.1 + + + [EqualizerRack1_[Channel3]_Effect1] + button_parameter1 + Deck C Low KILL. + 0x92 + 0x62 + 0x01 + 0.1 + + + [EqualizerRack1_[Channel4]_Effect1] + button_parameter3 + Deck D Hi KILL. + 0x93 + 0x63 + 0x01 + 0.1 + + + [EqualizerRack1_[Channel4]_Effect1] + button_parameter2 + Deck D Mid KILL. + 0x93 + 0x64 + 0x01 + 0.1 + + + [EqualizerRack1_[Channel4]_Effect1] + button_parameter1 + Deck D Low KILL. + 0x93 + 0x65 + 0x01 + 0.1 + + + + [Channel1] + pfl + Deck A PHONES button. + 0x90 + 0x6A + 0x01 + 0.1 + + + [Channel2] + pfl + Deck B PHONES button. + 0x91 + 0x6B + 0x01 + 0.1 + + + [Channel3] + pfl + Deck C PHONES button. + 0x92 + 0x6A + 0x01 + 0.1 + + + [Channel4] + pfl + Deck D PHONES button. + 0x93 + 0x6B + 0x01 + 0.1 + + + + diff --git a/res/controllers/Behringer-CMDStudio4a-scripts.js b/res/controllers/Behringer-CMDStudio4a-scripts.js new file mode 100644 index 000000000000..1b01cd549537 --- /dev/null +++ b/res/controllers/Behringer-CMDStudio4a-scripts.js @@ -0,0 +1,274 @@ +// **************************************************************************** +// * Mixxx mapping script file for the Behringer CMD Studio 4a. +// * Author: Craig Easton +// * Version 1.4 (Jan 2016) +// * Forum: http://www.mixxx.org/forums/viewtopic.php?f=7&t=7868 +// * Wiki: http://www.mixxx.org/wiki/doku.php/behringer_cmd_studio_4a +// **************************************************************************** + +//////////////////////////////////////////////////////////////////////// +// JSHint configuration // +//////////////////////////////////////////////////////////////////////// +/* global engine */ +/* global script */ +/* global print */ +/* global midi */ +//////////////////////////////////////////////////////////////////////// + +// Master function definition. +function BehringerCMDStudio4a() {} + + +// ***************************** Global Vars ********************************** + +// Shift/mode state variables. +BehringerCMDStudio4a.delButtonState = [false,false,false,false]; +BehringerCMDStudio4a.scratchButtonState = [false,false,false,false]; + +// Button push/release state variables. +BehringerCMDStudio4a.pitchPushed = [[false,false,false,false], [false,false,false,false]]; +BehringerCMDStudio4a.delPushed = false; +BehringerCMDStudio4a.delShiftUsed = false; +BehringerCMDStudio4a.fxAssignPushed = false; +BehringerCMDStudio4a.fxAssignShiftUsed = false; +BehringerCMDStudio4a.fxAssignLastGroup = ""; + +// ************************ Initialisation stuff. ***************************** + +BehringerCMDStudio4a.vuMeterUpdate = function (value, group, control){ + value = (value*15)+48; + switch(control) { + case "VuMeterL": + midi.sendShortMsg(0xB0, 0x7E, value); + break; + case "VuMeterR": + midi.sendShortMsg(0xB0, 0x7F, value); + break; + } +} + +BehringerCMDStudio4a.initLEDs = function () { + // (re)Initialise any LEDs that are direcctly controlled by this script. + // DEL buttons (one for each virtual deck). + midi.sendShortMsg(0x90, 0x2A, 0x00); + midi.sendShortMsg(0x91, 0x4A, 0x00); + midi.sendShortMsg(0x92, 0x2A, 0x00); + midi.sendShortMsg(0x93, 0x4A, 0x00); + // Scratch buttons (one for each virtual deck). + midi.sendShortMsg(0x90, 0x16, 0x00); + midi.sendShortMsg(0x91, 0x36, 0x00); + midi.sendShortMsg(0x92, 0x16, 0x00); + midi.sendShortMsg(0x93, 0x36, 0x00); +} + +BehringerCMDStudio4a.init = function () { + // Initialise anything that might not be in the correct state. + BehringerCMDStudio4a.initLEDs(); + // Connect the VUMeters + engine.connectControl("[Master]","VuMeterL","BehringerCMDStudio4a.vuMeterUpdate"); + engine.connectControl("[Master]","VuMeterR","BehringerCMDStudio4a.vuMeterUpdate"); +} + +BehringerCMDStudio4a.shutdown = function() { + // Leave the deck in a properly initialised state. + BehringerCMDStudio4a.initLEDs(); + + // Disconnect the VUMeters. +// Maybe not! It seems you don't have to do this even though the connection +// in done in init(), in fact if you try it throws an error. +// engine.connectControl("[Master]","VuMeterL","BehringerCMDStudio4a.vuMeterUpdate",true); +// engine.connectControl("[Master]","VuMeterR","BehringerCMDStudio4a.vuMeterUpdate",true); +} + + +// *************************** Control Stuff. ********************************* +// The code below is primarily "shift/mode" key functionality as there is no +// native support for this in Mixxx at the moment. +// I suspect that the vast majority of controller mappings could be completed +// with little or no scripting if Mixxx supported shift/mode buttons in the +// XML (together with standard wheel/scratching functionality). + +// Function to deal with the DEL "shift/mode" buttons. +BehringerCMDStudio4a.del = function (channel, control, value, status, group) { + if (value == 127) { + // Button pushed. + BehringerCMDStudio4a.delPushed = true; + BehringerCMDStudio4a.delShiftUsed = false; + } else { + // Button released. + BehringerCMDStudio4a.delPushed = false; + // Only toggle the DEL-mode if the "shift" function wasn't used. + if (!BehringerCMDStudio4a.delShiftUsed) { + BehringerCMDStudio4a.delButtonState[channel] = !BehringerCMDStudio4a.delButtonState[channel]; + midi.sendShortMsg(0x90 + channel, control, BehringerCMDStudio4a.delButtonState[channel] ? 0x01 : 0x00); + } + } +} + +// Function to deal with the play buttons, (because they have a DEL-mode behaviour). +BehringerCMDStudio4a.play = function (channel, control, value, status, group) { + if (BehringerCMDStudio4a.delButtonState[channel]) { + // DEL-mode is active, do reverse-roll (slip). + engine.setValue(group, "reverseroll", (value == 127) ? 1 : 0); + } else { + // DEL-mode is not active, just toggle play (on push only). + if (value == 127) { + script.toggleControl(group,"play"); + } + } +} + +// Function to deal with the cue buttons, (because they have a DEL-mode behaviour). +BehringerCMDStudio4a.cue = function (channel, control, value, status, group) { + if (BehringerCMDStudio4a.delButtonState[channel]) { + // DEL-mode is active, do reverse play. + engine.setValue(group, "reverse", (value == 127) ? 1 : 0); + } else { + // DEL-mode is not active so just cue. + engine.setValue(group, "cue_default", (value == 127) ? 1 : 0); + } +} + +// Function to deal with the scratch mode buttons. +BehringerCMDStudio4a.scratch = function (channel, control, value, status, group) { + BehringerCMDStudio4a.scratchButtonState[channel] = !BehringerCMDStudio4a.scratchButtonState[channel]; + midi.sendShortMsg(status, control, BehringerCMDStudio4a.scratchButtonState[channel] ? 0x01 : 0x00); +} + +// Function to deal with the FX Assign buttons, (becasue they also act as "shift" buttons). +BehringerCMDStudio4a.fxAssign = function (channel, control, value, status, group) { + // FX Assign buttons start at 0x52. + var fxAssignButton = (control - 0x52) & 1; // Either 0 or 1 depending on button (1 or 2). + if (value == 127) { + // Button pushed. + BehringerCMDStudio4a.fxAssignPushed = true; + BehringerCMDStudio4a.fxAssignShiftUsed = false; + BehringerCMDStudio4a.fxAssignLastGroup = group; + } + else + { + // Button released. + BehringerCMDStudio4a.fxAssignPushed = false; + // Only toggle the effect on release if the "shift" function wasn't used. + if (!BehringerCMDStudio4a.fxAssignShiftUsed) { + script.toggleControl(group,"group_[Channel"+(channel+1)+"]_enable"); + } + } +} + +// Function to deal with the browse left/right buttons, (becasue they have an "FX Assign mode" behaviour). +BehringerCMDStudio4a.browseLR = function (channel, control, value, status, group) { + if (BehringerCMDStudio4a.fxAssignPushed) { + BehringerCMDStudio4a.fxAssignShiftUsed = true; + if (control == 0x2) { + // Left. + engine.setValue(BehringerCMDStudio4a.fxAssignLastGroup,"prev_chain", 1); + } else { + // Right. + engine.setValue(BehringerCMDStudio4a.fxAssignLastGroup,"next_chain", 1); + } + } else { + if (control == 0x2) { + // Left. + engine.setValue(group, "SelectPrevPlaylist",1) + } else { + // Right. + engine.setValue(group, "SelectNextPlaylist",1) + } + } +} + +// Functions to deal with the hot-cue buttons, (because they have a DEL-mode behaviour). +BehringerCMDStudio4a.hotcue = function (channel, control, value, status, group) { + // Translate the button to the actual hotcue. + var hotcue = control-0x21; // Hotcue buttons on left deck go from 0x22 to 0x29 + if (hotcue>8) { + // Right deck, buttons are 0x20 higher so we need to compensate. + hotcue = hotcue-0x20; + } + if (BehringerCMDStudio4a.delPushed) { + // DEL button is being held so delete the hotcue. + engine.setValue(group, "hotcue_"+hotcue+"_clear", 1); + BehringerCMDStudio4a.delShiftUsed = true; + } else { + // DEL button is not being held down. + if (BehringerCMDStudio4a.delButtonState[channel]) { + // DEL-mode is active, lets do auto-loops. + engine.setValue(group, "beatloop_"+(1/8)*Math.pow(2,hotcue-1)+"_toggle", 1); + if (value == 0) { + // Button is being released. Disable then re-enable slip if it + // is active. This "re-syncs" the playback after every + // auto-loop in slip-mode which is a nice effect and probably + // what you want most of the time if slip is on. + if (engine.getValue(group, "slip_enabled") == 1) { + engine.setValue(group, "slip_enabled", 0); + // It seems we can't just flip a param off and on in the + // same call! Since we've just turned slip off, I can't now + // turn it on directly here, the only work-around I could + // think of was to create a (very short) timed call-back + // to turn it off! + // Raised bug about this: + // https://bugs.launchpad.net/mixxx/+bug/1538200 + // Changed timer from 50 to 100 after the pathology of this + // bug was explined in the bug report. + engine.beginTimer(100, function() { engine.setValue(group, "slip_enabled", 1); }, 1); + } + } + } else { + // DEL-mode is not active so do the set/jump-to hotcue function as normal. + engine.setValue(group, "hotcue_"+hotcue+"_activate", (value == 127) ? 1 : 0); + } + } +} + +// Functions to deal with the pitch inc/dec buttons, (because they have a DEL-mode behaviour). +BehringerCMDStudio4a.pitch = function (channel, control, value, status, group) { + // Work out the direction. + var direction = ((control & 0x01) == 0) ? "down" : "up"; + // Work out the type (and join) by looking at the DEL button state. + var type = BehringerCMDStudio4a.delButtonState[channel] ? "pitch" : "rate"; + var join = BehringerCMDStudio4a.delButtonState[channel] ? "" : "_perm"; + // Pushed or released? + if (value == 127) { + // Button pushed. + BehringerCMDStudio4a.pitchPushed[control & 0x01][channel] = true; + // Is the other button pushed too? + if (BehringerCMDStudio4a.pitchPushed[(~control) & 0x01][channel]) { + engine.setValue(group, type, 0); // Yep! reset the control. + } else { + engine.setValue(group, type+join+"_"+direction, 1); + } + } else { + // Button released. + BehringerCMDStudio4a.pitchPushed[control & 0x01][channel] = false; + engine.setValue(group, "rate_perm_"+direction, 0); // Keeps the UI in sync with the button state. + } +} + +// Functions to deal with the wheel (i.e. scratcing and jog). +// Why is there no (XML) support in Mixxx for this most basic of functions? +// I suspect the vast majority of controller mappings use the same code +// (provided in the Wiki). +BehringerCMDStudio4a.wheelTouch = function (channel, control, value, status, group) { + channel = channel+1; + if (value > 0) { + // We're touching the wheel. + var alpha = 1.0/8; + var beta = alpha/32; + engine.scratchEnable(channel, 600, 33+1/3, alpha, beta); + } else { + // We've released the wheel. + engine.scratchDisable(channel); + } +}; +BehringerCMDStudio4a.wheelTurn = function (channel, control, value, status, group) { + var deck = channel+1; + var newValue = value-64; + if (BehringerCMDStudio4a.scratchButtonState[channel]){ + if (engine.isScratching(deck)){ + engine.scratchTick(deck,newValue); // Scratch! + } + } else { + engine.setValue(group, "jog", newValue); // Jog. + } +};