From ab49963447a3f6ba16fe0a13b3b4761b54b556f4 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Sat, 1 Jan 2022 21:17:06 +0100 Subject: Added based MIDI support to Qt interface --- solo_tool_qt.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'solo_tool_qt.py') 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") -- cgit v1.2.3