From 19ca4df3d8d165ce3ec325c7f14d976a37d251db Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 18 Nov 2014 02:21:46 +0000 Subject: improved handling of on/off 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); } } -- cgit v0.10.2