Skip to content

Commit

Permalink
CONTROLLER Hercules_DJControl_Jovision:
Browse files Browse the repository at this point in the history
- Fixed regression not updating the VuMeters
- Fixed regression not updating the CUE/MIX buttons
  • Loading branch information
David TV committed Jan 3, 2020
1 parent 940ef3f commit 15ec1ef
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
33 changes: 19 additions & 14 deletions res/controllers/Hercules_DJControl_Jogvision-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@
// ****************************************************************************
// * Mixxx mapping script file for the Hercules DJControl Jogvision.
// * Author: DJ Phatso, contributions by Kerrick Staley and David TV
// * Version 1.5 (January 2020)
// * Version 1.4 (December 2019)
// * Version 1.3 (November 2019)
// * Version 1.2 (November 2019)
// * Version 1.1 (March 2019)
// * Forum: https://www.mixxx.org/forums/viewtopic.php?f=7&t=12580
// * Wiki: https://www.mixxx.org/wiki/doku.php/hercules_dj_control_jogvision
//
// Changes to v1.5
// - Fixed regression not updating the VuMeters
// - Fixed regression not updating the CUE/MIX buttons
//
// Changes to v1.4
// - Code cleanup and standarization
// - Adjusted the speed of Jogs' outer led rotation ('ledRotationSpeed' variable)
// - Added "orage" track led color (ala Serato) when play position is beyond the
// half part of the track, but before the "end of track" Mixxx event
// part of the track, but before the "end of track" Mixxx signal
//
// Changes to v1.3
// - Enabled the creation of beatloop (beatloop_activate) by using SHIFT+LoopON
Expand Down Expand Up @@ -108,10 +112,10 @@ DJCJV.init = function(id) {
engine.connectControl ("[Channel1]", "stop", "DJCJV.beatInactive");
engine.connectControl ("[Channel2]", "stop", "DJCJV.beatInactive");

// Set inner jog leds to position 0
// Set inner jog leds to 0
midi.sendShortMsg(DJCJV.Channel['[Channel1]'].deck, 0x61, 0);
midi.sendShortMsg(DJCJV.Channel['[Channel2]'].deck, 0x61, 0);
//// Set outer jog leds to position 0
//// Set outer jog leds to 0
midi.sendShortMsg(DJCJV.Channel['[Channel1]'].deck, 0x60, 1);
midi.sendShortMsg(DJCJV.Channel['[Channel2]'].deck, 0x60, 1);

Expand Down Expand Up @@ -186,21 +190,22 @@ DJCJV.wheelInnerUpdate = function(value, group, control) {

//Vu Meter
DJCJV.vuMeterUpdate = function(value, group, control) {
midi.sendShortMsg(DJCJV.Channel[group].deck, 0x44, value * 6);

midi.sendShortMsg(DJCJV.Channel[group].central, 0x44, value * 6);
};

// Headphone CUE/MIX buttons status
DJCJV.headCueOrMix = function(midino, control, value, status, group) {
if (engine.getValue(group, "headMix") === 0) {
DJCJV.headCue = function(midino, control, value, status, group) {
if(engine.getValue(group, "headMix") == 0) {
engine.setValue(group, "headMix", -1.0);
midi.sendShortMsg(masterLeds, 0x4C, off);
midi.sendShortMsg(masterLeds, 0x4D, on);
midi.sendShortMsg(masterLeds, 0x4D, 0x7f);
midi.sendShortMsg(masterLeds, 0x4C, 0x00);
}
else if (engine.getValue(group, "headMix") !== 1) {
};
DJCJV.headMix = function(midino, control, value, status, group) {
if(engine.getValue(group, "headMix") != 1) {
engine.setValue(group, "headMix", 0);
midi.sendShortMsg(masterLeds, 0x4C, on);
midi.sendShortMsg(masterLeds, 0x4D, off);
midi.sendShortMsg(masterLeds, 0x4D, 0x00);
midi.sendShortMsg(masterLeds, 0x4C, 0x7f);
}
};

Expand Down Expand Up @@ -275,5 +280,5 @@ DJCJV.scratchWheel = function(channel, control, value, status, group) {

// Bending by either using the side of wheel, or with the Job surface when not in vinyl-mode
DJCJV.bendWheel = function(channel, control, value, status, group) {
engine.setValue(group, 'jog', (value >= 64) ? value - 128 : value);
engine.setValue(group, 'jog', (value >= 64) ? value - 128 : value); // Pitch bend
};
4 changes: 2 additions & 2 deletions res/controllers/Hercules_DJControl_Jogvision.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
</control>
<control>
<group>[Master]</group>
<key>DJCJV.headCueOrMix</key>
<key>DJCJV.headCue</key>
<description>Headphone CUE button</description>
<status>0x90</status>
<midino>0x4D</midino>
Expand All @@ -101,7 +101,7 @@
</control>
<control>
<group>[Master]</group>
<key>DJCJV.headCueOrMix</key>
<key>DJCJV.headMix</key>
<description>Headphone MIX button</description>
<status>0x90</status>
<midino>0x4C</midino>
Expand Down

0 comments on commit 15ec1ef

Please sign in to comment.