I have written a small app in Qt that generates Midi that you can drag into a DAW. It works with Ableton and Reaper, but not Bitwig. I can dump the midi to a file and drag from Windows explorer, but I'm wondering if anybody here knows why Bitwig may refuse a drag and drop?
The following works with Reaper and Ableton, but not Bitwig. Also I can drag from the app to an explorer window, and from the explorer window into Bitwig, but not directly into Bitwig. (Are there any drag and drop experts here?)
The following works with Reaper and Ableton, but not Bitwig. Also I can drag from the app to an explorer window, and from the explorer window into Bitwig, but not directly into Bitwig. (Are there any drag and drop experts here?)
Code:
def mousePressEvent(self,e): if e.button() == Qt.LeftButton: drag = QDrag(self) with tempfile.NamedTemporaryFile(suffix=".mid",delete=False) as f: fn = f.name f.write(mid) # mid is the midi data, for now just read from a file known to be valid smf temp_filenames.append(fn) mimeData = QMimeData() mimeData.setData("audio/midi",QByteArray("")) urls = [ QUrl.fromLocalFile(fn) ] imeData.setUrls(urls) drag.setMimeData(mimeData) dropAction = drag.exec(Qt.CopyAction)
Statistics: Posted by Chalisque — Mon May 13, 2024 8:24 pm — Replies 0 — Views 15