aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddy Pedroni <eddy@0xf7.com>2022-01-01 21:17:06 +0100
committerEddy Pedroni <eddy@0xf7.com>2022-01-01 21:17:06 +0100
commitab49963447a3f6ba16fe0a13b3b4761b54b556f4 (patch)
tree8ad5d3b465fa6aaf00894f6fbe5e43f80774471c
parent406e06ecfa0391cc3138a33bee0e5e45cb06f6c5 (diff)
Added based MIDI support to Qt interface
-rw-r--r--solo_tool_qt.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/solo_tool_qt.py b/solo_tool_qt.py
index 8edd886..7bb3821 100644
--- a/solo_tool_qt.py
+++ b/solo_tool_qt.py
@@ -4,6 +4,7 @@ from PyQt5.QtCore import *
from MainWindow import Ui_MainWindow
from solo_tool import SoloTool
+from midi_controller_launchpad_mini import MidiController
POSITION_FACTOR = 100000
RATE_FACTOR = 10
@@ -46,6 +47,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.timer.timeout.connect(self.timerCallback)
self.soloTool = SoloTool()
+ self.midiController = MidiController(self.soloTool)
self.playlistModel = PlaylistModel(self.soloTool)
self.songListView.setModel(self.playlistModel)
@@ -76,7 +78,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.loadSessionButton.pressed.connect(self.loadSession)
self.addSongButton.pressed.connect(self.addSong)
self.abRepeatCheckBox.clicked.connect(self.toggleAbRepeat)
- #self.initMidiButton.pressed.connect()
+ self.initMidiButton.pressed.connect(self.initMidi)
self.timer.start()
self.show()
@@ -150,6 +152,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.aSlider.setValue(int(ab[0] * POSITION_FACTOR))
self.bSlider.setValue(int(ab[1] * POSITION_FACTOR))
+ def initMidi(self):
+ self.midiController.connect()
+
if __name__ == '__main__':
app = QApplication([])
app.setApplicationName("Solo Tool")