surge-synthesizer / conduit

The Surge Synth Team Conduit Plugin Suite
Other
13 stars 4 forks source link

Add copy/paste xml patch to/from clipboard alongside load/save #98

Open elanhickler opened 5 months ago

elanhickler commented 5 months ago

Looking through the code it seems like the code needs a bit of refactoring, for example, creating a function just to get the xml string, then using that function inside load and then we can use that function inside a "patch to clipboard" function. I'd like to make it easy for users to share patches. I tried to implement this myself but there's so many layers to the load/save system it's difficult to add functionality.

elanhickler commented 5 months ago

I tried to implement it myself but for some reason #include <juce_gui_basics/juce_gui_basics.h> gives an error in clap-base-class.h, tried a handful of things to solve this, no luck. This is where the needed juce::SystemClipboard functionality comes in.

baconpaul commented 5 months ago

Yeah you can’t couple to juce there and especially not to juce gui

the editor class can implement copy to clipboard and then the bass class could implement xml as string is probably the pattern you want

elanhickler commented 5 months ago

would you use ui communication bundle and to/from UiQ?