From 3472fa7854b575d0d08b4baa23a672cccd1ccaab Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Mon, 3 Jan 2022 15:45:32 +0100 Subject: Added LED feedback for start/pause/stop, implementation is hacky but passes test --- midi_controller_launchpad_mini.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'midi_controller_launchpad_mini.py') diff --git a/midi_controller_launchpad_mini.py b/midi_controller_launchpad_mini.py index 1f430c2..ec69509 100644 --- a/midi_controller_launchpad_mini.py +++ b/midi_controller_launchpad_mini.py @@ -20,7 +20,7 @@ class MidiController: def _registerHandlers(self): self._handlers = { - 96 : self._soloTool.stop, + 96 : self._stop, 112 : self._playPause, 101 : self._soloTool.jumpToA, 102 : self._soloTool.previousStoredAbLimits, @@ -52,8 +52,14 @@ class MidiController: def _playPause(self): if self._soloTool.isPlaying(): self._soloTool.pause() + self._setButtonLED(7, 0, MidiController.LED_YELLOW) else: self._soloTool.play() + self._setButtonLED(7, 0, MidiController.LED_GREEN) + + def _stop(self): + self._soloTool.stop() + self._setButtonLED(7, 0, MidiController.LED_YELLOW) def _createSetPlaybackRateCallback(self, rate): def f(): @@ -86,7 +92,7 @@ class MidiController: # playback control self._setButtonLED(6, 0, MidiController.LED_RED) - self._setButtonLED(7, 0, MidiController.LED_GREEN) + self._setButtonLED(7, 0, MidiController.LED_YELLOW) # AB control self._setButtonLED(6, 5, MidiController.LED_YELLOW) -- cgit v1.2.3