Copy/Paste MIDI between MuseScore and other programs
I've long wanted ability to more closely interface MuseScore with other MIDI-aware programs.. Ideally I would like to be able to sync a score in MuseScore with midi tracks in a tracker like Ardour. But after discussing this with lasconic, he convinced me that MIDI and Notation are two different animals (which was actually the historical reason why "MuseScore" split off from the "Muse" midi tracker program), and I could imagine the implementation difficulty of inter-process communication, so I've given up on that.
Of course one can always perform a file export/import of MIDI to share data between programs. But I find that involves too much mouse activity. And it would be nice to insert the MIDI into an arbitrary part of a project instead of creating an entirely new project.
So what I'm proposing now is hopefully simpler and more achievable: allow MuseScore's cut/copy command to also put the midi of the selection on the clipboard for other programs to access, and also allow paste to convert midi in the clipboard from other programs into notation which gets placed at the cursor. This is analogous to how you can copy & paste text between a Notepad, Word, and a browser. If use plain ascii text representation of the midi, that would allow easy communication with any text program.
(During a paste, I am undecided whether a pop-up dialog or midi import panel should appear to deal with things like quantizization, or whether that would just get in the user's way.)
(My personal motivation is that when composing, I like to freely improvise and have the midi be recorded into a tracker, from which I'd like to be able to select sections to import. And then when recording overdubbed audio of a score in a DAW, I'd like to easily get midi representation of the particular section from musescore that I'm currently recording so that I can see the midi in the DAW as I'm recording.)
Comments
I would start by Copy.
QMimeData is stored in QClipboard and should be able to handle multiple data formats.
In reply to I would start by Copy… by [DELETED] 5
Good suggestion. I can get copy working which can be pasted in a text editor to test.
I suppose I should file a corresponding feature request in Ardour, qtractor, Muse, Rosegarden, and whatever other open source midi trackers are out there. I also wonder if there is some program out there that already does this, in which case I might want to use similar formatting.
I'm wondering if there should be any header in the clipboard be text, or if it should start with the first midi events...I'll have to think about that and look at midi specs.