Subclassing plugin wrapper code


#1

I have some additions to the AU and VST wrapper code for preset management. I currently have these implemented by patching juce_AU_Wrapper.mm. It would be great if I could make my own subclass of JuceAU and not have to patch, but this seems impossible because the entry point is defined directly in the file (as JUCE_COMPONENT_ENTRY).

Jules, do you have an idea how this code can be extended?

Currently my best idea is to #ifdef out the JUCE_COMPONENT_ENTRY on AU and the pluginEntryPoint stuff on VST. Someone making subclasses would be responsible for adding their own entry point code to make a MyJuceAU / MyJuceVSTWrapper instead of the existing ones. But there are enough #ifdefs around already, I don’t like the added cruft.

You could also add hooks to extend individual methods, but this would take more coordinated effort.

My changes (preset management stuff) are probably useful ones that could be rolled into the trunk, but this doesn’t solve the problem of making the thing extensible in general.


#2

The wrapper classes were never designed to be extensible, so not really sure what to suggest there. If you’ve got suggestions for features that would actually make a good addition to the wrapper, it might be something I could add.


#3

[quote=“madronalabs”]I have some additions to the AU and VST wrapper code for preset management. I currently have these implemented by patching juce_AU_Wrapper.mm. It would be great if I could make my own subclass of JuceAU and not have to patch, but this seems impossible because the entry point is defined directly in the file (as JUCE_COMPONENT_ENTRY).
[/quote]

You should make sure that the changes will work with the RTAS wrapper as well, as you will probably want Aalto to run in Pro Tools someday.

[quote]
My changes (preset management stuff) are probably useful ones that could be rolled into the trunk, but this doesn’t solve the problem of making the thing extensible in general.[/quote]

I have a thread going on suggested changes to the Juce example plugin. It would be nice to have cross-platform preset management stuff in there, or in the Juce plugin wrappers.

Sean Costello


#4

OK. In that case let’s work on our extensions and I won’t worry about trying to subclass everything neatly. Jules can decide what he wants to incorporate, if anything, and I will come back to the patching thing afterwards.

Oh, RTAS too of course.