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 --- diagram.drawio | 2 +- known-issues.md | 2 +- midi_controller_launchpad_mini.py | 10 ++++++++-- midi_launchpad_mini_integrationtest.py | 20 +++++++++++++++++--- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/diagram.drawio b/diagram.drawio index 9b04ef2..9c2adf7 100644 --- a/diagram.drawio +++ b/diagram.drawio @@ -1 +1 @@ -7VzLeto4FH4alslnS76xDCRt00mnmSFtk+4EFsaNsVJbkNCnHxlL+CLFdcBgXGaTWLIkS+ec/9wk0YPD+cv7CD3NPhEXBz2guS89eNkDwLEs9jepWKUVpg3SCi/y3bRKzypG/i/MKzVeu/BdHBcaUkIC6j8VKyckDPGEFupQFJHnYrMpCYpffUIelipGExTItd98l854rW71sxcfsO/N+KcdYKcv5kg05iuJZ8glz7kqeNWDw4gQmj7NX4Y4SGgn6JL2e/fK283EIhzSOh3M64F+hy8vnOgf7ytZAj94+HnGR1miYMEXHJOAcCLzedOVIEZEFqGLk/G0Hhw8z3yKR09okrx9ZtxndTM6D1hJZ48uimfrtknBC1Ac834bQqwLj5hOZrww9YNgyL4fsXJIQjbuAAW+F7JigKdslYMljqjPuHPBqylJviqTQqyLNccvuSpOmveYzDGNVqwJf2sIgeNyCgQfnzOum5C3meUYvqlEXNK8zdgZM9gD54eaN5++6A+j8eDuyoaP30wv7P88+3pmSvTHLpNNXiQRnRGPhCi4ymoHRQ5lbW5IQqg1K35gSlccaGhBSZFr+MWn90n3c5OXHvhgyfPlS76wEoWQLfdeDJAU1n3ObVOUs37rkuj4Kt9isogmfNG27kwene+LYQwHnz++OwuHAT2DXBWgyMO0goa8XUK4SimIcICovyyCvnGOWhLaesAKErl2/SV79JLH4SJa04O/YR/KvVS0fyKxT30SilfjqNy4PIRCqm7QmOntgiQI5E3YZHCk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v+PWUxZnUBn0x6Vlc4sSme7ZxE5OexWWg3weTyqAvJj2LS5zY7Begoi4SlX0p3HqFRz59vm2Eo2sFgrxFzuIy1Awk8EnWZW+t3GL6UfxFT/sSv8UItJi42NLv9rVcQthXad9gH6dmoYX3l2BfDBn2fWfRw36gA2PnwL5TgC8mPewHeiQmTMqbvpj0sB/okpgyWRnvi0kP+4E+iZpJ8dEXkx72A50S918w+bFsYbf13UG/RyhCD/qBRowQ+rAs7KmbQ36PfHVDyG923zqK78dO+rLLx/8B \ No newline at end of file diff --git a/known-issues.md b/known-issues.md index 0307e4c..86e83c7 100644 --- a/known-issues.md +++ b/known-issues.md @@ -8,7 +8,6 @@ * automatically play next song when current song ends * playback doesn't stop when jumping to next/previous song * should this be the default anyway? -* Add buttons to write current playback position to A or B limit sliders # Closed Issues @@ -17,6 +16,7 @@ * Songs are displayed as full path, should be file name or ideally title from metadata * When switching between songs, AB limit selection is not reset, this means that if the song has only one limit, it is not possible to load it anymore * No GUI to control playback speed +* Add buttons to write current playback position to A or B limit sliders # Use Cases 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) diff --git a/midi_launchpad_mini_integrationtest.py b/midi_launchpad_mini_integrationtest.py index 13b18e7..e5b757c 100644 --- a/midi_launchpad_mini_integrationtest.py +++ b/midi_launchpad_mini_integrationtest.py @@ -10,6 +10,7 @@ class MidiWrapperMock: self.callback = None self.connectedDevice = None self.sentMessages = SimpleQueue() + self.latestMessage = None def setCallback(self, callback): self.callback = callback @@ -18,7 +19,8 @@ class MidiWrapperMock: self.connectedDevice = deviceName def sendMessage(self, note, velocity, channel): - self.sentMessages.put((note, velocity, channel)) + self.latestMessage = (note, velocity, channel) + self.sentMessages.put(self.latestMessage) def simulateInput(self, note, velocity=127, channel=0): if self.callback is not None: @@ -26,6 +28,9 @@ class MidiWrapperMock: msg = Message("note_on", note=note, velocity=velocity, channel=channel) self.callback(msg) + def getLatestMessage(self): + return self.latestMessage + @pytest.fixture def playerMock(): return PlayerMock() @@ -54,21 +59,30 @@ def test_startStopAndPauseButtons(uut, midiWrapperMock, playerMock): uut.connect() assert playerMock.state == PlayerMock.STOPPED - + midiWrapperMock.simulateInput(playPauseButton) assert playerMock.state == PlayerMock.PLAYING + msg = midiWrapperMock.getLatestMessage() + assert msg == (playPauseButton, MidiController.LED_GREEN, 0) midiWrapperMock.simulateInput(stopButton) assert playerMock.state == PlayerMock.STOPPED + assert midiWrapperMock.getLatestMessage() == (playPauseButton, MidiController.LED_YELLOW, 0) midiWrapperMock.simulateInput(playPauseButton) + assert midiWrapperMock.getLatestMessage() == (playPauseButton, MidiController.LED_GREEN, 0) + midiWrapperMock.simulateInput(playPauseButton) + assert midiWrapperMock.getLatestMessage() == (playPauseButton, MidiController.LED_YELLOW, 0) assert playerMock.state == PlayerMock.PAUSED midiWrapperMock.simulateInput(playPauseButton) + assert midiWrapperMock.getLatestMessage() == (playPauseButton, MidiController.LED_GREEN, 0) assert playerMock.state == PlayerMock.PLAYING midiWrapperMock.simulateInput(playPauseButton) + assert midiWrapperMock.getLatestMessage() == (playPauseButton, MidiController.LED_YELLOW, 0) + midiWrapperMock.simulateInput(stopButton) assert playerMock.state == PlayerMock.STOPPED @@ -209,7 +223,7 @@ def test_initializationMessages(uut, midiWrapperMock): (101, yellow, 0), (102, red, 0), (103, green, 0), - (112, green, 0), + (112, yellow, 0), (118, red, 0), (119, green, 0) ] -- cgit v1.2.3