Does anyone have an up-to-date template or instructions on how to go about making an app that targets plugins and standalone situations?
If not it could it be a good idea for a tutorial? Or is it too much a context-dependent task?
Cheers,
C
Does anyone have an up-to-date template or instructions on how to go about making an app that targets plugins and standalone situations?
If not it could it be a good idea for a tutorial? Or is it too much a context-dependent task?
Cheers,
C
Just use the juce_StandaloneFilterWindow.h:
https://github.com/julianstorer/JUCE/blob/master/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h
Here are the steps I'd take if I wanted to wrap an existing plugin project into a standalone application.
#include "juce_StandaloneFilterWindow.h.h"PropertySet* defaultPropSet = nullptr;
class StandaloneFilter : public JUCEApplication
{
public:
StandaloneFilter()
{
}
void initialise(const String& commandLineParameters)
{
filterWindow = new StandaloneFilterWindow (“FilterApp”,
Colours::black,
defaultPropSet,
true);filterWindow->setTitleBarButtonsRequired (DocumentWindow::allButtons, false); filterWindow->setVisible (true); //turn off resizeable... filterWindow->setResizable(true, true); juce::Thread::setCurrentThreadName("appName"); } void shutdown() { filterWindow = 0;// = nullptr; } const String getApplicationName() { return String("appName"); } const String getApplicationVersion() { return String("0.0"); } bool moreThanOneInstanceAllowed() { return true; }
private:
ScopedPointer<StandaloneFilterWindow> filterWindow;
};
START_JUCE_APPLICATION (StandaloneFilter)
Note that I haven't tested that .cpp code, so you may need to make some adjustments. I'm also trying to remember how to do all of this off the top of my head so please excuse anything I may have forgotten to mention.
Very useful Rory and it seems well explained, I haven't tried it yet but will do asap. Hopefully others will find it useful as well.
Works like a charm!
Also I had to copy across the AppConfig.h settings related to the plugin into to the standalone AppConfig.h ...
That's right, I forgot about that. Glad to know it's working.
I’m looking to do this the other way around - make a plugin version of a standalone app. Any more recent recommendations on how best to go about that?
Sorry, I’ve always made a point of creating plugins that can be encapsulated in a standalone than the other way around. Even my standalone apps are basically plugins under hood.
@Rory would you recommend this approach then? Thing is there are certain aspects of the UI that would need to change e.g. removing audio/midi device selector in the plugin.
I can see it would require a bit of code reorganisation to turn it into a plugin…
I think it may, but it depends on how your structured your code. To be honest, in over 10 years of using JUCE I’ve never once created a standalone app
I guess others will have a better idea of how best to do this.
Could this be used with a vst, not created with juce?