aboutsummaryrefslogtreecommitdiffstats
path: root/solo-tool-project/src/solo_tool/midi_controller_launchpad_mini.py
diff options
context:
space:
mode:
Diffstat (limited to 'solo-tool-project/src/solo_tool/midi_controller_launchpad_mini.py')
-rw-r--r--solo-tool-project/src/solo_tool/midi_controller_launchpad_mini.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/solo-tool-project/src/solo_tool/midi_controller_launchpad_mini.py b/solo-tool-project/src/solo_tool/midi_controller_launchpad_mini.py
index 961127c..8f32650 100644
--- a/solo-tool-project/src/solo_tool/midi_controller_launchpad_mini.py
+++ b/solo-tool-project/src/solo_tool/midi_controller_launchpad_mini.py
@@ -51,10 +51,13 @@ class MidiController:
self._handlers[button] = self._createSetPlaybackRateCallback(rate)
def connect(self):
- self._midiWrapper.setCallback(self._callback)
- self._midiWrapper.connect(MidiController.DEVICE_NAME)
+ self._midiWrapper.connect(MidiController.DEVICE_NAME, self._callback)
self._initialiseButtonLEDs()
+ def disconnect(self):
+ self._allLEDsOff()
+ self._midiWrapper.disconnect()
+
def _callback(self, msg):
if msg.type != "note_on" or msg.velocity < 127:
return