How does JUCE's MIDI drag n' drop work? How does the host "accept" the drop as valid data?


#1

How does JUCE’s MIDI drag n’ drop work? How does the host “accept” the drop as valid data?

Does JUCE know about what formats the DAW timeline expect? Is it DAW-specific?


#2

I think you just create a MIDI file on disk when you start your drag operation and then perform and external file drag DragAndDropContainer::performExternalDragDropOfFiles.


#3

So would the same work, if one just copied a MIDI file to clipboard and then pasted it to the DAW timeline?

I’m confused as to how is a “MIDI file” specified as a data?

Would something like this work for example:

https://midifile.sapp.org


#4

If you are going to use JUCE, it already has :

https://docs.juce.com/master/classMidiFile.html

But dumping a standard MIDI file (or the name of the file on disk) into the system clipboard may or may not achieve any results with the various hosts. You will just need to test if it happens to work.


#5

I think I laid it out pretty succinctly in Can one drag and drop MIDI from a JUCE plug-in to the DAW timeline?

Rail