aboutsummaryrefslogtreecommitdiffstats
path: root/midi_launchpad_mini_integrationtest.py
diff options
context:
space:
mode:
authorEddy Pedroni <eddy@0xf7.com>2022-01-01 20:54:15 +0100
committerEddy Pedroni <eddy@0xf7.com>2022-01-01 20:54:15 +0100
commit27ba3bc396a2da4ffcc39e3e36da5f37df8f628e (patch)
treef72849cd84d599ed8784b4174075d3baa7ec3401 /midi_launchpad_mini_integrationtest.py
parentf7480bb96323b8466ad8e097475db2a7135c88e0 (diff)
Added playback rate functionality to launchpad
Diffstat (limited to 'midi_launchpad_mini_integrationtest.py')
-rw-r--r--midi_launchpad_mini_integrationtest.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/midi_launchpad_mini_integrationtest.py b/midi_launchpad_mini_integrationtest.py
index 8779503..ee39182 100644
--- a/midi_launchpad_mini_integrationtest.py
+++ b/midi_launchpad_mini_integrationtest.py
@@ -149,6 +149,24 @@ def test_previousAndNextAbButtons(uut, midiWrapperMock, soloTool, playerMock):
midiWrapperMock.simulateInput(previousLimitButton)
checkLimit(abLimits[0][0], abLimits[0][1])
+def test_playbackRateButtons(uut, midiWrapperMock, soloTool, playerMock):
+ playbackRateOptions = {
+ 16 : 0.5,
+ 17 : 0.6,
+ 18 : 0.7,
+ 19 : 0.8,
+ 20 : 0.9,
+ 21 : 1.0,
+ 22 : 1.1,
+ 23 : 1.2
+ }
+ uut.connect()
+ assert playerMock.rate == 1.0
+
+ for button in playbackRateOptions:
+ midiWrapperMock.simulateInput(button)
+ assert playerMock.rate == playbackRateOptions[button]
+
def test_unassignedButton(uut, midiWrapperMock):
unassignedButton = 48
uut.connect()
@@ -156,3 +174,4 @@ def test_unassignedButton(uut, midiWrapperMock):
# expect no crash
midiWrapperMock.simulateInput(unassignedButton)
# XXX would be better to assert that nothing changed in the solo tool
+