Converting a standalone juce app into a plugin?

Just a general question: how easy or hard is it to convert a standalone juce application into a VST/RTAS/AU plugin? I have simple standalone that uses a separate audio library for it’s processing and audio IO. I’ve used this library for plugins in the past whereby I route the audio to the library inside the main processing loop. I would like to develop the standalone app further but also allow the possibility of building it as a plugin too. Is this possible, any suggestions or tips are much appreciated.

Rory.

In theory, it should be very easy indeed!

I guess that’s all I need to hear. Here I go…

Hello,

Sorry to dig up an old topic, but does a standard procedure exists in the projucer ?

Thanks !

No, it’s not a thing the Projucer can automate. You will need to begin a new plugin project, and copy/change your standalone application code as needed into the plugin project.

Ok, thx for your answer.
I’m pretty noob, what part of the doc would be the more accurate for that kind of export ?

I don’t think the Juce documentation has anything about that. Generally the way you would port a standalone application to a plugin project is to change the GUI code to be part of the plugin’s AudioProcessorEditor subclass and the audio code would go into the plugin’s AudioProcessor subclass. That’s all manual work you will have to do, there’s no automated “export” procedure for it.

Jules’s “it should be very easy indeed” above was maybe a bit too optimistic statement… :slight_smile: If you already have a large/complicated standalone application, it might not really be that easy to do.

1 Like

Thank you. I’ll check how I can do that.
IMO, the logic and the GUI are separated even in a ‘standalone’ plugin and an application, so it should be a good idea to abstract the two thing in a consistent way for every program made by JUCE ? I don’t see exactly the point to separate (plugin + standalone) and ‘application’ ?
Cheers :slight_smile:

Plugins and applications are sufficiently different that Juce has different project templates and coding conventions for those. Even if an existing standalone application code base would be very cleanly designed (data model/audio/GUI separated, no or very little of use global/static variables etc), you can’t make a plugin out of that code completely mechanically. Plugins for example need to communicate with the host via plugin parameters to allow automation and other things. (You could in principle omit using the plugin parameters, but for the best end user experience, the plugins should expose as much of their functionality via the parameters as possible.)