diff options
author | Christian Pointner <equinox@spreadspace.org> | 2014-11-18 02:21:46 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2014-11-18 02:21:46 (GMT) |
commit | 19ca4df3d8d165ce3ec325c7f14d976a37d251db (patch) | |
tree | 60c19a7d0d0bf5f7a44be75c99464c6ebd7b2baf /Midi_Interface | |
parent | b4c4f29d6622a51247a6050f2dbd1a75496a452d (diff) |
improved handling of on/off
Diffstat (limited to 'Midi_Interface')
-rw-r--r-- | Midi_Interface/RHMixxx-scripts.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Midi_Interface/RHMixxx-scripts.js b/Midi_Interface/RHMixxx-scripts.js index 1708151..a4655ac 100644 --- a/Midi_Interface/RHMixxx-scripts.js +++ b/Midi_Interface/RHMixxx-scripts.js @@ -74,19 +74,18 @@ RHMixxx.initSampler = function (s, debug) { // *********** Actions *********** RHMixxx.StopDeck = function (channel, control, value, status, group) { - engine.setValue(group, "start_stop", 1); - engine.setValue(group, "start_stop", 0); + engine.setValue(group, "start_stop", value); } RHMixxx.ToggleSampler = function (channel, control, value, status, group) { print("RHMixxx: ToggleSampler called for " + group); if(!engine.getValue(group, "play")) { - engine.setValue(group, "play", 1); + if(value) + engine.setValue(group, "play", 1); } else { - engine.setValue(group, "start_stop", 1); - engine.setValue(group, "start_stop", 0); + engine.setValue(group, "start_stop", value); } } |