Skip to content

Commit

Permalink
Merge pull request #12021 from Holzhaus/mixer-controls
Browse files Browse the repository at this point in the history
CO Renaming (Pt. 4): VU Meter Controls
  • Loading branch information
JoergAtGithub authored Sep 27, 2023
2 parents 6a0b42c + dacfa49 commit 53f3b07
Show file tree
Hide file tree
Showing 82 changed files with 599 additions and 1,302 deletions.
8 changes: 4 additions & 4 deletions res/controllers/Behringer-CMD-MM1-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,10 +536,10 @@ CMDMM.init = function () {
this.speed=navEncoderScale;
},
});
CMDMM.VuMeterL = engine.makeUnbufferedConnection("[Master]","VuMeterL",function (value) {
CMDMM.VuMeterL = engine.makeUnbufferedConnection("[Master]","vu_meter_left",function (value) {
midi.sendShortMsg(MIDI.CC, 0x50, (value * 15) + 48);
});
CMDMM.VuMeterR = engine.makeUnbufferedConnection("[Master]","VuMeterR",function (value) {
CMDMM.VuMeterR = engine.makeUnbufferedConnection("[Master]","vu_meter_right",function (value) {
midi.sendShortMsg(MIDI.CC, 0x51, (value * 15) + 48);
});
CMDMM.layer(1);
Expand All @@ -549,8 +549,8 @@ CMDMM.init = function () {
};

CMDMM.shutdown = function () {
engine.setParameter("[Master]","VuMeterL",0);
engine.setParameter("[Master]","VuMeterR",0);
engine.setParameter("[Master]","vu_meter_left",0);
engine.setParameter("[Master]","vu_meter_right",0);
for (var i = 0; i<127; i++) {
midi.sendShortMsg(MIDI.noteOn, i, 0);
// sets the controller to orange (to match the left/right buttons which only light up in orange);
Expand Down
12 changes: 6 additions & 6 deletions res/controllers/Behringer-CMDStudio4a-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ BehringerCMDStudio4a.fxAssignLastGroup = "";
BehringerCMDStudio4a.vuMeterUpdate = function (value, group, control){
value = (value*15)+48;
switch(control) {
case "VuMeterL":
case "vu_meter_left":
midi.sendShortMsg(0xB0, 0x7E, value);
break;
case "VuMeterR":
case "vu_meter_right":
midi.sendShortMsg(0xB0, 0x7F, value);
break;
}
Expand All @@ -65,8 +65,8 @@ BehringerCMDStudio4a.init = function () {
// Initialise anything that might not be in the correct state.
BehringerCMDStudio4a.initLEDs();
// Connect the VUMeters
engine.connectControl("[Master]","VuMeterL","BehringerCMDStudio4a.vuMeterUpdate");
engine.connectControl("[Master]","VuMeterR","BehringerCMDStudio4a.vuMeterUpdate");
engine.connectControl("[Master]","vu_meter_left","BehringerCMDStudio4a.vuMeterUpdate");
engine.connectControl("[Master]","vu_meter_right","BehringerCMDStudio4a.vuMeterUpdate");
}

BehringerCMDStudio4a.shutdown = function() {
Expand All @@ -76,8 +76,8 @@ BehringerCMDStudio4a.shutdown = function() {
// Disconnect the VUMeters.
// Maybe not! It seems you don't have to do this even though the connection
// in done in init(), in fact if you try it throws an error.
// engine.connectControl("[Master]","VuMeterL","BehringerCMDStudio4a.vuMeterUpdate",true);
// engine.connectControl("[Master]","VuMeterR","BehringerCMDStudio4a.vuMeterUpdate",true);
// engine.connectControl("[Master]","vu_meter_left","BehringerCMDStudio4a.vuMeterUpdate",true);
// engine.connectControl("[Master]","vu_meter_right","BehringerCMDStudio4a.vuMeterUpdate",true);
}


Expand Down
8 changes: 4 additions & 4 deletions res/controllers/DJ-Tech-DJM-101-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ DJTechDJM101.vumeter[2] = 0;

DJTechDJM101.init = function(id) {
DJTechDJM101.vumeter_select(true);
engine.connectControl("[Master]", "VuMeterL", "DJTechDJM101.VuMeterMasterL");
engine.connectControl("[Master]", "VuMeterR", "DJTechDJM101.VuMeterMasterR");
engine.connectControl("[Channel1]", "VuMeter", "DJTechDJM101.VuMeterDeck1");
engine.connectControl("[Channel2]", "VuMeter", "DJTechDJM101.VuMeterDeck2");
engine.connectControl("[Main]", "vu_meter_left", "DJTechDJM101.VuMeterMasterL");
engine.connectControl("[Main]", "vu_meter_right", "DJTechDJM101.VuMeterMasterR");
engine.connectControl("[Channel1]", "vu_meter", "DJTechDJM101.VuMeterDeck1");
engine.connectControl("[Channel2]", "vu_meter", "DJTechDJM101.VuMeterDeck2");
engine.connectControl("[Channel1]", "pfl", "DJTechDJM101.pfl");
engine.connectControl("[Channel2]", "pfl", "DJTechDJM101.pfl");
}
Expand Down
36 changes: 18 additions & 18 deletions res/controllers/DJ-Tech-Mixer-One-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@ function MIXER1() {}

MIXER1.init = function init(id, debug) { // called when the device is opened & set up
//connect VUmeters
engine.connectControl("[Master]", "VuMeterL", "MIXER1.volumeLEDs");
engine.connectControl("[Master]", "VuMeterR", "MIXER1.volumeLEDs");
engine.connectControl("[Channel1]", "VuMeter", "MIXER1.volumeLEDs");
engine.connectControl("[Channel2]", "VuMeter", "MIXER1.volumeLEDs");
engine.connectControl("[Channel3]", "VuMeter", "MIXER1.volumeLEDs");
engine.connectControl("[Channel4]", "VuMeter", "MIXER1.volumeLEDs");
engine.connectControl("[Main]", "vu_meter_left", "MIXER1.volumeLEDs");
engine.connectControl("[Main]", "vu_meter_right", "MIXER1.volumeLEDs");
engine.connectControl("[Channel1]", "vu_meter", "MIXER1.volumeLEDs");
engine.connectControl("[Channel2]", "vu_meter", "MIXER1.volumeLEDs");
engine.connectControl("[Channel3]", "vu_meter", "MIXER1.volumeLEDs");
engine.connectControl("[Channel4]", "vu_meter", "MIXER1.volumeLEDs");
};

MIXER1.shutdown = function shutdown() {
//disconnect VUmeters
engine.connectControl("[Master]", "VuMeterL", "MIXER1.volumeLEDs", true);
engine.connectControl("[Master]", "VuMeterR", "MIXER1.volumeLEDs", true);
engine.connectControl("[Channel1]", "VuMeter", "MIXER1.volumeLEDs", true);
engine.connectControl("[Channel2]", "VuMeter", "MIXER1.volumeLEDs", true);
engine.connectControl("[Channel3]", "VuMeter", "MIXER1.volumeLEDs", true);
engine.connectControl("[Channel4]", "VuMeter", "MIXER1.volumeLEDs", true);
engine.connectControl("[Main]", "vu_meter_left", "MIXER1.volumeLEDs", true);
engine.connectControl("[Main]", "vu_meter_right", "MIXER1.volumeLEDs", true);
engine.connectControl("[Channel1]", "vu_meter", "MIXER1.volumeLEDs", true);
engine.connectControl("[Channel2]", "vu_meter", "MIXER1.volumeLEDs", true);
engine.connectControl("[Channel3]", "vu_meter", "MIXER1.volumeLEDs", true);
engine.connectControl("[Channel4]", "vu_meter", "MIXER1.volumeLEDs", true);
};

MIXER1.volumeLEDs = function volumeLEDs(value, group, control){

value=(value*127);
if (group=="[Master]" && control=="VuMeterL"){ch=0xB5;midino=0x1f;midi.sendShortMsg(ch, midino, value);ch=0xB7;midino=0x1f;midi.sendShortMsg(ch, midino, value);}
if (group=="[Master]" && control=="VuMeterR"){ch=0xB5;midino=0x20;midi.sendShortMsg(ch, midino, value);ch=0xB7;midino=0x20;midi.sendShortMsg(ch, midino, value);}
if (group=="[Channel1]" && control=="VuMeter"){ch=0xB5;midino=0x22;midi.sendShortMsg(ch, midino, value);}
if (group=="[Channel2]" && control=="VuMeter"){ch=0xB6;midino=0x23;midi.sendShortMsg(ch, midino, value);}
if (group=="[Channel3]" && control=="VuMeter"){ch=0xB7;midino=0x22;midi.sendShortMsg(ch, midino, value);}
if (group=="[Channel4]" && control=="VuMeter"){ch=0xB8;midino=0x23;midi.sendShortMsg(ch, midino, value);}
if (group=="[Master]" && control=="vu_meter_left"){ch=0xB5;midino=0x1f;midi.sendShortMsg(ch, midino, value);ch=0xB7;midino=0x1f;midi.sendShortMsg(ch, midino, value);}
if (group=="[Master]" && control=="vu_meter_right"){ch=0xB5;midino=0x20;midi.sendShortMsg(ch, midino, value);ch=0xB7;midino=0x20;midi.sendShortMsg(ch, midino, value);}
if (group=="[Channel1]" && control=="vu_meter"){ch=0xB5;midino=0x22;midi.sendShortMsg(ch, midino, value);}
if (group=="[Channel2]" && control=="vu_meter"){ch=0xB6;midino=0x23;midi.sendShortMsg(ch, midino, value);}
if (group=="[Channel3]" && control=="vu_meter"){ch=0xB7;midino=0x22;midi.sendShortMsg(ch, midino, value);}
if (group=="[Channel4]" && control=="vu_meter"){ch=0xB8;midino=0x23;midi.sendShortMsg(ch, midino, value);}
};

MIXER1.clearVolumeLEDs = function clearVolumeLEDs(){
Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Denon-MC3000-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ mc3000.init = function(id) {
engine.connectControl("[Channel"+i+"]", "keylock", "mc3000.keylockSetLed");
engine.connectControl("[Channel"+i+"]", "play", "mc3000.playSetLed");
engine.connectControl("[Channel"+i+"]", "playposition", "mc3000.playPositionSetLed");
engine.connectControl("[Channel"+i+"]", "PeakIndicator", "mc3000.peakIndicatorSetLed");
engine.connectControl("[Channel"+i+"]", "VuMeter", "mc3000.vuMeterSetLeds");
engine.connectControl("[Channel"+i+"]", "peak_indicator", "mc3000.peakIndicatorSetLed");
engine.connectControl("[Channel"+i+"]", "vu_meter", "mc3000.vuMeterSetLeds");
engine.connectControl("[Channel"+i+"]", "pfl", "mc3000.pflSetLed");
}

Expand Down
4 changes: 2 additions & 2 deletions res/controllers/Denon-MC4000-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ MC4000.init = function () {
MC4000.rightDeck = new MC4000.Deck(1);
// VU meters
// TODO: implement VU meters for the PFL when cue button is on
engine.connectControl("[Master]", "VuMeterL", "MC4000.OnVuMeterChangeL");
engine.connectControl("[Master]", "VuMeterR", "MC4000.OnVuMeterChangeR");
engine.connectControl("[Main]", "vu_meter_left", "MC4000.OnVuMeterChangeL");
engine.connectControl("[Main]", "vu_meter_right", "MC4000.OnVuMeterChangeR");
// Control all sampler levels simultaneously with the single knob on the mixer
MC4000.samplerLevel = function (channel, control, value, status, group) {
engine.setValue("[Sampler1]", "pregain", script.absoluteNonLin(value, 0, 1.0, 4.0));
Expand Down
56 changes: 28 additions & 28 deletions res/controllers/Denon-MC6000MK2.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2560,223 +2560,223 @@
<outputs>
<output>
<group>[Channel3]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB1</status>
<midino>0x53</midino>
<on>0x01</on>
<minimum>0.2</minimum>
</output>
<output>
<group>[Channel3]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB1</status>
<midino>0x54</midino>
<on>0x01</on>
<minimum>0.4</minimum>
</output>
<output>
<group>[Channel3]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB1</status>
<midino>0x55</midino>
<on>0x01</on>
<minimum>0.6</minimum>
</output>
<output>
<group>[Channel3]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB1</status>
<midino>0x56</midino>
<on>0x01</on>
<minimum>0.75</minimum>
</output>
<output>
<group>[Channel3]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB1</status>
<midino>0x57</midino>
<on>0x01</on>
<minimum>0.85</minimum>
</output>
<output>
<group>[Channel3]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB1</status>
<midino>0x58</midino>
<on>0x01</on>
<minimum>0.92</minimum>
</output>
<output>
<group>[Channel1]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB0</status>
<midino>0x53</midino>
<on>0x01</on>
<minimum>0.2</minimum>
</output>
<output>
<group>[Channel1]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB0</status>
<midino>0x54</midino>
<on>0x01</on>
<minimum>0.4</minimum>
</output>
<output>
<group>[Channel1]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB0</status>
<midino>0x55</midino>
<on>0x01</on>
<minimum>0.6</minimum>
</output>
<output>
<group>[Channel1]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB0</status>
<midino>0x56</midino>
<on>0x01</on>
<minimum>0.75</minimum>
</output>
<output>
<group>[Channel1]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB0</status>
<midino>0x57</midino>
<on>0x01</on>
<minimum>0.85</minimum>
</output>
<output>
<group>[Channel1]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB0</status>
<midino>0x58</midino>
<on>0x01</on>
<minimum>0.92</minimum>
</output>
<output>
<group>[Channel1]</group>
<key>PeakIndicator</key>
<key>peak_indicator</key>
<status>0xB0</status>
<midino>0x59</midino>
<on>0x01</on>
<minimum>0.5</minimum>
</output>
<output>
<group>[Channel4]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB3</status>
<midino>0x53</midino>
<on>0x01</on>
<minimum>0.2</minimum>
</output>
<output>
<group>[Channel4]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB3</status>
<midino>0x54</midino>
<on>0x01</on>
<minimum>0.4</minimum>
</output>
<output>
<group>[Channel4]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB3</status>
<midino>0x55</midino>
<on>0x01</on>
<minimum>0.6</minimum>
</output>
<output>
<group>[Channel4]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB3</status>
<midino>0x56</midino>
<on>0x01</on>
<minimum>0.75</minimum>
</output>
<output>
<group>[Channel4]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB3</status>
<midino>0x57</midino>
<on>0x01</on>
<minimum>0.85</minimum>
</output>
<output>
<group>[Channel4]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB3</status>
<midino>0x58</midino>
<on>0x01</on>
<minimum>0.92</minimum>
</output>
<output>
<group>[Channel3]</group>
<key>PeakIndicator</key>
<key>peak_indicator</key>
<status>0xB1</status>
<midino>0x59</midino>
<on>0x01</on>
<minimum>0.5</minimum>
</output>
<output>
<group>[Channel2]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB2</status>
<midino>0x53</midino>
<on>0x01</on>
<minimum>0.2</minimum>
</output>
<output>
<group>[Channel2]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB2</status>
<midino>0x54</midino>
<on>0x01</on>
<minimum>0.4</minimum>
</output>
<output>
<group>[Channel2]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB2</status>
<midino>0x55</midino>
<on>0x01</on>
<minimum>0.6</minimum>
</output>
<output>
<group>[Channel2]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB2</status>
<midino>0x56</midino>
<on>0x01</on>
<minimum>0.75</minimum>
</output>
<output>
<group>[Channel2]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB2</status>
<midino>0x57</midino>
<on>0x01</on>
<minimum>0.85</minimum>
</output>
<output>
<group>[Channel2]</group>
<key>VuMeter</key>
<key>vu_meter</key>
<status>0xB2</status>
<midino>0x58</midino>
<on>0x01</on>
<minimum>0.92</minimum>
</output>
<output>
<group>[Channel2]</group>
<key>PeakIndicator</key>
<key>peak_indicator</key>
<status>0xB2</status>
<midino>0x59</midino>
<on>0x01</on>
<minimum>0.5</minimum>
</output>
<output>
<group>[Channel4]</group>
<key>PeakIndicator</key>
<key>peak_indicator</key>
<status>0xB3</status>
<midino>0x59</midino>
<on>0x01</on>
Expand Down
Loading

0 comments on commit 53f3b07

Please sign in to comment.