diff options
author | Justin Kourie <justin.kourie+github@gmail.com> | 2021-01-05 10:39:42 +0200 |
---|---|---|
committer | Justin Kourie <justin.kourie+github@gmail.com> | 2021-01-30 16:54:08 +0200 |
commit | 881a703b169044dbddc62a3cfcfdc1d9572e5a76 (patch) | |
tree | 089344e5e2331486a90283c7c1a58be83ed01f9a /res | |
parent | 632608a4ee077ddbc332552033f2b034e602863a (diff) |
Updates beat sync implementation
Diffstat (limited to 'res')
-rw-r--r-- | res/controllers/Pioneer-DDJ-400-script.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/res/controllers/Pioneer-DDJ-400-script.js b/res/controllers/Pioneer-DDJ-400-script.js index 097164bc96..a00cd67787 100644 --- a/res/controllers/Pioneer-DDJ-400-script.js +++ b/res/controllers/Pioneer-DDJ-400-script.js @@ -446,17 +446,21 @@ PioneerDDJ400.cueLoopCallRight = function(_channel, _control, value, _status, gr // BEAT SYNC // // Note that the controller sends different signals for a short press and a long -// press of the same button (which means we have to reimplement any short press -// logic on the long press function). +// press of the same button. // PioneerDDJ400.syncPressed = function(channel, control, value, status, group) { - engine.setValue(group, "sync_enabled", value); + if (engine.getValue(group, "sync_enabled")) { + engine.setValue(group, "sync_enabled", 0); + } else { + engine.setValue(group, "beatsync", value); + } }; PioneerDDJ400.syncLongPressed = function(channel, control, value, status, group) { - engine.setValue(group, "sync_enabled", value); // reimplements short press - engine.setValue(group, "sync_enabled", 0x01); // ensures sync lock + if (value) { + engine.setValue(group, "sync_enabled", 1); + } }; PioneerDDJ400.cycleTempoRange = function(_channel, _control, value, _status, group) { |