From ee3dcb2b1d379d2ef35ac642db5e30ffb740e411 Mon Sep 17 00:00:00 2001 From: DJPhatso Date: Fri, 24 Jan 2020 09:06:58 -0500 Subject: [PATCH 01/30] mapping files for Hercules DJControl Inpulse 300 --- .../Hercules-DJControl-Inpulse-300-script.js | 278 ++ .../Hercules_DJControl_Inpulse_300.midi.xml | 2684 +++++++++++++++++ 2 files changed, 2962 insertions(+) create mode 100644 res/controllers/Hercules-DJControl-Inpulse-300-script.js create mode 100644 res/controllers/Hercules_DJControl_Inpulse_300.midi.xml diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js new file mode 100644 index 000000000000..b7ed94ba27f4 --- /dev/null +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -0,0 +1,278 @@ +//////////////////////////////////////////////////////////////////////// +// JSHint configuration // +//////////////////////////////////////////////////////////////////////// +/* global engine */ +/* global script */ +/* global print */ +/* global midi */ +//////////////////////////////////////////////////////////////////////// + +var DJCi300 = {}; +/////////////////////////////////////////////////////////////// +// USER OPTIONS // +/////////////////////////////////////////////////////////////// + +// How fast scratching is. +DJCi300.scratchScale = 1.0; + +// How much faster seeking (shift+scratch) is than scratching. +DJCi300.scratchShiftMultiplier = 4; + +// How fast bending is. +DJCi300.bendScale = 1.0; + +// DJControl_Inpulse_300_script.js +// +// *************************************************************************** +// * Mixxx mapping script file for the Hercules DJControl Inpulse 300. +// * Author: DJ Phatso, contributions by Kerrick Staley +// * Version 1.2 (December 2019) +// * Forum: https://www.mixxx.org/forums/viewtopic.php?f=7&t=12599 +// * Wiki: https://mixxx.org/wiki/doku.php/hercules_djcontrol_inpulse_300 +// +// Changes to v1.2 +// - Code cleanup. +// +// Changes to v1.1 +// - Fix seek-to-start and cue-master behavior. +// - Tweak scratch, seek, and bend behavior. +// - Controller knob/slider values are queried on startup, so MIXXX is synced. +// - Fixed vinyl button behavior the first time it's pressed. +// +// v1.0 : Original forum release +// +// TODO: Functions that could be implemented to the script: +// +// * ROLL: Keep SLIP active (if already enabled) when exiting from rolls +// +// * SLICER/SLICER LOOP: Potentially use and adapt the script of the Pioneer DDJ SX: +// https://www.mixxx.org/wiki/doku.php/pioneer_ddj-sx#slicer_description +// +// * TONEPLAY +// +// * FX: +// - Potentially use 1 FX rack for FX pads and another for the Controlled FX +// - See how to preselect effects for a rack +// * Fix behavior when adjusting tempo slider after pressing [Sync] (tempo adjustment should be relative, not absolute). +// +// **************************************************************************** +// +// We have to disable the no-unused-vars check because we have many MIDI +// callbacks that receive a fixed list of arguments, but we usually don't use +// most of these arguments. Eslint seems to make it relatively difficult to +// disable this check on a case-by-case basis, so we disable it for the whole +// file. +// See this GitHub issue for more context: +// https://github.com/eslint/eslint/issues/1939 +// *eslint-disable no-unused-vars*/ + +DJCi300.kScratchActionNone = 0; +DJCi300.kScratchActionScratch = 1; +DJCi300.kScratchActionSeek = 2; +DJCi300.kScratchActionBend = 3; + +//function DJCi300() {} + + +DJCi300.vuMeterUpdate = function (value, group, control) { + value = (value * 127) + 5; + switch (control) { + case "VuMeterL": + midi.sendShortMsg(0xB0, 0x40, value); + break; + case "VuMeterR": + midi.sendShortMsg(0xB0, 0x41, value); + break; + } +}; + +DJCi300.vuMeterUpdateDA = function (value, group, control) { + value = (value * 127) + 5; + switch (control) { + case "[Channel1]", "VuMeter": + midi.sendShortMsg(0xB1, 0x40, value); + break; + } +}; + +DJCi300.vuMeterUpdateDB = function(value, group, control) { + value = (value * 127) + 5; + switch (control) { + case "[Channel2]", "VuMeter": + midi.sendShortMsg(0xB2, 0x40, value); + break; + } +}; + + + + +DJCi300.init = function() { +DJCi300.scratchButtonState = true; + DJCi300.scratchAction = { + 1: DJCi300.kScratchActionNone, + 2: DJCi300.kScratchActionNone}; + + + // Turn On Vinyl buttons LED(one for each deck). + midi.sendShortMsg(0x91, 0x03, 0x7F); + midi.sendShortMsg(0x92, 0x03, 0x7F); + + //Turn On Browser button LED + midi.sendShortMsg(0x90, 0x05, 0x10); + + + + // Connect the VUMeters + engine.connectControl("[Channel1]", "VuMeter", "DJCi300.vuMeterUpdateDA"); + engine.connectControl("[Channel2]", "VuMeter", "DJCi300.vuMeterUpdateDB"); + engine.connectControl("[Master]", "VuMeterL", "DJCi300.vuMeterUpdate"); + engine.connectControl("[Master]", "VuMeterR", "DJCi300.vuMeterUpdate"); + + // Connect the Browser LEDs + engine.getValue("[Library]", "MoveFocus"); + engine.getValue("[Master]", "maximize_library"); + + + // Ask the controller to send all current knob/slider values over MIDI, which will update + // the corresponding GUI controls in MIXXX. + midi.sendShortMsg(0xB0, 0x7F, 0x7F); +}; + + +// The Vinyl button, used to enable or disable scratching on the jog wheels (One per deck). + +DJCi300.vinylButtonDA = function(channel, control, value, status, group) { + if (value) { + if (DJCi300.scratchButtonState) { + DJCi300.scratchButtonState = false; + midi.sendShortMsg(0x91, 0x03, 0x00); + + } else { + DJCi300.scratchButtonState = true; + midi.sendShortMsg(0x91, 0x03, 0x7F); + + } + } +}; + +DJCi300.vinylButtonDB = function(channel, control, value, status, group) { + if (value) { + if (DJCi300.scratchButtonState) { + DJCi300.scratchButtonState = false; + midi.sendShortMsg(0x92, 0x03, 0x00); + + } else { + DJCi300.scratchButtonState = true; + midi.sendShortMsg(0x92, 0x03, 0x7F); + + } + } +}; + + + +DJCi300._scratchEnable = function(deck) { + var alpha = 1.0/8; + var beta = alpha/32; + engine.scratchEnable(deck, 248, 33 + 1/3, alpha, beta); +}; + + + +DJCi300._convertWheelRotation = function (value) { + // When you rotate the jogwheel, the controller always sends either 0x1 + // (clockwise) or 0x7F (counter clockwise). 0x1 should map to 1, 0x7F + // should map to -1 (IOW it's 7-bit signed). + return value < 0x40 ? 1 : -1; +}; + + +// The touch action on the jog wheel's top surface +DJCi300.wheelTouch = function (channel, control, value, status, group) { + var deck = channel; + if (value > 0) { + // Touching the wheel. + if (engine.getValue("[Channel" + deck + "]", "play") !== 1 || DJCi300.scratchButtonState) { + DJCi300._scratchEnable(deck); + DJCi300.scratchAction[deck] = DJCi300.kScratchActionScratch; + } else { + DJCi300.scratchAction[deck] = DJCi300.kScratchActionBend; + } + } else { + // Released the wheel. + engine.scratchDisable(deck); + DJCi300.scratchAction[deck] = DJCi300.kScratchActionNone; + } +}; + + +// The touch action on the jog wheel's top surface while holding shift +DJCi300.wheelTouchShift = function(channel, control, value, status, group) { + var deck = channel - 3; + // We always enable scratching regardless of button state. + if (value > 0) { + DJCi300._scratchEnable(deck); + DJCi300.scratchAction[deck] = DJCi300.kScratchActionSeek; + + } else { + // Released the wheel. + engine.scratchDisable(deck); + DJCi300.scratchAction[deck] = DJCi300.kScratchActionNone; + } +}; + + +// Scratching on the jog wheel (rotating it while pressing the top surface) +DJCi300._scratchWheelImpl = function(deck, value) { + var interval = DJCi300._convertWheelRotation(value); + var scratchAction = DJCi300.scratchAction[deck]; + + + + if (scratchAction === DJCi300.kScratchActionScratch) { + engine.scratchTick(deck, interval * DJCi300.scratchScale); + } else if (scratchAction === DJCi300.kScratchActionSeek) { + engine.scratchTick(deck, + interval * DJCi300.scratchScale * + DJCi300.scratchShiftMultiplier); + } else { + DJCi300._bendWheelImpl(deck, value); + + } +}; + +// 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); +}; + +DJCi300.scratchPad = function (channel, control, value, status, group) { + var deck = channel; + DJCi300._scratchWheelImpl(deck, value); +}; + + +DJCi300.shutdown = function() { + midi.sendShortMsg(0xB0, 0x7F, 0x00); +}; \ No newline at end of file diff --git a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml new file mode 100644 index 000000000000..4627e57f4c6b --- /dev/null +++ b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml @@ -0,0 +1,2684 @@ + + + + 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/forums/viewtopic.php?f=7&t=12599 + + + + + + + + + + + + //Browser section (Encoder button) + + [Library] + MoveFocus + Browser button + 0x90 + 0x00 + + + + + + //Assistant + + [AutoDJ] + enabled + AutoDJ On/Off + 0x90 + 0x03 + + + + + + //Play + + [Channel1] + play + Play button + 0x91 + 0x07 + + + + + //CUE + + [Channel1] + cue_default + Cue button + 0x91 + 0x06 + + + + + //Sync + + [Channel1] + sync_enabled + Sync button + 0x91 + 0x05 + + + + + // PFL + + [Channel1] + pfl + PFL button + 0x91 + 0x0C + + + + + //LOAD A + + [Channel1] + LoadSelectedTrack + LOAD A button + 0x91 + 0x0D + + + + + //SLIP A + + [Channel1] + slip_enabled + SLIP button + 0x91 + 0x01 + + + + + //Q A + + [Channel1] + keylock + Q button + 0x91 + 0x02 + + + + + + //Vinyl button + + [Master] + DJCi300.vinylButtonDA + Vinyl Deck A + 0x91 + 0x03 + + + + + + //Jog Touch A + + [Channel1] + DJCi300.wheelTouch + Jog Wheel Touch Deck A + 0x91 + 0x08 + + + + + + //Loop In/Out + + [Channel1] + beatloop_4_activate + Loop In button + 0x91 + 0x09 + + + + + + [Channel1] + reloop_toggle + Loop Out button + 0x91 + 0x0A + + + + + + //FX section button + + [EffectRack1_EffectUnit1_Effect3] + enabled + FX Rack 1 - Slot 3 On/Off + 0x91 + 0x00 + + + + + + + + + //Play + + [Channel2] + play + Play button + 0x92 + 0x07 + + + + + //CUE + + [Channel2] + cue_default + Cue button + 0x92 + 0x06 + + + + + //Sync + + [Channel2] + sync_enabled + Sync button + 0x92 + 0x05 + + + + + // PFL + + [Channel2] + pfl + PFL button + 0x92 + 0x0C + + + + + //LOAD B + + [Channel2] + LoadSelectedTrack + LOAD B button + 0x92 + 0x0D + + + + + //SLIP B + + [Channel2] + slip_enabled + SLIP button + 0x92 + 0x01 + + + + + //Q B + + [Channel2] + keylock + Q button + 0x92 + 0x02 + + + + + //Vinyl button + + [Master] + DJCi300.vinylButtonDB + Vinyl + 0x92 + 0x03 + + + + + //Jog Touch B + + [Channel2] + DJCi300.wheelTouch + Jog Wheel Touch Deck B + 0x92 + 0x08 + + + + + //Loop In/Out + + [Channel2] + beatloop_4_activate + Loop In button + 0x92 + 0x09 + + + + + + [Channel2] + reloop_toggle + Loop Out button + 0x92 + 0x0A + + + + + //FX Section Button + + + [EffectRack1_EffectUnit2_Effect3] + enabled + FX Rack 2 - Slot 3 On/Off + 0x92 + 0x00 + + + + + + + + + //Browser section (Encoder button) + + [Master] + maximize_library + Browser button - Maximize Library view + 0x93 + 0x00 + + + + + + + //Jog Touch A + + [Channel1] + DJCi300.wheelTouchShift + Jog Wheel Shift Touch Deck A + 0x94 + 0x08 + + + + + + //Play + + [Channel1] + play_stutter + SHIFT + Play: Play Stutter + 0x94 + 0x07 + + + + + //CUE + + [Channel1] + start_play + SHIFT + Cue: REWIND to beginning + 0x94 + 0x06 + + + + + //Sync + + [Channel1] + sync_master + SHIFT + Sync: Sync Master + 0x94 + 0x05 + + + + + //Loop In/Out + + [Channel1] + loop_halve + SHIFT + Loop In: Loop Half + 0x94 + 0x09 + + + + + + [Channel1] + loop_double + SHIFT + Loop Out: Loop Double + 0x94 + 0x0A + + + + + //Effect + + [EffectRack1_EffectUnit1_Effect3] + next_effect + SHIFT + Effect ON: Next effect + 0x94 + 0x00 + + + + + + + + //Jog Touch B + + [Channel2] + DJCi300.wheelTouchShift + Jog Wheel Shift Touch Deck B + 0x95 + 0x08 + + + + + + //Play + + [Channel2] + play_stutter + SHIFT + Play: Play Stutter + 0x95 + 0x07 + + + + + //CUE + + [Channel2] + start_play + SHIFT + Cue: REWIND to beginning + 0x95 + 0x06 + + + + + //Sync + + [Channel2] + sync_master + SHIFT + Sync: Sync Master + 0x95 + 0x05 + + + + + //Loop In/Out + + [Channel2] + loop_halve + SHIFT + Loop In: Loop Half + 0x95 + 0x09 + + + + + + [Channel2] + loop_double + SHIFT + Loop Ou: Loop Double + 0x95 + 0x0A + + + + + //Effect + + [EffectRack1_EffectUnit2_Effect3] + next_effect + SHIFT + Effect ON: Next effect + 0x95 + 0x00 + + + + + + + + + + + //Hot Cues (SET) + + [Channel1] + hotcue_1_activate + PAD 1 + 0x96 + 0x00 + + + + + + [Channel1] + hotcue_2_activate + PAD 2 + 0x96 + 0x01 + + + + + + [Channel1] + hotcue_3_activate + PAD 3 + 0x96 + 0x02 + + + + + + [Channel1] + hotcue_4_activate + PAD 4 + 0x96 + 0x03 + + + + + + [Channel1] + hotcue_5_activate + PAD 5 + 0x96 + 0x04 + + + + + + [Channel1] + hotcue_6_activate + PAD 6 + 0x96 + 0x05 + + + + + + [Channel1] + hotcue_7_activate + PAD 7 + 0x96 + 0x06 + + + + + + [Channel1] + hotcue_8_activate + PAD 8 + 0x96 + 0x07 + + + + + //Hot-Cue buttons (SHIFT mode) + + [Channel1] + hotcue_1_clear + PAD 1 + 0x96 + 0x08 + + + + + + [Channel1] + hotcue_2_clear + PAD 2 + 0x96 + 0x09 + + + + + + [Channel1] + hotcue_3_clear + PAD 3 + 0x96 + 0x0A + + + + + + [Channel1] + hotcue_4_clear + PAD 4 + 0x96 + 0x0B + + + + + + [Channel1] + hotcue_5_clear + PAD 5 + 0x96 + 0x0C + + + + + + [Channel1] + hotcue_6_clear + PAD 6 + 0x96 + 0x0D + + + + + + [Channel1] + hotcue_7_clear + PAD 7 + 0x96 + 0x0E + + + + + + [Channel1] + hotcue_8_clear + PAD 8 + 0x96 + 0x0F + + + + + //Roll + + [Channel1] + beatlooproll_0.125_activate + Loop 1/8 Beat (Pad 1) + 0x96 + 0x10 + + + + + + [Channel1] + beatlooproll_0.25_activate + Loop 1/4 Beat (Pad 2) + 0x96 + 0x11 + + + + + + [Channel1] + beatlooproll_0.5_activate + Loop 1/2 Beat (Pad 3) + 0x96 + 0x12 + + + + + + [Channel1] + beatlooproll_1_activate + Loop 1 Beat (Pad 4) + 0x96 + 0x13 + + + + + + [Channel1] + beatlooproll_2_activate + Loop 2 Beat (Pad 5) + 0x96 + 0x14 + + + + + + [Channel1] + beatlooproll_4_activate + Loop 2 Beat (Pad 6) + 0x96 + 0x15 + + + + + + [Channel1] + beatlooproll_8_activate + Loop 8 Beat (Pad 7) + 0x96 + 0x16 + + + + + + [Channel1] + beatlooproll_16_activate + Loop 2 Beat (Pad 8) + 0x96 + 0x17 + + + + + //Sampler + + [Sampler1] + cue_gotoandplay + PAD 1 + 0x96 + 0x30 + + + + + + [Sampler2] + cue_gotoandplay + PAD 2 + 0x96 + 0x31 + + + + + + [Sampler3] + cue_gotoandplay + PAD 3 + 0x96 + 0x32 + + + + + + [Sampler4] + cue_gotoandplay + PAD 4 + 0x96 + 0x33 + + + + + + [Sampler5] + cue_gotoandplay + PAD 5 + 0x96 + 0x34 + + + + + + [Sampler6] + cue_gotoandplay + PAD 6 + 0x96 + 0x35 + + + + + + [Sampler7] + cue_gotoandplay + PAD 7 + 0x96 + 0x36 + + + + + + [Sampler8] + cue_gotoandplay + PAD 8 + 0x96 + 0x37 + + + + + //Slicer + 0x20 to 0x27: + + + //Toneplay + 0x40 to 0x47: + + + //Slicer LOOP + 0x60 to 0x67 + + //Beatjump + + [Channel1] + beatjump_1_backward + PAD 1 + 0x96 + 0x70 + + + + + + [Channel1] + beatjump_1_forward + PAD 2 + 0x96 + 0x71 + + + + + + [Channel1] + beatjump_2_backward + PAD 3 + 0x96 + 0x72 + + + + + + [Channel1] + beatjump_2_forward + PAD 4 + 0x96 + 0x73 + + + + + + [Channel1] + beatjump_4_backward + PAD 5 + 0x96 + 0x74 + + + + + + [Channel1] + beatjump_4_forward + PAD 6 + 0x96 + 0x75 + + + + + + [Channel1] + beatjump_8_backward + PAD 7 + 0x96 + 0x76 + + + + + + [Channel1] + beatjump_8_forward + PAD 8 + 0x96 + 0x77 + + + + + + + + + //Hot Cues (SET) + + [Channel2] + hotcue_1_activate + PAD 1 + 0x97 + 0x00 + + + + + + [Channel2] + hotcue_2_activate + PAD 2 + 0x97 + 0x01 + + + + + + [Channel2] + hotcue_3_activate + PAD 3 + 0x97 + 0x02 + + + + + + [Channel2] + hotcue_4_activate + PAD 4 + 0x97 + 0x03 + + + + + + [Channel2] + hotcue_5_activate + PAD 5 + 0x97 + 0x04 + + + + + + [Channel2] + hotcue_6_activate + PAD 6 + 0x97 + 0x05 + + + + + + [Channel2] + hotcue_7_activate + PAD 7 + 0x97 + 0x06 + + + + + + [Channel2] + hotcue_8_activate + PAD 8 + 0x97 + 0x07 + + + + + //Hot-Cue buttons (SHIFT mode) + + [Channel2] + hotcue_1_clear + PAD 1 + 0x97 + 0x08 + + + + + + [Channel2] + hotcue_2_clear + PAD 2 + 0x97 + 0x09 + + + + + + [Channel2] + hotcue_3_clear + PAD 3 + 0x97 + 0x0A + + + + + + [Channel2] + hotcue_4_clear + PAD 4 + 0x97 + 0x0B + + + + + + [Channel2] + hotcue_5_clear + PAD 5 + 0x97 + 0x0C + + + + + + [Channel2] + hotcue_6_clear + PAD 6 + 0x97 + 0x0D + + + + + + [Channel2] + hotcue_7_clear + PAD 7 + 0x97 + 0x0E + + + + + + [Channel2] + hotcue_8_clear + PAD 8 + 0x97 + 0x0F + + + + + //Roll + + [Channel2] + beatlooproll_0.125_activate + Loop 1/8 Beat (Pad 1) + 0x97 + 0x10 + + + + + + [Channel2] + beatlooproll_0.25_activate + Loop 1/4 Beat (Pad 2) + 0x97 + 0x11 + + + + + + [Channel2] + beatlooproll_0.5_activate + Loop 1/2 Beat (Pad 3) + 0x97 + 0x12 + + + + + + [Channel2] + beatlooproll_1_activate + Loop 1 Beat (Pad 4) + 0x97 + 0x13 + + + + + + [Channel2] + beatlooproll_2_activate + Loop 2 Beat (Pad 5) + 0x97 + 0x14 + + + + + + [Channel2] + beatlooproll_4_activate + Loop 2 Beat (Pad 6) + 0x97 + 0x15 + + + + + + [Channel2] + beatlooproll_8_activate + Loop 8 Beat (Pad 7) + 0x97 + 0x16 + + + + + + [Channel2] + beatlooproll_16_activate + Loop 2 Beat (Pad 8) + 0x97 + 0x17 + + + + + //Sampler + + [Sampler1] + cue_gotoandplay + PAD 1 + 0x97 + 0x30 + + + + + + [Sampler2] + cue_gotoandplay + PAD 2 + 0x97 + 0x31 + + + + + + [Sampler3] + cue_gotoandplay + PAD 3 + 0x97 + 0x32 + + + + + + [Sampler4] + cue_gotoandplay + PAD 1 + 0x97 + 0x33 + + + + + + [Sampler5] + cue_gotoandplay + PAD 5 + 0x97 + 0x34 + + + + + + [Sampler6] + cue_gotoandplay + PAD 6 + 0x97 + 0x35 + + + + + + [Sampler7] + cue_gotoandplay + PAD 7 + 0x97 + 0x36 + + + + + + [Sampler8] + cue_gotoandplay + PAD 8 + 0x97 + 0x37 + + + + + //Slicer + 0x20 to 0x27: + + //Toneplay + 0x40 to 0x47: + + //Slicer LOOP + 0x60 to 0x67 + + //Beatjump + + [Channel2] + beatjump_1_backward + PAD 1 + 0x97 + 0x70 + + + + + + [Channel2] + beatjump_1_forward + PAD 2 + 0x97 + 0x71 + + + + + + [Channel2] + beatjump_2_backward + PAD 3 + 0x97 + 0x72 + + + + + + [Channel2] + beatjump_2_forward + PAD 4 + 0x97 + 0x73 + + + + + + [Channel2] + beatjump_4_backward + PAD 5 + 0x97 + 0x74 + + + + + + [Channel2] + beatjump_4_forward + PAD 6 + 0x97 + 0x75 + + + + + + [Channel2] + beatjump_8_backward + PAD 7 + 0x97 + 0x76 + + + + + + [Channel2] + beatjump_8_forward + PAD 8 + 0x97 + 0x77 + + + + + + + + + //Crossfader + + [Master] + crossfader + Crossfader + 0xB0 + 0x00 + + + + + //Browser encoder + + [Library] + MoveVertical + Move Vertical (Browser Knob) + 0xB0 + 0x01 + + + + + + + + // Volume + + [Channel1] + volume + Volume Deck A + 0xB1 + 0x00 + + + + + //EQ + + [EqualizerRack1_[Channel1]_Effect1] + parameter1 + EQ LOW Deck A + 0xB1 + 0x02 + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter2 + EQ MID Deck A + 0xB1 + 0x03 + + + + + + [EqualizerRack1_[Channel1]_Effect1] + parameter3 + EQ HIGH Deck A + 0xB1 + 0x04 + + + + + //Gain + + [Channel1] + pregain + Gain Deck A + 0xB1 + 0x05 + + + + + //Filter + + [QuickEffectRack1_[Channel1]] + super1 + Filter Deck A + 0xB1 + 0x01 + + + + + //Pitch sliders + + [Channel1] + rate + 0xB1 + 0x08 + + + + + + [Channel1] + rate + 0xB1 + 0x28 + + + + + //Jog wheel + + [Channel1] + DJCi300.scratchWheel + Scratch Deck A (Jog-Wheel) + 0xB1 + 0x0A + + + + + + [Channel1] + DJCi300.bendWheel + Pitch Bend Deck A (Jog-Wheel) + 0xB1 + 0x09 + + + + + + [Channel1] + DJCi300.scratchPad + Pitch Bend Deck A (FX PAD 7 / 8 ) + 0xB1 + 0x0C + + + + + //FX section + + + [EffectRack1_EffectUnit1_Effect3] + meta + Effect Rack 1 - Slot 3 Level + 0xB1 + 0x06 + + + + + + [EffectRack1_EffectUnit1] + mix + Effect Rack 1 - Dry/Wet Level + 0xB1 + 0x07 + + + + + + + + + // Volume + + [Channel2] + volume + Volume Deck A + 0xB2 + 0x00 + + + + + //EQ + + [EqualizerRack1_[Channel2]_Effect1] + parameter1 + EQ LOW Deck A + 0xB2 + 0x02 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter2 + EQ MID Deck A + 0xB2 + 0x03 + + + + + + [EqualizerRack1_[Channel2]_Effect1] + parameter3 + EQ HIGH Deck A + 0xB2 + 0x04 + + + + + //Gain + + [Channel2] + pregain + Gain Deck A + 0xB2 + 0x05 + + + + + //Filter + + [QuickEffectRack1_[Channel2]] + super1 + Filter Deck A + 0xB2 + 0x01 + + + + + //Pitch sliders + + [Channel2] + rate + 0xB2 + 0x08 + + + + + + [Channel2] + rate + 0xB2 + 0x28 + + + + + //Jog wheel + + [Channel2] + DJCi300.scratchWheel + Pitch Bend Deck B (Jog-Wheel) + 0xB2 + 0x0A + + + + + + [Channel2] + DJCi300.bendWheel + Pitch Bend Deck B (Jog-Wheel) + 0xB2 + 0x09 + + + + + + [Channel2] + DJCi300.scratchPad + Pitch Bend Deck B (FX PAD 7 / 8 ) + 0xB2 + 0x0C + + + + + //FX section + + + [EffectRack1_EffectUnit2_Effect3] + meta + Effect Rack 2 - Slot 3 Level + 0xB2 + 0x06 + + + + + + [EffectRack1_EffectUnit2] + mix + Effect Rack 2 - Dry/Wet Level + 0xB2 + 0x07 + + + + + + + //Jog wheel + + [Channel1] + DJCi300.scratchWheelShift + SHIFT + Scratch Deck A (Jog-Wheel) + 0xB4 + 0x0A + + + + + + + //Jog wheel + + [Channel2] + DJCi300.scratchWheelShift + SHIFT + Scratch Deck B (Jog-Wheel) + 0xB5 + 0x0A + + + + + + + + + //LED Transport + + [Channel1] + play_indicator + PLAY LED Deck A + 0.5 + 1 + 0x91 + 0x07 + 0x7f + 0x0 + + + [Channel1] + cue_indicator + CUE LED Deck A + 0.5 + 1 + 0x91 + 0x06 + 0x7f + 0x0 + + + [Channel1] + start_play + CUE LED Deck A(SHIFT MODE) + 0.5 + 1 + 0x94 + 0x06 + 0x7f + 0x0 + + + [Channel1] + sync_enabled + SYNC LED Deck A + 0.5 + 1 + 0x91 + 0x05 + 0x7f + 0x0 + + + [Channel1] + sync_master + SYNC LED Deck A(SHIFT mode) + 0.5 + 1 + 0x93 + 0x05 + 0x7f + 0x0 + + + [Channel1] + slip_enabled + Slip button Deck A + 0.5 + 1 + 0x91 + 0x01 + 0x7f + 0x0 + + + [Channel1] + keylock + Q button Deck A + 0.5 + 1 + 0x91 + 0x02 + 0x7f + 0x0 + + + [Channel2] + play_indicator + PLAY LED Deck B + 0.5 + 1 + 0x92 + 0x07 + 0x7f + 0x0 + + + [Channel2] + cue_indicator + CUE LED Deck B + 0.5 + 1 + 0x92 + 0x06 + 0x7f + 0x0 + + + [Channel2] + sync_enabled + SYNC LED Deck B + 0.5 + 1 + 0x92 + 0x05 + 0x7f + 0x0 + + + [Channel2] + sync_master + SYNC LED Deck B(SHIFT mode) + 0.5 + 1 + 0x94 + 0x05 + 0x7f + 0x0 + + + [Channel2] + slip_enabled + Slip button Deck B + 0.5 + 1 + 0x92 + 0x01 + 0x7f + 0x0 + + + [Channel2] + keylock + Q button Deck B + 0.5 + 1 + 0x92 + 0x02 + 0x7f + 0x0 + + // LED LOOP + + [Channel1] + beatloop_4_enabled + Loop In LED DA + 0.5 + 1 + 0x91 + 0x09 + 0x7f + 0x00 + + + [Channel2] + beatloop_4_enabled + Loop In LED DB + 0.5 + 1 + 0x92 + 0x09 + 0x7f + 0x00 + + // LED PFL buttons + + [Channel1] + pfl + PFL LED DECK A + 0.5 + 1 + 0x91 + 0x0C + 0x7f + 0x0 + + + [Channel2] + pfl + PFL LED DECK B + 0.5 + 1 + 0x92 + 0x0C + 0x7f + 0x0 + + // LED Browser button + + [Library] + MoveFocus + Browser LED (Green) + 0.5 + 1 + 0x90 + 0x05 + 0x10 + 0x05 + + + [Master] + maximize_library + Browser LED (BLUE) + 0.5 + 1 + 0x90 + 0x05 + 0x05 + 0x10 + + // LED Assitant button + + [AutoDJ] + enabled + Auto DJ On + 0.5 + 1 + 0x90 + 0x03 + 0x7f + 0x0 + + // Effect Unit On + + [EffectRack1_EffectUnit1_Effect3] + enabled + Effect On/Off button + 0.5 + 1 + 0x91 + 0x00 + 0x7f + 0x0 + + + [EffectRack1_EffectUnit2_Effect3] + enabled + Effect On/Off buttonn + 0.5 + 1 + 0x92 + 0x00 + 0x7f + 0x0 + + // LED Beat Align (Track end warning) + + [Channel1] + end_of_track + Auto DJ On + 0.5 + 1 + 0x91 + 0x1C + 0x7f + 0x0 + + + [Channel1] + end_of_track + Auto DJ On + 0.5 + 1 + 0x91 + 0x1D + 0x7f + 0x0 + + + [Channel2] + end_of_track + Auto DJ On + 0.5 + 1 + 0x92 + 0x1C + 0x7f + 0x0 + + + [Channel2] + end_of_track + Auto DJ On + 0.5 + 1 + 0x92 + 0x1D + 0x7f + 0x0 + + //LED HOT CUE (Normal Mode) + + [Channel1] + hotcue_1_enabled + Hotcue 1 (Pad 1) + 0x96 + 0x00 + 0x7E + 0.5 + + + [Channel1] + hotcue_2_enabled + Hotcue 2 (Pad 2) + 0x96 + 0x01 + 0x7E + 0.5 + + + [Channel1] + hotcue_3_enabled + Hotcue 3 (Pad 3) + 0x96 + 0x02 + 0x7E + 0.5 + + + [Channel1] + hotcue_4_enabled + Hotcue 4 (Pad 4) + 0x96 + 0x03 + 0x7E + 0.5 + + + [Channel1] + hotcue_5_enabled + Hotcue 5 (Pad 5) + 0x96 + 0x04 + 0x7E + 0.5 + + + [Channel1] + hotcue_6_enabled + Hotcue 6 (Pad 6) + 0x96 + 0x05 + 0x7E + 0.5 + + + [Channel1] + hotcue_7_enabled + Hotcue 7 (Pad 7) + 0x96 + 0x06 + 0x7E + 0.5 + + + [Channel1] + hotcue_8_enabled + Hotcue 8 (Pad 8) + 0x96 + 0x07 + 0x7E + 0.5 + + + [Channel2] + hotcue_1_enabled + Hotcue 1 (Pad 1) + 0x97 + 0x00 + 0x7E + 0.5 + + + [Channel2] + hotcue_2_enabled + Hotcue 2 (Pad 2) + 0x97 + 0x01 + 0x7E + 0.5 + + + [Channel2] + hotcue_3_enabled + Hotcue 3 (Pad 3) + 0x97 + 0x02 + 0x7E + 0.5 + + + [Channel2] + hotcue_4_enabled + Hotcue 4 (Pad 4) + 0x97 + 0x03 + 0x7E + 0.5 + + + [Channel2] + hotcue_5_enabled + Hotcue 5 (Pad 5) + 0x97 + 0x04 + 0x7E + 0.5 + + + [Channel2] + hotcue_6_enabled + Hotcue 6 (Pad 6) + 0x97 + 0x05 + 0x7E + 0.5 + + + [Channel2] + hotcue_7_enabled + Hotcue 7 (Pad 7) + 0x97 + 0x06 + 0x7E + 0.5 + + + [Channel2] + hotcue_8_enabled + Hotcue 8 (Pad 8) + 0x97 + 0x07 + 0x7E + 0.5 + + //LED HOT CUE (SHIFT Mode) + + [Channel1] + hotcue_1_enabled + Hotcue 1 (Pad 1) + 0x96 + 0x08 + 0x7E + 0.5 + + + [Channel1] + hotcue_2_enabled + Hotcue 2 (Pad 2) + 0x96 + 0x09 + 0x7E + 0.5 + + + [Channel1] + hotcue_3_enabled + Hotcue 3 (Pad 3) + 0x96 + 0x0A + 0x7E + 0.5 + + + [Channel1] + hotcue_4_enabled + Hotcue 4 (Pad 4) + 0x96 + 0x0B + 0x7E + 0.5 + + + [Channel1] + hotcue_5_enabled + Hotcue 5 (Pad 5) + 0x96 + 0x0C + 0x7E + 0.5 + + + [Channel1] + hotcue_6_enabled + Hotcue 6 (Pad 6) + 0x96 + 0x0D + 0x7E + 0.5 + + + [Channel1] + hotcue_7_enabled + Hotcue 7 (Pad 7) + 0x96 + 0x0E + 0x7E + 0.5 + + + [Channel1] + hotcue_8_enabled + Hotcue 8 (Pad 8) + 0x96 + 0x0F + 0x7E + 0.5 + + + [Channel2] + hotcue_1_enabled + Hotcue 1 (Pad 1) + 0x97 + 0x08 + 0x7E + 0.5 + + + [Channel2] + hotcue_2_enabled + Hotcue 2 (Pad 2) + 0x97 + 0x09 + 0x7E + 0.5 + + + [Channel2] + hotcue_3_enabled + Hotcue 3 (Pad 3) + 0x97 + 0x0A + 0x7E + 0.5 + + + [Channel2] + hotcue_4_enabled + Hotcue 4 (Pad 4) + 0x97 + 0x0B + 0x7E + 0.5 + + + [Channel2] + hotcue_5_enabled + Hotcue 5 (Pad 5) + 0x97 + 0x0C + 0x7E + 0.5 + + + [Channel2] + hotcue_6_enabled + Hotcue 6 (Pad 6) + 0x97 + 0x0D + 0x7E + 0.5 + + + [Channel2] + hotcue_7_enabled + Hotcue 7 (Pad 7) + 0x97 + 0x0E + 0x7E + 0.5 + + + [Channel2] + hotcue_8_enabled + Hotcue 8 (Pad 8) + 0x97 + 0x0F + 0x7E + 0.5 + + //LED Roll + + [Channel1] + beatlooproll_0.125_activate + Loop 1/8 Beat (Pad 1) + 0x96 + 0x10 + 0x7F + 0.5 + + + [Channel1] + beatlooproll_0.25_activate + Loop 1/4 Beat (Pad 2) + 0x96 + 0x11 + 0x7F + 0.5 + + + [Channel1] + beatlooproll_0.5_activate + Loop 1/2 Beat (Pad 3) + 0x96 + 0x12 + 0x7F + 0.5 + + + [Channel1] + beatlooproll_1_activate + Loop 1 Beat (Pad 4) + 0x96 + 0x13 + 0x7F + 0.5 + + + [Channel1] + beatlooproll_2_activate + Loop 2 Beat (Pad 5) + 0x96 + 0x14 + 0x7F + 0.5 + + + [Channel1] + beatlooproll_4_activate + Loop 4 Beat (Pad 6) + 0x96 + 0x15 + 0x7F + 0.5 + + + [Channel1] + beatlooproll_8_activate + Loop 8 Beat (Pad 7) + 0x96 + 0x16 + 0x7F + 0.5 + + + [Channel1] + beatlooproll_16_activate + Loop 16 Beat (Pad 8) + 0x96 + 0x17 + 0x7F + 0.5 + + + [Channel2] + beatlooproll_0.125_activate + Loop 1/8 Beat (Pad 1) + 0x97 + 0x10 + 0x7F + 0.5 + + + [Channel2] + beatlooproll_0.25_activate + Loop 1/4 Beat (Pad 2) + 0x97 + 0x11 + 0x7F + 0.5 + + + [Channel2] + beatlooproll_0.5_activate + Loop 1/2 Beat (Pad 3) + 0x97 + 0x12 + 0x7F + 0.5 + + + [Channel2] + beatlooproll_1_activate + Loop 1 Beat (Pad 4) + 0x97 + 0x13 + 0x7F + 0.5 + + + [Channel2] + beatlooproll_2_activate + Loop 2 Beat (Pad 5) + 0x97 + 0x14 + 0x7F + 0.5 + + + [Channel2] + beatlooproll_4_activate + Loop 4 Beat (Pad 6) + 0x97 + 0x15 + 0x7F + 0.5 + + + [Channel2] + beatlooproll_8_activate + Loop 8 Beat (Pad 7) + 0x97 + 0x16 + 0x7F + 0.5 + + + [Channel2] + beatlooproll_16_activate + Loop 16 Beat (Pad 8) + 0x97 + 0x17 + 0x7F + 0.5 + + //LED SAMPLE + + [Sampler1] + play_indicator + (Pad 1 DECK A) + 0x96 + 0x30 + 0x7F + 0.5 + + + [Sampler1] + play_indicator + (Pad 1 DECK B) + 0x97 + 0x30 + 0x7F + 0.5 + + + [Sampler2] + play_indicator + (Pad 2 DECK A) + 0x96 + 0x31 + 0x7F + 0.5 + + + [Sampler2] + play_indicator + (Pad 2 DECK B) + 0x97 + 0x31 + 0x7F + 0.5 + + + [Sampler3] + play_indicator + (Pad 3 DECK A) + 0x96 + 0x32 + 0x7F + 0.5 + + + [Sampler3] + play_indicator + (Pad 3 DECK B) + 0x97 + 0x32 + 0x7F + 0.5 + + + [Sampler4] + play_indicator + (Pad 4 DECK A) + 0x96 + 0x33 + 0x7F + 0.5 + + + [Sampler4] + play_indicator + (Pad 4 DECK B) + 0x97 + 0x33 + 0x7F + 0.5 + + + [Sampler5] + play_indicator + (Pad 5 DECK A) + 0x96 + 0x34 + 0x7F + 0.5 + + + [Sampler5] + play_indicator + (Pad 5 DECK B) + 0x97 + 0x34 + 0x7F + 0.5 + + + [Sampler6] + play_indicator + (Pad 6 DECK A) + 0x96 + 0x35 + 0x7F + 0.5 + + + [Sampler6] + play_indicator + (Pad 6 DECK B) + 0x97 + 0x35 + 0x7F + 0.5 + + + [Sampler7] + play_indicator + (Pad 7 DECK A) + 0x96 + 0x36 + 0x7F + 0.5 + + + [Sampler7] + play_indicator + (Pad 7 DECK B) + 0x97 + 0x36 + 0x7F + 0.5 + + + [Sampler8] + play_indicator + (Pad 8 DECK A) + 0x96 + 0x37 + 0x7F + 0.5 + + + [Sampler8] + play_indicator + (Pad 4 DECK B) + 0x97 + 0x37 + 0x7F + 0.5 + + //LED BEATJUMP + + [Channel1] + beatjump_1_backward + (Beatjump 1 backward DECK A) + 0x96 + 0x70 + 0x7F + 0.5 + + + [Channel2] + beatjump_1_backward + (Beatjump 1 backward DECK B) + 0x97 + 0x70 + 0x7F + 0.5 + + + [Channel1] + beatjump_1_forward + (Beatjump 1 forward DECK A) + 0x96 + 0x71 + 0x7F + 0.5 + + + [Channel2] + beatjump_1_forward + (Beatjump 1 forward DECK B) + 0x97 + 0x71 + 0x7F + 0.5 + + + [Channel1] + beatjump_2_backward + (Beatjump 2 backward DECK A) + 0x96 + 0x72 + 0x7F + 0.5 + + + [Channel2] + beatjump_2_backward + (Beatjump 2 backward DECK B) + 0x97 + 0x72 + 0x7F + 0.5 + + + [Channel1] + beatjump_2_forward + (Beatjump 2 forward DECK A) + 0x96 + 0x73 + 0x7F + 0.5 + + + [Channel2] + beatjump_2_forward + (Beatjump 2 forward DECK B) + 0x97 + 0x73 + 0x7F + 0.5 + + + [Channel1] + beatjump_4_backward + (Beatjump 4 backward DECK A) + 0x96 + 0x74 + 0x7F + 0.5 + + + [Channel2] + beatjump_4_backward + (Beatjump 4 backward DECK B) + 0x97 + 0x74 + 0x7F + 0.5 + + + [Channel1] + beatjump_4_forward + (Beatjump 4 forward DECK A) + 0x96 + 0x75 + 0x7F + 0.5 + + + [Channel2] + beatjump_4_forward + (Beatjump 4 forward DECK B) + 0x97 + 0x75 + 0x7F + 0.5 + + + [Channel1] + beatjump_8_backward + (Beatjump 8 backward DECK A) + 0x96 + 0x76 + 0x7F + 0.5 + + + [Channel2] + beatjump_8_backward + (Beatjump 8 backward DECK B) + 0x97 + 0x76 + 0x7F + 0.5 + + + [Channel1] + beatjump_8_forward + (Beatjump 8 forward DECK A) + 0x96 + 0x77 + 0x7F + 0.5 + + + [Channel2] + beatjump_8_forward + (Beatjump 8 forward Deck B) + 0x97 + 0x77 + 0x7F + 0.5 + + + + \ No newline at end of file From 3789ad1288d72618c1bbbd930b757fc87236b90b Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Fri, 24 Jan 2020 15:41:14 -0500 Subject: [PATCH 02/30] Update Hercules-DJControl-Inpulse-300-script.js --- .../Hercules-DJControl-Inpulse-300-script.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index b7ed94ba27f4..b36f279bade9 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -1,11 +1,3 @@ -//////////////////////////////////////////////////////////////////////// -// JSHint configuration // -//////////////////////////////////////////////////////////////////////// -/* global engine */ -/* global script */ -/* global print */ -/* global midi */ -//////////////////////////////////////////////////////////////////////// var DJCi300 = {}; /////////////////////////////////////////////////////////////// @@ -275,4 +267,4 @@ DJCi300.scratchPad = function (channel, control, value, status, group) { DJCi300.shutdown = function() { midi.sendShortMsg(0xB0, 0x7F, 0x00); -}; \ No newline at end of file +}; From cc5262463bf8b4fb143d62d4ba4c0aa2211a1ec7 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Fri, 24 Jan 2020 15:57:12 -0500 Subject: [PATCH 03/30] Update Hercules-DJControl-Inpulse-300-script.js --- .../Hercules-DJControl-Inpulse-300-script.js | 61 ++++++------------- 1 file changed, 18 insertions(+), 43 deletions(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index b36f279bade9..deef3f0d7a07 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -31,14 +31,13 @@ DJCi300.bendScale = 1.0; // - Controller knob/slider values are queried on startup, so MIXXX is synced. // - Fixed vinyl button behavior the first time it's pressed. // -// v1.0 : Original forum release +// v1.0 : Original forum release // // TODO: Functions that could be implemented to the script: // // * ROLL: Keep SLIP active (if already enabled) when exiting from rolls // -// * SLICER/SLICER LOOP: Potentially use and adapt the script of the Pioneer DDJ SX: -// https://www.mixxx.org/wiki/doku.php/pioneer_ddj-sx#slicer_description +// * SLICER/SLICER LOOP // // * TONEPLAY // @@ -46,17 +45,7 @@ DJCi300.bendScale = 1.0; // - Potentially use 1 FX rack for FX pads and another for the Controlled FX // - See how to preselect effects for a rack // * Fix behavior when adjusting tempo slider after pressing [Sync] (tempo adjustment should be relative, not absolute). -// // **************************************************************************** -// -// We have to disable the no-unused-vars check because we have many MIDI -// callbacks that receive a fixed list of arguments, but we usually don't use -// most of these arguments. Eslint seems to make it relatively difficult to -// disable this check on a case-by-case basis, so we disable it for the whole -// file. -// See this GitHub issue for more context: -// https://github.com/eslint/eslint/issues/1939 -// *eslint-disable no-unused-vars*/ DJCi300.kScratchActionNone = 0; DJCi300.kScratchActionScratch = 1; @@ -78,7 +67,7 @@ DJCi300.vuMeterUpdate = function (value, group, control) { } }; -DJCi300.vuMeterUpdateDA = function (value, group, control) { +DJCi300.vuMeterUpdateDA = function (value, group, control) { value = (value * 127) + 5; switch (control) { case "[Channel1]", "VuMeter": @@ -87,7 +76,7 @@ DJCi300.vuMeterUpdateDA = function (value, group, control) { } }; -DJCi300.vuMeterUpdateDB = function(value, group, control) { +DJCi300.vuMeterUpdateDB = function (value, group, control) { value = (value * 127) + 5; switch (control) { case "[Channel2]", "VuMeter": @@ -99,7 +88,7 @@ DJCi300.vuMeterUpdateDB = function(value, group, control) { -DJCi300.init = function() { +DJCi300.init = function () { DJCi300.scratchButtonState = true; DJCi300.scratchAction = { 1: DJCi300.kScratchActionNone, @@ -124,7 +113,6 @@ DJCi300.scratchButtonState = true; // Connect the Browser LEDs engine.getValue("[Library]", "MoveFocus"); engine.getValue("[Master]", "maximize_library"); - // Ask the controller to send all current knob/slider values over MIDI, which will update // the corresponding GUI controls in MIXXX. @@ -134,7 +122,7 @@ DJCi300.scratchButtonState = true; // The Vinyl button, used to enable or disable scratching on the jog wheels (One per deck). -DJCi300.vinylButtonDA = function(channel, control, value, status, group) { +DJCi300.vinylButtonDA = function (channel, control, value, _status, _group) { if (value) { if (DJCi300.scratchButtonState) { DJCi300.scratchButtonState = false; @@ -143,12 +131,11 @@ DJCi300.vinylButtonDA = function(channel, control, value, status, group) { } else { DJCi300.scratchButtonState = true; midi.sendShortMsg(0x91, 0x03, 0x7F); - } } }; -DJCi300.vinylButtonDB = function(channel, control, value, status, group) { +DJCi300.vinylButtonDB = function (channel, control, value, _status, _group) { if (value) { if (DJCi300.scratchButtonState) { DJCi300.scratchButtonState = false; @@ -157,21 +144,17 @@ DJCi300.vinylButtonDB = function(channel, control, value, status, group) { } else { DJCi300.scratchButtonState = true; midi.sendShortMsg(0x92, 0x03, 0x7F); - } } }; - DJCi300._scratchEnable = function(deck) { var alpha = 1.0/8; var beta = alpha/32; engine.scratchEnable(deck, 248, 33 + 1/3, alpha, beta); }; - - DJCi300._convertWheelRotation = function (value) { // When you rotate the jogwheel, the controller always sends either 0x1 // (clockwise) or 0x7F (counter clockwise). 0x1 should map to 1, 0x7F @@ -179,9 +162,8 @@ DJCi300._convertWheelRotation = function (value) { return value < 0x40 ? 1 : -1; }; - // The touch action on the jog wheel's top surface -DJCi300.wheelTouch = function (channel, control, value, status, group) { +DJCi300.wheelTouch = function (channel, control, value, _status, _group) { var deck = channel; if (value > 0) { // Touching the wheel. @@ -200,13 +182,12 @@ DJCi300.wheelTouch = function (channel, control, value, status, group) { // The touch action on the jog wheel's top surface while holding shift -DJCi300.wheelTouchShift = function(channel, control, value, status, group) { +DJCi300.wheelTouchShift = function (channel, control, value, _status, _group) { var deck = channel - 3; // We always enable scratching regardless of button state. if (value > 0) { DJCi300._scratchEnable(deck); - DJCi300.scratchAction[deck] = DJCi300.kScratchActionSeek; - + DJCi300.scratchAction[deck] = DJCi300.kScratchActionSeek; } else { // Released the wheel. engine.scratchDisable(deck); @@ -214,14 +195,11 @@ 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._scratchWheelImpl = function (deck, value) { var interval = DJCi300._convertWheelRotation(value); var scratchAction = DJCi300.scratchAction[deck]; - - - + if (scratchAction === DJCi300.kScratchActionScratch) { engine.scratchTick(deck, interval * DJCi300.scratchScale); } else if (scratchAction === DJCi300.kScratchActionSeek) { @@ -230,23 +208,21 @@ DJCi300._scratchWheelImpl = function(deck, value) { DJCi300.scratchShiftMultiplier); } else { DJCi300._bendWheelImpl(deck, value); - } }; // Scratching on the jog wheel (rotating it while pressing the top surface) -DJCi300.scratchWheel = function (channel, control, value, status, group) { +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) { +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', @@ -254,17 +230,16 @@ DJCi300._bendWheelImpl = function (deck, value) { }; // Bending on the jog wheel (rotating using the edge) -DJCi300.bendWheel = function (channel, control, value, status, group) { +DJCi300.bendWheel = function (channel, control, value, _status, _group) { var deck = channel; DJCi300._bendWheelImpl(deck, value); }; -DJCi300.scratchPad = function (channel, control, value, status, group) { +DJCi300.scratchPad = function (channel, control, value, _status, _group) { var deck = channel; DJCi300._scratchWheelImpl(deck, value); }; - - -DJCi300.shutdown = function() { + +DJCi300.shutdown = function () { midi.sendShortMsg(0xB0, 0x7F, 0x00); }; From b5ea8b08b5fbfc049650bbecccb123fa2bde3d14 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Mon, 27 Jan 2020 08:25:48 -0500 Subject: [PATCH 04/30] Update Hercules-DJControl-Inpulse-300-script.js --- .../Hercules-DJControl-Inpulse-300-script.js | 41 +++++++------------ 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index deef3f0d7a07..e1df9b4c34b4 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -53,9 +53,8 @@ DJCi300.kScratchActionSeek = 2; DJCi300.kScratchActionBend = 3; //function DJCi300() {} - -DJCi300.vuMeterUpdate = function (value, group, control) { +DJCi300.vuMeterUpdate = function(value, group, control) { value = (value * 127) + 5; switch (control) { case "VuMeterL": @@ -67,7 +66,7 @@ DJCi300.vuMeterUpdate = function (value, group, control) { } }; -DJCi300.vuMeterUpdateDA = function (value, group, control) { +DJCi300.vuMeterUpdateDA = function(value, group, control) { value = (value * 127) + 5; switch (control) { case "[Channel1]", "VuMeter": @@ -76,7 +75,7 @@ DJCi300.vuMeterUpdateDA = function (value, group, control) { } }; -DJCi300.vuMeterUpdateDB = function (value, group, control) { +DJCi300.vuMeterUpdateDB = function(value, group, control) { value = (value * 127) + 5; switch (control) { case "[Channel2]", "VuMeter": @@ -85,25 +84,19 @@ DJCi300.vuMeterUpdateDB = function (value, group, control) { } }; - - - DJCi300.init = function () { DJCi300.scratchButtonState = true; DJCi300.scratchAction = { 1: DJCi300.kScratchActionNone, 2: DJCi300.kScratchActionNone}; - // Turn On Vinyl buttons LED(one for each deck). midi.sendShortMsg(0x91, 0x03, 0x7F); midi.sendShortMsg(0x92, 0x03, 0x7F); //Turn On Browser button LED - midi.sendShortMsg(0x90, 0x05, 0x10); - + midi.sendShortMsg(0x90, 0x05, 0x10); - // Connect the VUMeters engine.connectControl("[Channel1]", "VuMeter", "DJCi300.vuMeterUpdateDA"); engine.connectControl("[Channel2]", "VuMeter", "DJCi300.vuMeterUpdateDB"); @@ -119,10 +112,8 @@ DJCi300.scratchButtonState = true; midi.sendShortMsg(0xB0, 0x7F, 0x7F); }; - // The Vinyl button, used to enable or disable scratching on the jog wheels (One per deck). - -DJCi300.vinylButtonDA = function (channel, control, value, _status, _group) { +DJCi300.vinylButtonDA = function(channel, control, value, _status, _group) { if (value) { if (DJCi300.scratchButtonState) { DJCi300.scratchButtonState = false; @@ -135,7 +126,7 @@ DJCi300.vinylButtonDA = function (channel, control, value, _status, _group) { } }; -DJCi300.vinylButtonDB = function (channel, control, value, _status, _group) { +DJCi300.vinylButtonDB = function(channel, control, value, _status, _group) { if (value) { if (DJCi300.scratchButtonState) { DJCi300.scratchButtonState = false; @@ -148,7 +139,6 @@ DJCi300.vinylButtonDB = function (channel, control, value, _status, _group) { } }; - DJCi300._scratchEnable = function(deck) { var alpha = 1.0/8; var beta = alpha/32; @@ -163,7 +153,7 @@ DJCi300._convertWheelRotation = function (value) { }; // The touch action on the jog wheel's top surface -DJCi300.wheelTouch = function (channel, control, value, _status, _group) { +DJCi300.wheelTouch = function(channel, control, value, _status, _group) { var deck = channel; if (value > 0) { // Touching the wheel. @@ -180,14 +170,13 @@ DJCi300.wheelTouch = function (channel, control, value, _status, _group) { } }; - // The touch action on the jog wheel's top surface while holding shift -DJCi300.wheelTouchShift = function (channel, control, value, _status, _group) { +DJCi300.wheelTouchShift = function(channel, control, value, _status, _group) { var deck = channel - 3; // We always enable scratching regardless of button state. if (value > 0) { DJCi300._scratchEnable(deck); - DJCi300.scratchAction[deck] = DJCi300.kScratchActionSeek; + DJCi300.scratchAction[deck] = DJCi300.kScratchActionSeek; } else { // Released the wheel. engine.scratchDisable(deck); @@ -196,7 +185,7 @@ 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._scratchWheelImpl = function(deck, value) { var interval = DJCi300._convertWheelRotation(value); var scratchAction = DJCi300.scratchAction[deck]; @@ -212,13 +201,13 @@ DJCi300._scratchWheelImpl = function (deck, value) { }; // Scratching on the jog wheel (rotating it while pressing the top surface) -DJCi300.scratchWheel = function (channel, control, value, _status, _group) { +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) { +DJCi300.scratchWheelShift = function(channel, control, value, _status, _group) { var deck = channel - 3; DJCi300._scratchWheelImpl(deck, value); }; @@ -230,16 +219,16 @@ DJCi300._bendWheelImpl = function (deck, value) { }; // Bending on the jog wheel (rotating using the edge) -DJCi300.bendWheel = function (channel, control, value, _status, _group) { +DJCi300.bendWheel = function(channel, control, value, _status, _group) { var deck = channel; DJCi300._bendWheelImpl(deck, value); }; -DJCi300.scratchPad = function (channel, control, value, _status, _group) { +DJCi300.scratchPad = function(channel, control, value, _status, _group) { var deck = channel; DJCi300._scratchWheelImpl(deck, value); }; -DJCi300.shutdown = function () { +DJCi300.shutdown = function() { midi.sendShortMsg(0xB0, 0x7F, 0x00); }; From 1526d184b78f1ec70bf94be97958a8e1dcc4cb5b Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Mon, 27 Jan 2020 08:53:31 -0500 Subject: [PATCH 05/30] Update Hercules-DJControl-Inpulse-300-script.js --- .../Hercules-DJControl-Inpulse-300-script.js | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index e1df9b4c34b4..683cde499774 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -31,7 +31,7 @@ DJCi300.bendScale = 1.0; // - Controller knob/slider values are queried on startup, so MIXXX is synced. // - Fixed vinyl button behavior the first time it's pressed. // -// v1.0 : Original forum release +// v1.0 : Original forum release // // TODO: Functions that could be implemented to the script: // @@ -44,7 +44,7 @@ DJCi300.bendScale = 1.0; // * FX: // - Potentially use 1 FX rack for FX pads and another for the Controlled FX // - See how to preselect effects for a rack -// * Fix behavior when adjusting tempo slider after pressing [Sync] (tempo adjustment should be relative, not absolute). +// * Fix behavior when adjusting tempo slider after pressing [Sync] (tempo adjustment should be relative, not absolute). // **************************************************************************** DJCi300.kScratchActionNone = 0; @@ -84,18 +84,18 @@ DJCi300.vuMeterUpdateDB = function(value, group, control) { } }; -DJCi300.init = function () { +DJCi300.init = function() { DJCi300.scratchButtonState = true; DJCi300.scratchAction = { 1: DJCi300.kScratchActionNone, - 2: DJCi300.kScratchActionNone}; + 2: DJCi300.kScratchActionNone}; // Turn On Vinyl buttons LED(one for each deck). midi.sendShortMsg(0x91, 0x03, 0x7F); midi.sendShortMsg(0x92, 0x03, 0x7F); //Turn On Browser button LED - midi.sendShortMsg(0x90, 0x05, 0x10); + midi.sendShortMsg(0x90, 0x05, 0x10); // Connect the VUMeters engine.connectControl("[Channel1]", "VuMeter", "DJCi300.vuMeterUpdateDA"); @@ -103,24 +103,24 @@ DJCi300.scratchButtonState = true; engine.connectControl("[Master]", "VuMeterL", "DJCi300.vuMeterUpdate"); engine.connectControl("[Master]", "VuMeterR", "DJCi300.vuMeterUpdate"); - // Connect the Browser LEDs + // Connect the Browser LEDs engine.getValue("[Library]", "MoveFocus"); - engine.getValue("[Master]", "maximize_library"); + engine.getValue("[Master]", "maximize_library"); - // Ask the controller to send all current knob/slider values over MIDI, which will update + // Ask the controller to send all current knob/slider values over MIDI, which will update // the corresponding GUI controls in MIXXX. midi.sendShortMsg(0xB0, 0x7F, 0x7F); }; -// The Vinyl button, used to enable or disable scratching on the jog wheels (One per deck). + // The Vinyl button, used to enable or disable scratching on the jog wheels (One per deck). DJCi300.vinylButtonDA = function(channel, control, value, _status, _group) { if (value) { if (DJCi300.scratchButtonState) { - DJCi300.scratchButtonState = false; + DJCi300.scratchButtonState = false; midi.sendShortMsg(0x91, 0x03, 0x00); } else { - DJCi300.scratchButtonState = true; + DJCi300.scratchButtonState = true; midi.sendShortMsg(0x91, 0x03, 0x7F); } } @@ -145,7 +145,7 @@ DJCi300._scratchEnable = function(deck) { engine.scratchEnable(deck, 248, 33 + 1/3, alpha, beta); }; -DJCi300._convertWheelRotation = function (value) { +DJCi300._convertWheelRotation = function(value) { // When you rotate the jogwheel, the controller always sends either 0x1 // (clockwise) or 0x7F (counter clockwise). 0x1 should map to 1, 0x7F // should map to -1 (IOW it's 7-bit signed). @@ -178,7 +178,7 @@ DJCi300.wheelTouchShift = function(channel, control, value, _status, _group) { DJCi300._scratchEnable(deck); DJCi300.scratchAction[deck] = DJCi300.kScratchActionSeek; } else { - // Released the wheel. +// Released the wheel. engine.scratchDisable(deck); DJCi300.scratchAction[deck] = DJCi300.kScratchActionNone; } @@ -188,7 +188,6 @@ DJCi300.wheelTouchShift = function(channel, control, value, _status, _group) { DJCi300._scratchWheelImpl = function(deck, value) { var interval = DJCi300._convertWheelRotation(value); var scratchAction = DJCi300.scratchAction[deck]; - if (scratchAction === DJCi300.kScratchActionScratch) { engine.scratchTick(deck, interval * DJCi300.scratchScale); } else if (scratchAction === DJCi300.kScratchActionSeek) { @@ -227,8 +226,8 @@ DJCi300.bendWheel = function(channel, control, value, _status, _group) { DJCi300.scratchPad = function(channel, control, value, _status, _group) { var deck = channel; DJCi300._scratchWheelImpl(deck, value); -}; - +}; + DJCi300.shutdown = function() { midi.sendShortMsg(0xB0, 0x7F, 0x00); }; From 8f6d66b2df514daead821f6d1b359a83e85742b8 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 28 Jan 2020 09:21:29 -0500 Subject: [PATCH 06/30] Update Hercules-DJControl-Inpulse-300-script.js Finally been able to run Eslint to correct remaining issues. --- .../Hercules-DJControl-Inpulse-300-script.js | 73 ++++++++++--------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index 683cde499774..8a08deefad60 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -44,7 +44,7 @@ DJCi300.bendScale = 1.0; // * FX: // - Potentially use 1 FX rack for FX pads and another for the Controlled FX // - See how to preselect effects for a rack -// * Fix behavior when adjusting tempo slider after pressing [Sync] (tempo adjustment should be relative, not absolute). +// * Fix behavior when adjusting tempo slider after pressing [Sync] (tempo adjustment should be relative, not absolute). // **************************************************************************** DJCi300.kScratchActionNone = 0; @@ -53,74 +53,75 @@ DJCi300.kScratchActionSeek = 2; DJCi300.kScratchActionBend = 3; //function DJCi300() {} - + DJCi300.vuMeterUpdate = function(value, group, control) { value = (value * 127) + 5; switch (control) { - case "VuMeterL": - midi.sendShortMsg(0xB0, 0x40, value); - break; - case "VuMeterR": - midi.sendShortMsg(0xB0, 0x41, value); - break; + case "VuMeterL": + midi.sendShortMsg(0xB0, 0x40, value); + break; + case "VuMeterR": + midi.sendShortMsg(0xB0, 0x41, value); + break; } }; DJCi300.vuMeterUpdateDA = function(value, group, control) { value = (value * 127) + 5; switch (control) { - case "[Channel1]", "VuMeter": - midi.sendShortMsg(0xB1, 0x40, value); - break; + case "[Channel1]", "VuMeter": + midi.sendShortMsg(0xB1, 0x40, value); + break; } }; DJCi300.vuMeterUpdateDB = function(value, group, control) { value = (value * 127) + 5; switch (control) { - case "[Channel2]", "VuMeter": - midi.sendShortMsg(0xB2, 0x40, value); - break; + case "[Channel2]", "VuMeter": + midi.sendShortMsg(0xB2, 0x40, value); + break; } }; DJCi300.init = function() { -DJCi300.scratchButtonState = true; + DJCi300.scratchButtonState = true; DJCi300.scratchAction = { 1: DJCi300.kScratchActionNone, - 2: DJCi300.kScratchActionNone}; + 2: DJCi300.kScratchActionNone + }; // Turn On Vinyl buttons LED(one for each deck). midi.sendShortMsg(0x91, 0x03, 0x7F); midi.sendShortMsg(0x92, 0x03, 0x7F); - //Turn On Browser button LED - midi.sendShortMsg(0x90, 0x05, 0x10); + //Turn On Browser button LED + midi.sendShortMsg(0x90, 0x05, 0x10); // Connect the VUMeters engine.connectControl("[Channel1]", "VuMeter", "DJCi300.vuMeterUpdateDA"); engine.connectControl("[Channel2]", "VuMeter", "DJCi300.vuMeterUpdateDB"); engine.connectControl("[Master]", "VuMeterL", "DJCi300.vuMeterUpdate"); engine.connectControl("[Master]", "VuMeterR", "DJCi300.vuMeterUpdate"); - + // Connect the Browser LEDs engine.getValue("[Library]", "MoveFocus"); engine.getValue("[Master]", "maximize_library"); - + // Ask the controller to send all current knob/slider values over MIDI, which will update // the corresponding GUI controls in MIXXX. midi.sendShortMsg(0xB0, 0x7F, 0x7F); }; - // The Vinyl button, used to enable or disable scratching on the jog wheels (One per deck). +// The Vinyl button, used to enable or disable scratching on the jog wheels (One per deck). DJCi300.vinylButtonDA = function(channel, control, value, _status, _group) { if (value) { if (DJCi300.scratchButtonState) { - DJCi300.scratchButtonState = false; + DJCi300.scratchButtonState = false; midi.sendShortMsg(0x91, 0x03, 0x00); } else { - DJCi300.scratchButtonState = true; + DJCi300.scratchButtonState = true; midi.sendShortMsg(0x91, 0x03, 0x7F); } } @@ -129,11 +130,11 @@ DJCi300.vinylButtonDA = function(channel, control, value, _status, _group) { DJCi300.vinylButtonDB = function(channel, control, value, _status, _group) { if (value) { if (DJCi300.scratchButtonState) { - DJCi300.scratchButtonState = false; + DJCi300.scratchButtonState = false; midi.sendShortMsg(0x92, 0x03, 0x00); } else { - DJCi300.scratchButtonState = true; + DJCi300.scratchButtonState = true; midi.sendShortMsg(0x92, 0x03, 0x7F); } } @@ -176,9 +177,9 @@ DJCi300.wheelTouchShift = function(channel, control, value, _status, _group) { // We always enable scratching regardless of button state. if (value > 0) { DJCi300._scratchEnable(deck); - DJCi300.scratchAction[deck] = DJCi300.kScratchActionSeek; + DJCi300.scratchAction[deck] = DJCi300.kScratchActionSeek; } else { -// Released the wheel. + // Released the wheel. engine.scratchDisable(deck); DJCi300.scratchAction[deck] = DJCi300.kScratchActionNone; } @@ -202,32 +203,32 @@ DJCi300._scratchWheelImpl = function(deck, value) { // 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); + 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._scratchWheelImpl(deck, value); }; -DJCi300._bendWheelImpl = function (deck, value) { +DJCi300._bendWheelImpl = function(deck, value) { var interval = DJCi300._convertWheelRotation(value); - engine.setValue('[Channel' + deck + ']', 'jog', - interval * DJCi300.bendScale); + 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); -}; +}; DJCi300.scratchPad = function(channel, control, value, _status, _group) { var deck = channel; DJCi300._scratchWheelImpl(deck, value); -}; +}; DJCi300.shutdown = function() { - midi.sendShortMsg(0xB0, 0x7F, 0x00); -}; + midi.sendShortMsg(0xB0, 0x7F, 0x00); +}; From f762dab091c28bc05667f0fea69d5dd17f9a42f0 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 28 Jan 2020 12:50:18 -0500 Subject: [PATCH 07/30] Update Hercules-DJControl-Inpulse-300-script.js --- .../Hercules-DJControl-Inpulse-300-script.js | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index 8a08deefad60..0e2da99bb327 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -1,18 +1,3 @@ - -var DJCi300 = {}; -/////////////////////////////////////////////////////////////// -// USER OPTIONS // -/////////////////////////////////////////////////////////////// - -// How fast scratching is. -DJCi300.scratchScale = 1.0; - -// How much faster seeking (shift+scratch) is than scratching. -DJCi300.scratchShiftMultiplier = 4; - -// How fast bending is. -DJCi300.bendScale = 1.0; - // DJControl_Inpulse_300_script.js // // *************************************************************************** @@ -46,14 +31,26 @@ DJCi300.bendScale = 1.0; // - See how to preselect effects for a rack // * Fix behavior when adjusting tempo slider after pressing [Sync] (tempo adjustment should be relative, not absolute). // **************************************************************************** +var DJCi300 = {}; +/////////////////////////////////////////////////////////////// +// USER OPTIONS // +/////////////////////////////////////////////////////////////// + +// How fast scratching is. +DJCi300.scratchScale = 1.0; +// How much faster seeking (shift+scratch) is than scratching. +DJCi300.scratchShiftMultiplier = 4; + +// How fast bending is. +DJCi300.bendScale = 1.0; + +// Other scratch related options DJCi300.kScratchActionNone = 0; DJCi300.kScratchActionScratch = 1; DJCi300.kScratchActionSeek = 2; DJCi300.kScratchActionBend = 3; -//function DJCi300() {} - DJCi300.vuMeterUpdate = function(value, group, control) { value = (value * 127) + 5; switch (control) { From 23286c6a0cf75b870f53f1f8e09e343ed26a2b5d Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 28 Jan 2020 13:23:07 -0500 Subject: [PATCH 08/30] Update Hercules_DJControl_Inpulse_300.midi.xml --- .../Hercules_DJControl_Inpulse_300.midi.xml | 184 ++++++++---------- 1 file changed, 85 insertions(+), 99 deletions(-) diff --git a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml index 4627e57f4c6b..23ca82b86a60 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 @@ - //Browser section (Encoder button) + [Library] MoveFocus @@ -29,7 +29,7 @@ - //Assistant + [AutoDJ] enabled @@ -41,7 +41,7 @@ - //Play + [Channel1] play @@ -52,7 +52,7 @@ - //CUE + [Channel1] cue_default @@ -63,7 +63,7 @@ - //Sync + [Channel1] sync_enabled @@ -74,7 +74,7 @@ - // PFL + [Channel1] pfl @@ -85,7 +85,7 @@ - //LOAD A + [Channel1] LoadSelectedTrack @@ -96,7 +96,7 @@ - //SLIP A + [Channel1] slip_enabled @@ -107,7 +107,7 @@ - //Q A + [Channel1] keylock @@ -119,7 +119,7 @@ - //Vinyl button + [Master] DJCi300.vinylButtonDA @@ -131,7 +131,7 @@ - //Jog Touch A + [Channel1] DJCi300.wheelTouch @@ -143,7 +143,7 @@ - //Loop In/Out + [Channel1] beatloop_4_activate @@ -165,7 +165,7 @@ - //FX section button + [EffectRack1_EffectUnit1_Effect3] enabled @@ -179,8 +179,7 @@ - - //Play + [Channel2] play @@ -191,7 +190,7 @@ - //CUE + [Channel2] cue_default @@ -202,7 +201,7 @@ - //Sync + [Channel2] sync_enabled @@ -213,7 +212,7 @@ - // PFL + [Channel2] pfl @@ -224,7 +223,7 @@ - //LOAD B + [Channel2] LoadSelectedTrack @@ -235,7 +234,7 @@ - //SLIP B + [Channel2] slip_enabled @@ -246,7 +245,7 @@ - //Q B + [Channel2] keylock @@ -257,7 +256,7 @@ - //Vinyl button + [Master] DJCi300.vinylButtonDB @@ -268,7 +267,7 @@ - //Jog Touch B + [Channel2] DJCi300.wheelTouch @@ -279,7 +278,7 @@ - //Loop In/Out + [Channel2] beatloop_4_activate @@ -300,7 +299,7 @@ - //FX Section Button + [EffectRack1_EffectUnit2_Effect3] @@ -313,10 +312,9 @@ - - //Browser section (Encoder button) + [Master] maximize_library @@ -329,7 +327,7 @@ - //Jog Touch A + [Channel1] DJCi300.wheelTouchShift @@ -341,7 +339,7 @@ - //Play + [Channel1] play_stutter @@ -352,7 +350,7 @@ - //CUE + [Channel1] start_play @@ -363,7 +361,7 @@ - //Sync + [Channel1] sync_master @@ -374,7 +372,7 @@ - //Loop In/Out + [Channel1] loop_halve @@ -395,7 +393,7 @@ - //Effect + [EffectRack1_EffectUnit1_Effect3] next_effect @@ -407,9 +405,8 @@ - - //Jog Touch B + [Channel2] DJCi300.wheelTouchShift @@ -421,7 +418,7 @@ - //Play + [Channel2] play_stutter @@ -432,7 +429,7 @@ - //CUE + [Channel2] start_play @@ -443,7 +440,7 @@ - //Sync + [Channel2] sync_master @@ -454,7 +451,7 @@ - //Loop In/Out + [Channel2] loop_halve @@ -475,7 +472,7 @@ - //Effect + [EffectRack1_EffectUnit2_Effect3] next_effect @@ -487,12 +484,9 @@ - - - - //Hot Cues (SET) + [Channel1] hotcue_1_activate @@ -573,7 +567,7 @@ - //Hot-Cue buttons (SHIFT mode) + [Channel1] hotcue_1_clear @@ -654,7 +648,7 @@ - //Roll + [Channel1] beatlooproll_0.125_activate @@ -735,7 +729,7 @@ - //Sampler + [Sampler1] cue_gotoandplay @@ -816,18 +810,13 @@ - //Slicer - 0x20 to 0x27: - - - //Toneplay - 0x40 to 0x47: + + - //Slicer LOOP - 0x60 to 0x67 + - //Beatjump + [Channel1] beatjump_1_backward @@ -912,7 +901,7 @@ - //Hot Cues (SET) + [Channel2] hotcue_1_activate @@ -993,7 +982,7 @@ - //Hot-Cue buttons (SHIFT mode) + [Channel2] hotcue_1_clear @@ -1074,7 +1063,7 @@ - //Roll + [Channel2] beatlooproll_0.125_activate @@ -1155,7 +1144,7 @@ - //Sampler + [Sampler1] cue_gotoandplay @@ -1236,16 +1225,13 @@ - //Slicer - 0x20 to 0x27: + - //Toneplay - 0x40 to 0x47: + - //Slicer LOOP - 0x60 to 0x67 + - //Beatjump + [Channel2] beatjump_1_backward @@ -1330,7 +1316,7 @@ - //Crossfader + [Master] crossfader @@ -1341,7 +1327,7 @@ - //Browser encoder + [Library] MoveVertical @@ -1355,7 +1341,7 @@ - // Volume + [Channel1] volume @@ -1366,7 +1352,7 @@ - //EQ + [EqualizerRack1_[Channel1]_Effect1] parameter1 @@ -1397,7 +1383,7 @@ - //Gain + [Channel1] pregain @@ -1408,7 +1394,7 @@ - //Filter + [QuickEffectRack1_[Channel1]] super1 @@ -1419,7 +1405,7 @@ - //Pitch sliders + [Channel1] rate @@ -1438,7 +1424,7 @@ - //Jog wheel + [Channel1] DJCi300.scratchWheel @@ -1469,7 +1455,7 @@ - //FX section + [EffectRack1_EffectUnit1_Effect3] @@ -1495,7 +1481,7 @@ - // Volume + [Channel2] volume @@ -1506,7 +1492,7 @@ - //EQ + [EqualizerRack1_[Channel2]_Effect1] parameter1 @@ -1537,7 +1523,7 @@ - //Gain + [Channel2] pregain @@ -1548,7 +1534,7 @@ - //Filter + [QuickEffectRack1_[Channel2]] super1 @@ -1559,7 +1545,7 @@ - //Pitch sliders + [Channel2] rate @@ -1578,7 +1564,7 @@ - //Jog wheel + [Channel2] DJCi300.scratchWheel @@ -1609,7 +1595,7 @@ - //FX section + [EffectRack1_EffectUnit2_Effect3] @@ -1633,7 +1619,7 @@ - //Jog wheel + [Channel1] DJCi300.scratchWheelShift @@ -1646,7 +1632,7 @@ - //Jog wheel + [Channel2] DJCi300.scratchWheelShift @@ -1661,7 +1647,7 @@ - //LED Transport + [Channel1] play_indicator @@ -1805,7 +1791,7 @@ 0x7f 0x0 - // LED LOOP + [Channel1] beatloop_4_enabled @@ -1828,7 +1814,7 @@ 0x7f 0x00 - // LED PFL buttons + [Channel1] pfl @@ -1851,7 +1837,7 @@ 0x7f 0x0 - // LED Browser button + [Library] MoveFocus @@ -1874,7 +1860,7 @@ 0x05 0x10 - // LED Assitant button + [AutoDJ] enabled @@ -1886,7 +1872,7 @@ 0x7f 0x0 - // Effect Unit On + [EffectRack1_EffectUnit1_Effect3] enabled @@ -1909,7 +1895,7 @@ 0x7f 0x0 - // LED Beat Align (Track end warning) + [Channel1] end_of_track @@ -1954,7 +1940,7 @@ 0x7f 0x0 - //LED HOT CUE (Normal Mode) + [Channel1] hotcue_1_enabled @@ -2099,7 +2085,7 @@ 0x7E 0.5 - //LED HOT CUE (SHIFT Mode) + [Channel1] hotcue_1_enabled @@ -2244,7 +2230,7 @@ 0x7E 0.5 - //LED Roll + [Channel1] beatlooproll_0.125_activate @@ -2389,7 +2375,7 @@ 0x7F 0.5 - //LED SAMPLE + [Sampler1] play_indicator @@ -2534,7 +2520,7 @@ 0x7F 0.5 - //LED BEATJUMP + [Channel1] beatjump_1_backward @@ -2681,4 +2667,4 @@ - \ No newline at end of file + From abc1598609d3ecbfa37b2cb8d69aedcb3549c284 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 28 Jan 2020 13:26:07 -0500 Subject: [PATCH 09/30] Update Hercules_DJControl_Inpulse_300.midi.xml --- .../Hercules_DJControl_Inpulse_300.midi.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml index 23ca82b86a60..38515572c668 100644 --- a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml +++ b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml @@ -810,11 +810,11 @@ - + - + - + @@ -1225,11 +1225,11 @@ - + - + - + From a952567413397c44f877817a29f76b67d1c80391 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Thu, 6 Feb 2020 13:10:14 -0500 Subject: [PATCH 10/30] Update Hercules_DJControl_Inpulse_300.midi.xml Changed Group assignment for Vinyl buttons from [Master] to [Channel1/2] --- .../Hercules_DJControl_Inpulse_300.midi.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml index 38515572c668..23a8dd075401 100644 --- a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml +++ b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml @@ -121,8 +121,8 @@ - [Master] - DJCi300.vinylButtonDA + [Channel1] + DJCi300.vinylButton Vinyl Deck A 0x91 0x03 @@ -258,9 +258,9 @@ - [Master] - DJCi300.vinylButtonDB - Vinyl + [Channel2] + DJCi300.vinylButton + Vinyl Deck B 0x92 0x03 From b648099ae4cfc4e9893dd9c10037b7abf399cc14 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Thu, 6 Feb 2020 13:21:36 -0500 Subject: [PATCH 11/30] Update Hercules-DJControl-Inpulse-300-script.js - Merged functions for Vinyl buttons - Merged functions for Vu Meters --- .../Hercules-DJControl-Inpulse-300-script.js | 61 ++++++------------- 1 file changed, 17 insertions(+), 44 deletions(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index 0e2da99bb327..3fa0c6161732 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -51,8 +51,8 @@ DJCi300.kScratchActionScratch = 1; DJCi300.kScratchActionSeek = 2; DJCi300.kScratchActionBend = 3; -DJCi300.vuMeterUpdate = function(value, group, control) { - value = (value * 127) + 5; +DJCi300.vuMeterUpdateMaster = function(value, group, control) { + value = (value * 122) + 5; switch (control) { case "VuMeterL": midi.sendShortMsg(0xB0, 0x40, value); @@ -63,22 +63,10 @@ DJCi300.vuMeterUpdate = function(value, group, control) { } }; -DJCi300.vuMeterUpdateDA = function(value, group, control) { - value = (value * 127) + 5; - switch (control) { - case "[Channel1]", "VuMeter": - midi.sendShortMsg(0xB1, 0x40, value); - break; - } -}; - -DJCi300.vuMeterUpdateDB = function(value, group, control) { - value = (value * 127) + 5; - switch (control) { - case "[Channel2]", "VuMeter": - midi.sendShortMsg(0xB2, 0x40, value); - break; - } +DJCi300.vuMeterUpdateDeck = function(value, group, _control) { + value = (value * 122) + 5; + var status = (group == "[Channel1]") ? 0xB1 : 0xB2; + midi.sendShortMsg(status, 0x40, value); }; DJCi300.init = function() { @@ -96,10 +84,14 @@ DJCi300.init = function() { midi.sendShortMsg(0x90, 0x05, 0x10); // Connect the VUMeters - engine.connectControl("[Channel1]", "VuMeter", "DJCi300.vuMeterUpdateDA"); - engine.connectControl("[Channel2]", "VuMeter", "DJCi300.vuMeterUpdateDB"); - engine.connectControl("[Master]", "VuMeterL", "DJCi300.vuMeterUpdate"); - engine.connectControl("[Master]", "VuMeterR", "DJCi300.vuMeterUpdate"); + engine.connectControl("[Channel1]", "VuMeter", "DJCi300.vuMeterUpdateDeck"); + engine.getValue("[Channel1]", "VuMeter", "DJCi300.vuMeterUpdateDeck"); + engine.connectControl("[Channel2]", "VuMeter", "DJCi300.vuMeterUpdateDeck"); + engine.getValue("[Channel2]", "VuMeter", "DJCi300.vuMeterUpdateDeck"); + engine.connectControl("[Master]", "VuMeterL", "DJCi300.vuMeterUpdateMaster"); + engine.connectControl("[Master]", "VuMeterR", "DJCi300.vuMeterUpdateMaster"); + engine.getValue("[Master]", "VuMeterL", "DJCi300.vuMeterUpdateMaster"); + engine.getValue("[Master]", "VuMeterR", "DJCi300.vuMeterUpdateMaster"); // Connect the Browser LEDs engine.getValue("[Library]", "MoveFocus"); @@ -111,28 +103,14 @@ DJCi300.init = function() { }; // The Vinyl button, used to enable or disable scratching on the jog wheels (One per deck). -DJCi300.vinylButtonDA = function(channel, control, value, _status, _group) { +DJCi300.vinylButton = function(_channel, _control, value, status, _group) { if (value) { if (DJCi300.scratchButtonState) { DJCi300.scratchButtonState = false; - midi.sendShortMsg(0x91, 0x03, 0x00); - + midi.sendShortMsg(status, 0x03, 0x00); } else { DJCi300.scratchButtonState = true; - midi.sendShortMsg(0x91, 0x03, 0x7F); - } - } -}; - -DJCi300.vinylButtonDB = function(channel, control, value, _status, _group) { - if (value) { - if (DJCi300.scratchButtonState) { - DJCi300.scratchButtonState = false; - midi.sendShortMsg(0x92, 0x03, 0x00); - - } else { - DJCi300.scratchButtonState = true; - midi.sendShortMsg(0x92, 0x03, 0x7F); + midi.sendShortMsg(status, 0x03, 0x7F); } } }; @@ -221,11 +199,6 @@ DJCi300.bendWheel = function(channel, control, value, _status, _group) { DJCi300._bendWheelImpl(deck, value); }; -DJCi300.scratchPad = function(channel, control, value, _status, _group) { - var deck = channel; - DJCi300._scratchWheelImpl(deck, value); -}; - DJCi300.shutdown = function() { midi.sendShortMsg(0xB0, 0x7F, 0x00); }; From 4162f3568137689145d6e0109214759cc9539474 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Thu, 6 Feb 2020 13:30:59 -0500 Subject: [PATCH 12/30] Update Hercules-DJControl-Inpulse-300-script.js --- res/controllers/Hercules-DJControl-Inpulse-300-script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index 3fa0c6161732..57d9d85f6fe0 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -65,7 +65,7 @@ DJCi300.vuMeterUpdateMaster = function(value, group, control) { DJCi300.vuMeterUpdateDeck = function(value, group, _control) { value = (value * 122) + 5; - var status = (group == "[Channel1]") ? 0xB1 : 0xB2; + var status = (group === "[Channel1]") ? 0xB1 : 0xB2; midi.sendShortMsg(status, 0x40, value); }; From 76a7962758c8dec2e5cc30232b14e556d7344fb7 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 25 Feb 2020 09:48:03 -0500 Subject: [PATCH 13/30] Update Hercules-DJControl-Inpulse-300-script.js Removed getValue () calls related to Browser LED --- res/controllers/Hercules-DJControl-Inpulse-300-script.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index 57d9d85f6fe0..5a0a47c8ebc9 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -3,7 +3,7 @@ // *************************************************************************** // * Mixxx mapping script file for the Hercules DJControl Inpulse 300. // * Author: DJ Phatso, contributions by Kerrick Staley -// * Version 1.2 (December 2019) +// * Version 1.2 (March 2020) // * Forum: https://www.mixxx.org/forums/viewtopic.php?f=7&t=12599 // * Wiki: https://mixxx.org/wiki/doku.php/hercules_djcontrol_inpulse_300 // @@ -81,7 +81,7 @@ DJCi300.init = function() { midi.sendShortMsg(0x92, 0x03, 0x7F); //Turn On Browser button LED - midi.sendShortMsg(0x90, 0x05, 0x10); + midi.sendShortMsg(0x90, 0x04, 0x05); // Connect the VUMeters engine.connectControl("[Channel1]", "VuMeter", "DJCi300.vuMeterUpdateDeck"); @@ -93,10 +93,6 @@ DJCi300.init = function() { engine.getValue("[Master]", "VuMeterL", "DJCi300.vuMeterUpdateMaster"); engine.getValue("[Master]", "VuMeterR", "DJCi300.vuMeterUpdateMaster"); - // Connect the Browser LEDs - engine.getValue("[Library]", "MoveFocus"); - engine.getValue("[Master]", "maximize_library"); - // Ask the controller to send all current knob/slider values over MIDI, which will update // the corresponding GUI controls in MIXXX. midi.sendShortMsg(0xB0, 0x7F, 0x7F); From f8ffa29644460f4df535aee1203a3232e113e608 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 25 Feb 2020 09:51:02 -0500 Subject: [PATCH 14/30] Update Hercules_DJControl_Inpulse_300.midi.xml Reassigned Output note for Browser LED function --- .../Hercules_DJControl_Inpulse_300.midi.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml index 23a8dd075401..4d2c04750541 100644 --- a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml +++ b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml @@ -1841,24 +1841,24 @@ [Library] MoveFocus - Browser LED (Green) + Browser LED (BLUE) 0.5 1 0x90 - 0x05 - 0x10 - 0x05 + 0x04 + 0x05 + 0x07 [Master] maximize_library - Browser LED (BLUE) + Browser LED (GREEN) 0.5 1 0x90 - 0x05 - 0x05 - 0x10 + 0x04 + 0x07 + 0x05 From a7f1f019ace1ab61ae17f6bb8038ddbbd07139ba Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 25 Feb 2020 12:59:18 -0500 Subject: [PATCH 15/30] Update Hercules-DJControl-Inpulse-300-script.js Changes "Rate" mapping to script in order to allow soft-takeover. --- .../Hercules-DJControl-Inpulse-300-script.js | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index 5a0a47c8ebc9..a79b23d36012 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -70,6 +70,7 @@ DJCi300.vuMeterUpdateDeck = function(value, group, _control) { }; DJCi300.init = function() { + DJCi300.scratchButtonState = true; DJCi300.scratchAction = { 1: DJCi300.kScratchActionNone, @@ -83,6 +84,15 @@ DJCi300.init = function() { //Turn On Browser button LED midi.sendShortMsg(0x90, 0x04, 0x05); + //Array for the MSB bits of pitch change + DJCi300.pitchMsbValue = [0x40, 0x40]; + + //Softtakeover for Pitch fader + engine.softTakeover("[Channel1]", "rate", true); + 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"); @@ -98,6 +108,18 @@ DJCi300.init = function() { midi.sendShortMsg(0xB0, 0x7F, 0x7F); }; +DJCi300.deckRateMsb = function(_channel, _control, value, status, _group) { + var invertval = 127-value; + //Calculating this always, or else the first time will not work + //(which is precisely when the controller reports the initial positions) + DJCi300.pitchMsbValue[deck - 1] = value; +}; + +DJCi300.deckRateLsb = function(_channel, _control, value, status, _group) { + var invertval = 127-value; + var msbval = DJCi300.pitchMsbValue[deck - 1]; +}; + // The Vinyl button, used to enable or disable scratching on the jog wheels (One per deck). DJCi300.vinylButton = function(_channel, _control, value, status, _group) { if (value) { From 8b37189259d7bf991209fa268cf92014a4af1b66 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 25 Feb 2020 13:03:26 -0500 Subject: [PATCH 16/30] Update Hercules_DJControl_Inpulse_300.midi.xml Changes to "Rate" to reflect script changes --- .../Hercules_DJControl_Inpulse_300.midi.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml index 4d2c04750541..13870c816384 100644 --- a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml +++ b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml @@ -1408,20 +1408,20 @@ [Channel1] - rate + DJCi300.deckRateMsb 0xB1 0x08 - + [Channel1] - rate + DJCi300.deckRateLsb 0xB1 0x28 - + @@ -1548,20 +1548,20 @@ [Channel2] - rate + DJCi300.deckRateMsb 0xB2 0x08 - + [Channel2] - rate + DJCi300.deckRateLsb 0xB2 0x28 - + From 474352273287373bed4d1db319a056c108f27164 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 25 Feb 2020 13:19:28 -0500 Subject: [PATCH 17/30] Update Hercules-DJControl-Inpulse-300-script.js Modified "vuMeterUpdateMaster" function --- .../Hercules-DJControl-Inpulse-300-script.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index a79b23d36012..70c03775c629 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -51,16 +51,10 @@ DJCi300.kScratchActionScratch = 1; DJCi300.kScratchActionSeek = 2; DJCi300.kScratchActionBend = 3; -DJCi300.vuMeterUpdateMaster = function(value, group, control) { +DJCi300.vuMeterUpdateMaster = function(value,_group, control) { value = (value * 122) + 5; - switch (control) { - case "VuMeterL": - midi.sendShortMsg(0xB0, 0x40, value); - break; - case "VuMeterR": - midi.sendShortMsg(0xB0, 0x41, value); - break; - } + var status = (control === "[VuMeterL]") ? 0x40 : 0x41; + midi.sendShortMsg(0xB0, control, value); }; DJCi300.vuMeterUpdateDeck = function(value, group, _control) { From 6bf7d00cf2724172c68d238c57e5b32836fec7cc Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 25 Feb 2020 13:37:43 -0500 Subject: [PATCH 18/30] Update Hercules-DJControl-Inpulse-300-script.js --- .../Hercules-DJControl-Inpulse-300-script.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index 70c03775c629..7754b3bd251a 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -51,7 +51,7 @@ DJCi300.kScratchActionScratch = 1; DJCi300.kScratchActionSeek = 2; DJCi300.kScratchActionBend = 3; -DJCi300.vuMeterUpdateMaster = function(value,_group, control) { +DJCi300.vuMeterUpdateMaster = function(value, _group, control) { value = (value * 122) + 5; var status = (control === "[VuMeterL]") ? 0x40 : 0x41; midi.sendShortMsg(0xB0, control, value); @@ -64,7 +64,6 @@ DJCi300.vuMeterUpdateDeck = function(value, group, _control) { }; DJCi300.init = function() { - DJCi300.scratchButtonState = true; DJCi300.scratchAction = { 1: DJCi300.kScratchActionNone, @@ -86,8 +85,8 @@ DJCi300.init = function() { engine.softTakeover("[Channel2]", "rate", true); engine.softTakeoverIgnoreNextValue("[Channel1]", "rate"); engine.softTakeoverIgnoreNextValue("[Channel2]", "rate"); - - // Connect the VUMeters + + // Connect the VUMeters engine.connectControl("[Channel1]", "VuMeter", "DJCi300.vuMeterUpdateDeck"); engine.getValue("[Channel1]", "VuMeter", "DJCi300.vuMeterUpdateDeck"); engine.connectControl("[Channel2]", "VuMeter", "DJCi300.vuMeterUpdateDeck"); @@ -102,16 +101,10 @@ DJCi300.init = function() { midi.sendShortMsg(0xB0, 0x7F, 0x7F); }; -DJCi300.deckRateMsb = function(_channel, _control, value, status, _group) { - var invertval = 127-value; - //Calculating this always, or else the first time will not work - //(which is precisely when the controller reports the initial positions) - DJCi300.pitchMsbValue[deck - 1] = value; +DJCi300.deckRateMsb = function(_channel, _control, value, _status, _group) { }; -DJCi300.deckRateLsb = function(_channel, _control, value, status, _group) { - var invertval = 127-value; - var msbval = DJCi300.pitchMsbValue[deck - 1]; +DJCi300.deckRateLsb = function(_channel, _control, value, _status, _group) { }; // The Vinyl button, used to enable or disable scratching on the jog wheels (One per deck). From b943850ba60d8263cb1ffca5cf8a1e61f6af2b6e Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 3 Mar 2020 14:05:31 -0500 Subject: [PATCH 19/30] Update Hercules-DJControl-Inpulse-300-script.js --- .../Hercules-DJControl-Inpulse-300-script.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index 7754b3bd251a..f375382fcc85 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -18,7 +18,7 @@ // // v1.0 : Original forum release // -// TODO: Functions that could be implemented to the script: +// TO DO: Functions that could be implemented to the script: // // * ROLL: Keep SLIP active (if already enabled) when exiting from rolls // @@ -27,9 +27,7 @@ // * TONEPLAY // // * FX: -// - Potentially use 1 FX rack for FX pads and another for the Controlled FX -// - See how to preselect effects for a rack -// * Fix behavior when adjusting tempo slider after pressing [Sync] (tempo adjustment should be relative, not absolute). +// - See how to preselect effects for a rack // **************************************************************************** var DJCi300 = {}; /////////////////////////////////////////////////////////////// @@ -77,9 +75,6 @@ DJCi300.init = function() { //Turn On Browser button LED midi.sendShortMsg(0x90, 0x04, 0x05); - //Array for the MSB bits of pitch change - DJCi300.pitchMsbValue = [0x40, 0x40]; - //Softtakeover for Pitch fader engine.softTakeover("[Channel1]", "rate", true); engine.softTakeover("[Channel2]", "rate", true); @@ -101,12 +96,6 @@ DJCi300.init = function() { midi.sendShortMsg(0xB0, 0x7F, 0x7F); }; -DJCi300.deckRateMsb = function(_channel, _control, value, _status, _group) { -}; - -DJCi300.deckRateLsb = function(_channel, _control, value, _status, _group) { -}; - // The Vinyl button, used to enable or disable scratching on the jog wheels (One per deck). DJCi300.vinylButton = function(_channel, _control, value, status, _group) { if (value) { From 75fb4b4fd509d39be5324cb5069766a0408bfbec Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 3 Mar 2020 14:07:50 -0500 Subject: [PATCH 20/30] Update Hercules_DJControl_Inpulse_300.midi.xml --- .../Hercules_DJControl_Inpulse_300.midi.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml index 13870c816384..4d2c04750541 100644 --- a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml +++ b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml @@ -1408,20 +1408,20 @@ [Channel1] - DJCi300.deckRateMsb + rate 0xB1 0x08 - + [Channel1] - DJCi300.deckRateLsb + rate 0xB1 0x28 - + @@ -1548,20 +1548,20 @@ [Channel2] - DJCi300.deckRateMsb + rate 0xB2 0x08 - + [Channel2] - DJCi300.deckRateLsb + rate 0xB2 0x28 - + From da720bb48e973e54dddc2e2f52f02391d51e294a Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 3 Mar 2020 14:17:11 -0500 Subject: [PATCH 21/30] Update Hercules-DJControl-Inpulse-300-script.js --- res/controllers/Hercules-DJControl-Inpulse-300-script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index f375382fcc85..e652d5713368 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -55,7 +55,7 @@ DJCi300.vuMeterUpdateMaster = function(value, _group, control) { midi.sendShortMsg(0xB0, control, value); }; -DJCi300.vuMeterUpdateDeck = function(value, group, _control) { +DJCi300.vuMeterUpdateDeck = function(value, group, _control, _status) { value = (value * 122) + 5; var status = (group === "[Channel1]") ? 0xB1 : 0xB2; midi.sendShortMsg(status, 0x40, value); @@ -64,8 +64,8 @@ DJCi300.vuMeterUpdateDeck = function(value, group, _control) { DJCi300.init = function() { DJCi300.scratchButtonState = true; DJCi300.scratchAction = { - 1: DJCi300.kScratchActionNone, - 2: DJCi300.kScratchActionNone + 1: DJCi300.kScratchActionNone, + 2: DJCi300.kScratchActionNone }; // Turn On Vinyl buttons LED(one for each deck). From e4bc3a0d5da1a1f5c698765494a8d09f36322ca8 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 3 Mar 2020 14:32:16 -0500 Subject: [PATCH 22/30] Update Hercules-DJControl-Inpulse-300-script.js --- res/controllers/Hercules-DJControl-Inpulse-300-script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index e652d5713368..f26f2ba2fdbe 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -49,9 +49,9 @@ DJCi300.kScratchActionScratch = 1; DJCi300.kScratchActionSeek = 2; DJCi300.kScratchActionBend = 3; -DJCi300.vuMeterUpdateMaster = function(value, _group, control) { +DJCi300.vuMeterUpdateMaster = function(value, group, control) { value = (value * 122) + 5; - var status = (control === "[VuMeterL]") ? 0x40 : 0x41; + var status = (group === "[VuMeterL]") ? 0x40 : 0x41; midi.sendShortMsg(0xB0, control, value); }; From bb20dbc60ef02c27f4d0c3a6aa3048335d69f85e Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 3 Mar 2020 14:37:56 -0500 Subject: [PATCH 23/30] Update Hercules-DJControl-Inpulse-300-script.js --- res/controllers/Hercules-DJControl-Inpulse-300-script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index f26f2ba2fdbe..01a84142590d 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -51,7 +51,7 @@ DJCi300.kScratchActionBend = 3; DJCi300.vuMeterUpdateMaster = function(value, group, control) { value = (value * 122) + 5; - var status = (group === "[VuMeterL]") ? 0x40 : 0x41; + var control = (group === "[VuMeterL]") ? 0x40 : 0x41; midi.sendShortMsg(0xB0, control, value); }; From 6a97f0bc000f2cc2ae43d43710eab21a3201d3e2 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Tue, 3 Mar 2020 15:10:54 -0500 Subject: [PATCH 24/30] Update Hercules-DJControl-Inpulse-300-script.js --- res/controllers/Hercules-DJControl-Inpulse-300-script.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index 01a84142590d..5a09d2b8762c 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -51,7 +51,6 @@ DJCi300.kScratchActionBend = 3; DJCi300.vuMeterUpdateMaster = function(value, group, control) { value = (value * 122) + 5; - var control = (group === "[VuMeterL]") ? 0x40 : 0x41; midi.sendShortMsg(0xB0, control, value); }; @@ -62,7 +61,9 @@ DJCi300.vuMeterUpdateDeck = function(value, group, _control, _status) { }; DJCi300.init = function() { + // Scratch button state DJCi300.scratchButtonState = true; + // Scratch Action DJCi300.scratchAction = { 1: DJCi300.kScratchActionNone, 2: DJCi300.kScratchActionNone From 1f27d77405529f6cc1f2973918d83fd3c0cc4f49 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Sat, 7 Mar 2020 23:44:33 +0100 Subject: [PATCH 25/30] Hercules DJControl Inpulse 300: Fix whitespace --- res/controllers/Hercules-DJControl-Inpulse-300-script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index 5a09d2b8762c..57f797b460fa 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -81,7 +81,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"); From 5069cb9a1aafd14db5d8231fa18b9d4b56aa9010 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Sat, 7 Mar 2020 23:50:27 +0100 Subject: [PATCH 26/30] Hercules DJControl Inpulse 300: Merge scratchWheel functions --- .../Hercules-DJControl-Inpulse-300-script.js | 27 ++++++++++--------- .../Hercules_DJControl_Inpulse_300.midi.xml | 4 +-- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index 57f797b460fa..18896accc319 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -156,7 +156,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) { @@ -170,18 +183,6 @@ DJCi300._scratchWheelImpl = function(deck, value) { } }; -// 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", diff --git a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml index 4d2c04750541..63ea22535b12 100644 --- a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml +++ b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml @@ -1622,7 +1622,7 @@ [Channel1] - DJCi300.scratchWheelShift + DJCi300.scratchWheel SHIFT + Scratch Deck A (Jog-Wheel) 0xB4 0x0A @@ -1635,7 +1635,7 @@ [Channel2] - DJCi300.scratchWheelShift + DJCi300.scratchWheel SHIFT + Scratch Deck B (Jog-Wheel) 0xB5 0x0A From 8be4b58a134a3b0c4541f56b95c46ff36158dbab Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Sat, 7 Mar 2020 23:54:40 +0100 Subject: [PATCH 27/30] Hercules DJControl Inpulse 300: Merge bendWheel functions --- .../Hercules-DJControl-Inpulse-300-script.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index 18896accc319..852b1f27c903 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -179,20 +179,16 @@ DJCi300.scratchWheel = function(channel, control, value, status, _group) { interval * DJCi300.scratchScale * DJCi300.scratchShiftMultiplier); } else { - DJCi300._bendWheelImpl(deck, value); + engine.setValue( + "[Channel" + deck + "]", "jog", interval * DJCi300.bendScale); } }; -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() { From 5ba2360b5145bc1a4d34df04d49ebec9a65967d2 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Sat, 7 Mar 2020 23:59:50 +0100 Subject: [PATCH 28/30] Hercules DJControl Inpulse 300: Fix whitespace issues in XML file --- .../Hercules_DJControl_Inpulse_300.midi.xml | 177 +++++++++--------- 1 file changed, 88 insertions(+), 89 deletions(-) diff --git a/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml b/res/controllers/Hercules_DJControl_Inpulse_300.midi.xml index 63ea22535b12..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,7 +1618,7 @@ - + [Channel1] DJCi300.scratchWheel @@ -1632,7 +1631,7 @@ - + [Channel2] DJCi300.scratchWheel @@ -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 From 5e894722b36a910b06aa9efed588456236572937 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Mon, 9 Mar 2020 09:02:35 -0400 Subject: [PATCH 29/30] Update Hercules-DJControl-Inpulse-300-script.js Corrected error to "vuMeterUpdateMaster" --- res/controllers/Hercules-DJControl-Inpulse-300-script.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index 852b1f27c903..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) { From de43b7d89d43b720b42b268c93b6e54fefdab2d5 Mon Sep 17 00:00:00 2001 From: DJ Phatso <48333945+DJPhatso@users.noreply.github.com> Date: Mon, 9 Mar 2020 09:17:35 -0400 Subject: [PATCH 30/30] Update Hercules-DJControl-Inpulse-300-script.js --- res/controllers/Hercules-DJControl-Inpulse-300-script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/controllers/Hercules-DJControl-Inpulse-300-script.js b/res/controllers/Hercules-DJControl-Inpulse-300-script.js index 26ac4ffadcf5..8e5dbb35849a 100644 --- a/res/controllers/Hercules-DJControl-Inpulse-300-script.js +++ b/res/controllers/Hercules-DJControl-Inpulse-300-script.js @@ -49,7 +49,7 @@ DJCi300.kScratchActionScratch = 1; DJCi300.kScratchActionSeek = 2; DJCi300.kScratchActionBend = 3; -DJCi300.vuMeterUpdateMaster = function(value, group, control) { +DJCi300.vuMeterUpdateMaster = function(value, _group, _control) { value = (value * 122) + 5; midi.sendShortMsg(0xB0, 0x40, value); midi.sendShortMsg(0xB0, 0x41, value);