diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index 5a09d2b8762c..26ac4ffadcf5 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -51,7 +51,8 @@ DJCi300.kScratchActionBend = 3; DJCi300.vuMeterUpdateMaster = function(value, group, control) { value = (value * 122) + 5; - midi.sendShortMsg(0xB0, control, value); + midi.sendShortMsg(0xB0, 0x40, value); + midi.sendShortMsg(0xB0, 0x41, value); }; DJCi300.vuMeterUpdateDeck = function(value, group, _control, _status) { @@ -81,7 +82,7 @@ DJCi300.init = function() { engine.softTakeover("[Channel2]", "rate", true); engine.softTakeoverIgnoreNextValue("[Channel1]", "rate"); engine.softTakeoverIgnoreNextValue("[Channel2]", "rate"); - + // Connect the VUMeters engine.connectControl("[Channel1]", "VuMeter", "DJCi300.vuMeterUpdateDeck"); engine.getValue("[Channel1]", "VuMeter", "DJCi300.vuMeterUpdateDeck"); @@ -156,7 +157,20 @@ DJCi300.wheelTouchShift = function(channel, control, value, _status, _group) { }; // Scratching on the jog wheel (rotating it while pressing the top surface) -DJCi300._scratchWheelImpl = function(deck, value) { +DJCi300.scratchWheel = function(channel, control, value, status, _group) { + var deck; + switch (status) { + case 0xB1: + case 0xB4: + deck = 1; + break; + case 0xB2: + case 0xB5: + deck = 2; + break; + default: + return; + } var interval = DJCi300._convertWheelRotation(value); var scratchAction = DJCi300.scratchAction[deck]; if (scratchAction === DJCi300.kScratchActionScratch) { @@ -166,32 +180,16 @@ DJCi300._scratchWheelImpl = function(deck, value) { interval * DJCi300.scratchScale * DJCi300.scratchShiftMultiplier); } else { - DJCi300._bendWheelImpl(deck, value); + engine.setValue( + "[Channel" + deck + "]", "jog", interval * DJCi300.bendScale); } }; -// Scratching on the jog wheel (rotating it while pressing the top surface) -DJCi300.scratchWheel = function(channel, control, value, _status, _group) { - var deck = channel; - DJCi300._scratchWheelImpl(deck, value); -}; - -// Seeking on the jog wheel (rotating it while pressing the top surface and holding Shift) -DJCi300.scratchWheelShift = function(channel, control, value, _status, _group) { - var deck = channel - 3; - DJCi300._scratchWheelImpl(deck, value); -}; - -DJCi300._bendWheelImpl = function(deck, value) { - var interval = DJCi300._convertWheelRotation(value); - engine.setValue("[Channel" + deck + "]", "jog", - interval * DJCi300.bendScale); -}; - // Bending on the jog wheel (rotating using the edge) DJCi300.bendWheel = function(channel, control, value, _status, _group) { - var deck = channel; - DJCi300._bendWheelImpl(deck, value); + var interval = DJCi300._convertWheelRotation(value); + engine.setValue( + "[Channel" + channel + "]", "jog", interval * DJCi300.bendScale); }; DJCi300.shutdown = function() { diff --git a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml index 4d2c04750541..d43df23ad9de 100644 --- a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml +++ b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml @@ -4,7 +4,7 @@ Hercules DJControl Inpulse 300 DJ Phatso for Hercules Technical Support MIDI Preset for Hercules DJControl Inpulse 300 - https://www.mixxx.org/wiki/doku.php/hercules_djcontrol_inpulse_300 + https://www.mixxx.org/wiki/doku.php/hercules_djcontrol_inpulse_300 https://www.mixxx.org/forums/viewtopic.php?f=7&t=12599 @@ -17,7 +17,7 @@ - + [Library] MoveFocus @@ -29,7 +29,7 @@ - + [AutoDJ] enabled @@ -41,7 +41,7 @@ - + [Channel1] play @@ -52,7 +52,7 @@ - + [Channel1] cue_default @@ -63,7 +63,7 @@ - + [Channel1] sync_enabled @@ -74,7 +74,7 @@ - + [Channel1] pfl @@ -85,7 +85,7 @@ - + [Channel1] LoadSelectedTrack @@ -96,7 +96,7 @@ - + [Channel1] slip_enabled @@ -107,7 +107,7 @@ - + [Channel1] keylock @@ -118,8 +118,8 @@ - - + + [Channel1] DJCi300.vinylButton @@ -130,8 +130,8 @@ - - + + [Channel1] DJCi300.wheelTouch @@ -142,8 +142,8 @@ - - + + [Channel1] beatloop_4_activate @@ -164,8 +164,8 @@ - - + + [EffectRack1_EffectUnit1_Effect3] enabled @@ -179,7 +179,7 @@ - + [Channel2] play @@ -190,7 +190,7 @@ - + [Channel2] cue_default @@ -201,7 +201,7 @@ - + [Channel2] sync_enabled @@ -212,7 +212,7 @@ - + [Channel2] pfl @@ -223,7 +223,7 @@ - + [Channel2] LoadSelectedTrack @@ -234,7 +234,7 @@ - + [Channel2] slip_enabled @@ -245,7 +245,7 @@ - + [Channel2] keylock @@ -256,7 +256,7 @@ - + [Channel2] DJCi300.vinylButton @@ -267,7 +267,7 @@ - + [Channel2] DJCi300.wheelTouch @@ -278,7 +278,7 @@ - + [Channel2] beatloop_4_activate @@ -299,7 +299,7 @@ - + [EffectRack1_EffectUnit2_Effect3] @@ -314,7 +314,7 @@ - + [Master] maximize_library @@ -327,7 +327,7 @@ - + [Channel1] DJCi300.wheelTouchShift @@ -339,7 +339,7 @@ - + [Channel1] play_stutter @@ -350,7 +350,7 @@ - + [Channel1] start_play @@ -361,7 +361,7 @@ - + [Channel1] sync_master @@ -372,7 +372,7 @@ - + [Channel1] loop_halve @@ -393,7 +393,7 @@ - + [EffectRack1_EffectUnit1_Effect3] next_effect @@ -406,7 +406,7 @@ - + [Channel2] DJCi300.wheelTouchShift @@ -429,7 +429,7 @@ - + [Channel2] start_play @@ -440,7 +440,7 @@ - + [Channel2] sync_master @@ -451,7 +451,7 @@ - + [Channel2] loop_halve @@ -472,7 +472,7 @@ - + [EffectRack1_EffectUnit2_Effect3] next_effect @@ -486,7 +486,7 @@ - + [Channel1] hotcue_1_activate @@ -567,7 +567,7 @@ - + [Channel1] hotcue_1_clear @@ -648,7 +648,7 @@ - + [Channel1] beatlooproll_0.125_activate @@ -729,7 +729,7 @@ - + [Sampler1] cue_gotoandplay @@ -810,13 +810,13 @@ - + - + - + - + [Channel1] beatjump_1_backward @@ -901,7 +901,7 @@ - + [Channel2] hotcue_1_activate @@ -982,7 +982,7 @@ - + [Channel2] hotcue_1_clear @@ -1063,7 +1063,7 @@ - + [Channel2] beatlooproll_0.125_activate @@ -1144,7 +1144,7 @@ - + [Sampler1] cue_gotoandplay @@ -1225,13 +1225,13 @@ - + - + - + - + [Channel2] beatjump_1_backward @@ -1312,11 +1312,11 @@ - + - + [Master] crossfader @@ -1327,7 +1327,7 @@ - + [Library] MoveVertical @@ -1341,7 +1341,7 @@ - + [Channel1] volume @@ -1352,7 +1352,7 @@ - + [EqualizerRack1_[Channel1]_Effect1] parameter1 @@ -1383,7 +1383,7 @@ - + [Channel1] pregain @@ -1394,7 +1394,7 @@ - + [QuickEffectRack1_[Channel1]] super1 @@ -1405,7 +1405,7 @@ - + [Channel1] rate @@ -1424,7 +1424,7 @@ - + [Channel1] DJCi300.scratchWheel @@ -1455,8 +1455,7 @@ - - + [EffectRack1_EffectUnit1_Effect3] meta @@ -1481,7 +1480,7 @@ - + [Channel2] volume @@ -1492,7 +1491,7 @@ - + [EqualizerRack1_[Channel2]_Effect1] parameter1 @@ -1523,7 +1522,7 @@ - + [Channel2] pregain @@ -1534,7 +1533,7 @@ - + [QuickEffectRack1_[Channel2]] super1 @@ -1545,7 +1544,7 @@ - + [Channel2] rate @@ -1564,7 +1563,7 @@ - + [Channel2] DJCi300.scratchWheel @@ -1595,7 +1594,7 @@ - + [EffectRack1_EffectUnit2_Effect3] @@ -1619,10 +1618,10 @@ - + [Channel1] - DJCi300.scratchWheelShift + DJCi300.scratchWheel SHIFT + Scratch Deck A (Jog-Wheel) 0xB4 0x0A @@ -1632,10 +1631,10 @@ - + [Channel2] - DJCi300.scratchWheelShift + DJCi300.scratchWheel SHIFT + Scratch Deck B (Jog-Wheel) 0xB5 0x0A @@ -1647,7 +1646,7 @@ - + [Channel1] play_indicator @@ -1791,7 +1790,7 @@ 0x7f 0x0 - + [Channel1] beatloop_4_enabled @@ -1814,7 +1813,7 @@ 0x7f 0x00 - + [Channel1] pfl @@ -1837,7 +1836,7 @@ 0x7f 0x0 - + [Library] MoveFocus @@ -1860,7 +1859,7 @@ 0x07 0x05 - + [AutoDJ] enabled @@ -1872,7 +1871,7 @@ 0x7f 0x0 - + [EffectRack1_EffectUnit1_Effect3] enabled @@ -1895,7 +1894,7 @@ 0x7f 0x0 - + [Channel1] end_of_track @@ -1940,7 +1939,7 @@ 0x7f 0x0 - + [Channel1] hotcue_1_enabled @@ -2085,7 +2084,7 @@ 0x7E 0.5 - + [Channel1] hotcue_1_enabled @@ -2230,7 +2229,7 @@ 0x7E 0.5 - + [Channel1] beatlooproll_0.125_activate @@ -2375,7 +2374,7 @@ 0x7F 0.5 - + [Sampler1] play_indicator @@ -2520,7 +2519,7 @@ 0x7F 0.5 - + [Channel1] beatjump_1_backward