Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDJ-200: Listen to changes from mixxx #3793

Merged
merged 3 commits into from
May 17, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix lint problems
geovannimp authored and Holzhaus committed May 11, 2021
commit f0ff2fc8e3ae54143b9a73f3fcc850008022859f
10 changes: 5 additions & 5 deletions res/controllers/Pioneer-DDJ-200-scripts.js
Original file line number Diff line number Diff line change
@@ -27,14 +27,14 @@ DDJ200.init = function() {
// run switchPlayLED after play/pause track to set LEDs accordingly
engine.makeConnection(vgroup, "play", function(ch, vgroup) {
var vDeckNo = script.deckFromGroup(vgroup);
var d = (vDeckNo % 2) ? 0 : 1;
var d = (vDeckNo % 2) ? 0 : 1;
DDJ200.switchPlayLED(d, ch);
});

// run switchSyncLED after sync toogle to set LEDs accordingly
engine.makeConnection(vgroup, "sync_enabled", function(ch, vgroup) {
var vDeckNo = script.deckFromGroup(vgroup);
var d = (vDeckNo % 2) ? 0 : 1;
var d = (vDeckNo % 2) ? 0 : 1;
DDJ200.switchSyncLED(d, ch);
});

@@ -362,15 +362,15 @@ DDJ200.switchLEDs = function(vDeckNo) {

DDJ200.switchPlayLED = function(deck, enabled) {
midi.sendShortMsg(0x90 + deck, 0x0B, 0x7F * enabled);
}
};

DDJ200.switchSyncLED = function(deck, enabled) {
midi.sendShortMsg(0x90 + deck, 0x58, 0x7F * enabled);
}
};

DDJ200.switchPadLED = function(deck, pad, enabled) {
midi.sendShortMsg(0x97 + 2 * deck, pad - 1, 0x7F * enabled);
}
};

DDJ200.toggleDeck = function(channel, control, value, status, group) {
if (value) { // only if button pressed, not releases, i.e. value === 0