Skip to content

Commit

Permalink
Numark NS6II: add workaround for firmware-buggy splitcue toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiftb0y committed Jun 5, 2023
1 parent c2c20fa commit 932d897
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 19 deletions.
60 changes: 48 additions & 12 deletions res/controllers/Numark NS6II.midi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@
</control>
<control>
<group>[Channel1]</group>
<key>NS6II.decks[0].jog.touch.input</key>
<key>NS6II.decks[0].jog.inputTouch</key>
<status>0x80</status>
<midino>0x06</midino>
<options>
Expand All @@ -1015,7 +1015,7 @@
</control>
<control>
<group>[Channel2]</group>
<key>NS6II.decks[1].jog.touch.input</key>
<key>NS6II.decks[1].jog.inputTouch</key>
<status>0x81</status>
<midino>0x06</midino>
<options>
Expand All @@ -1024,7 +1024,7 @@
</control>
<control>
<group>[Channel3]</group>
<key>NS6II.decks[2].jog.touch.input</key>
<key>NS6II.decks[2].jog.inputTouch</key>
<status>0x82</status>
<midino>0x06</midino>
<options>
Expand All @@ -1033,7 +1033,7 @@
</control>
<control>
<group>[Channel4]</group>
<key>NS6II.decks[3].jog.touch.input</key>
<key>NS6II.decks[3].jog.inputTouch</key>
<status>0x83</status>
<midino>0x06</midino>
<options>
Expand Down Expand Up @@ -1069,7 +1069,7 @@
</control>
<control>
<group>[Channel1]</group>
<key>NS6II.decks[0].jog.touch.input</key>
<key>NS6II.decks[0].jog.inputTouch</key>
<status>0x90</status>
<midino>0x06</midino>
<options>
Expand All @@ -1078,7 +1078,7 @@
</control>
<control>
<group>[Channel2]</group>
<key>NS6II.decks[1].jog.touch.input</key>
<key>NS6II.decks[1].jog.inputTouch</key>
<status>0x91</status>
<midino>0x06</midino>
<options>
Expand All @@ -1087,7 +1087,7 @@
</control>
<control>
<group>[Channel3]</group>
<key>NS6II.decks[2].jog.touch.input</key>
<key>NS6II.decks[2].jog.inputTouch</key>
<status>0x92</status>
<midino>0x06</midino>
<options>
Expand All @@ -1096,7 +1096,7 @@
</control>
<control>
<group>[Channel4]</group>
<key>NS6II.decks[3].jog.touch.input</key>
<key>NS6II.decks[3].jog.inputTouch</key>
<status>0x93</status>
<midino>0x06</midino>
<options>
Expand Down Expand Up @@ -1132,7 +1132,7 @@
</control>
<control>
<group>[Channel1]</group>
<key>NS6II.decks[0].jog.turn.input</key>
<key>NS6II.decks[0].jog.inputWheel</key>
<status>0xB0</status>
<midino>0x06</midino>
<options>
Expand All @@ -1141,7 +1141,7 @@
</control>
<control>
<group>[Channel2]</group>
<key>NS6II.decks[1].jog.turn.input</key>
<key>NS6II.decks[1].jog.inputWheel</key>
<status>0xB1</status>
<midino>0x06</midino>
<options>
Expand All @@ -1150,7 +1150,7 @@
</control>
<control>
<group>[Channel3]</group>
<key>NS6II.decks[2].jog.turn.input</key>
<key>NS6II.decks[2].jog.inputWheel</key>
<status>0xB2</status>
<midino>0x06</midino>
<options>
Expand All @@ -1159,7 +1159,7 @@
</control>
<control>
<group>[Channel4]</group>
<key>NS6II.decks[3].jog.turn.input</key>
<key>NS6II.decks[3].jog.inputWheel</key>
<status>0xB3</status>
<midino>0x06</midino>
<options>
Expand Down Expand Up @@ -4910,6 +4910,42 @@
<script-binding/>
</options>
</control>
<control>
<group></group>
<key>NS6II.PCSelectorInput</key>
<status>0x8F</status>
<midino>0x3C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group></group>
<key>NS6II.PCSelectorInput</key>
<status>0x9F</status>
<midino>0x3C</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group></group>
<key>NS6II.PCSelectorInput</key>
<status>0x8F</status>
<midino>0x3D</midino>
<options>
<script-binding/>
</options>
</control>
<control>
<group></group>
<key>NS6II.PCSelectorInput</key>
<status>0x9F</status>
<midino>0x3D</midino>
<options>
<script-binding/>
</options>
</control>
</controls>
<outputs/>
</controller>
Expand Down
29 changes: 22 additions & 7 deletions res/controllers/Numark-NS6II-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,22 @@ NS6II.MixerContainer = function() {
// There is a bug in Firmware v1.0.4 which causes the headsplit
// control to be sent inverted when the controller status is sent
// (either on PC1/PC2 switch or when requested via sysex).
// Numark is aware of the issue, though they have not confirmed
// if they consider it a bug and if they're working on a fix.
// I'd prefer to disable the feature rather than trying to find a workaround
// midi: [0x9F, 0x1C],
// group: "[Master]",
// inKey: "headSplit",
input: function() {},
// Numark is aware of the issue but they don't seem to be interested
// in fixing it, so this implements a workaround.
invertNext: function() {
this._invertNext = true;
this._timerHandle = engine.beginTimer(200, function() {
this._invertNext = false;
}, true);
},
_invertNext: false,
midi: [0x9F, 0x1C],
group: "[Master]",
inKey: "headSplit",
isPress: function(channelmidi, control, value, status) {
var pressed = components.Button.prototype.isPress.call(this, channelmidi, control, value, status);
return this._invertNext ? !pressed : pressed;
}
});
this.crossfaderContour = new components.Pot({
midi: [0xBF, 0x09],
Expand Down Expand Up @@ -1281,6 +1290,12 @@ NS6II.deckWatcherInput = function(midichannel, _control, _value, _status, _group
toDeck.takeoverLeds.trigger();
};

NS6II.PCSelectorInput = function(_midichannel, _control, value, _status, _group) {
if (value > 0) {
NS6II.mixer.splitCue.invertNext();
}
};

NS6II.EffectUnits = [];
for (var i = 1; i <= 2; i++) {
NS6II.EffectUnits[i] = new components.EffectUnit(i);
Expand Down

0 comments on commit 932d897

Please sign in to comment.