You want to call Clipboard::MIDIEvents::pasteIntoClip
In Waveform we override the UIBehaviour::paste to be:
bool paste (const Clipboard& clipboard) override
{
if (UIBehaviour::paste (clipboard))
return true;
if (auto content = clipboard.getContent())
if (auto sm = getCurrentlyFocusedSelectionManager())
if (auto ev = getEditViewState (sm->editViewID))
if (content->pasteIntoEdit (ev->edit, ev->insertPoint, sm))
return true;
if (auto me = MidiEditorBase::getActiveMidiEditor())
return me->pasteFromClipboard();
return false;
}
Thank you. Good information to know. I use similar code to past into a clip.
But in my use case I specifically need to populate a te::MidiList from the clipboard. I was hoping there already exists a method to pull the ValueTree data into the te::MidiList. I can, of course, loop through the std::vector and add the data note by note.