Create Standalone plugin with the latest Juce

Just trying to find out how I can go about compiling a standalone plugin with the current Juce. I've seen the old posts with reference to juce_StandaloneFilterWindow.h in the juce_audio_plugin_client module however these methods are old.

 

I would appreciate any help, thanks!

The standalone class is still in there, and should still work AFAIK.

I've been looking at this link

http://www.juce.com/forum/topic/plugin-standalone

It has the following code showing how to use juce_StandaloneFilterWindow.h,  however
setStorageParameters is no longer supported, also

#ifndef JucePlugin_Build_Standalone
#define JucePlugin_Build_Standalone 0
#endif
 

is no longer anywhere? I have already tried building stand alone for the jucedemo plugin, following the istructions outlined on that post but its not working, exe is build but when I try to run it nothing happens, but I don't get any errors. It would be appreciated if you can provide exact required steps inorder to build a standalone from a plugin with the latest juce? Cheers

You need to create an app project in the introjucer, not a plugin one, because obviously you can't just run a DLL on its own. Just create an app, add your source files to it, and the juce_StandadloneFilterWindow.h file.

Howdy

I'm in the same position as the thread starter...trying to convert a plugin to a standalone app (windows initially).

I'm going to document my progress to hopefully help out, and also get some pointers as to what I'm doing right or wrong.

1) First I created a new project with Introjucer, GUI Application, create main.cpp file.

2) Then I copied JUCE/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h into my app Source folder.

(I originally tried adding the module juce_audio_plugin_client, but I got errors that I need to select at least one kind of plugin, so I took Jules's advice literally and simply copied this StandaloneFilterWindow.h file into my source folder).

3) I got a bunch of build errors which I solved by adding the audio_utils module via IntroJucer

4) I tried again to build at this point, but I get an error : "Error    1    error C2065: 'JucePlugin_MaxNumInputChannels' : undeclared identifier    ...source\juce_standalonefilterwindow.h    69"

EDIT: Fixed this by adding

#define JucePlugin_MaxNumInputChannels 2
#define JucePlugin_MaxNumOutputChannels 2

...to the top of my copied version of juce_StandaloneFilterWindow.h. I could probably pull these from the plugin files once I add those.

So my app builds, I am now working on getting some audio device management and sending it to the plugin...I think ;]

Anyway that is where I made it and I'm trying to keep going from there in as small increments as possible. If I'm approaching this the wrong way, would appreciate the insight.

 

I should clarify that I DO have a plugin working already - was just trying to take small steps to getting the standalone going now.

I got somewhere...

First thing I realised I needed to physically copy the source and Standalone.h file via the finder, then add the source files + juce_StandaloneFilterWindow.h via the Introjucer Files page.


This was added to local copy of juce_StandaloneFilterWindow.h to quell the errors regarding input/output channels

#define JucePlugin_MaxNumInputChannels 2
#define JucePlugin_MaxNumOutputChannels 2

This was added to PluginProcessor.h to stop an error complaining about plugin name

#define JucePlugin_Name "JuceAudio1"

I added this to my Main.cpp file near the top.

#include "juce_standalonefilterwindow.h"

I also had to create a propertyset to use with StandaloneFilterWindow, so beneath that last line I also added the very simple:

PropertySet* props;

Add this to the Main.cpp initialise function (modified from the referenced thread...)

filterWindow = new StandaloneFilterWindow(String("TITLE"), Colours::black, props);
filterWindow->setTitleBarButtonsRequired(DocumentWindow::allButtons, false);
filterWindow->setVisible(true);
filterWindow->setResizable(true, true);

Added the shutdown cleanup code in shutdown function :

deleteAndZero(filterWindow);

Then right before the end of the Main.cpp class definitions, add this (again, per the code in the thread referenced):

private :
    StandaloneFilterWindow  *filterWindow;

 

I also had to set my PluginProcessor.cpp 'has Editor' variable back to true...looks like it's time to get into the gui side of things.

 

Anyway, this creates a Standalone window containing my plugin effecting whatever is set via the options menu...I verified that my processing is happening.

If it helps, since it is so disjointed in the above explanation, here is my main.cpp file (modified after creating a basic gui app via introjucer). This is incredibly bare-bones just trying to get the basics working before I start tweaking...


/*

This file was auto-generated by the Introjucer!

It contains the basic startup code for a Juce application.

==============================================================================
*/

#include “…/JuceLibraryCode/JuceHeader.h”
#include “juce_standalonefilterwindow.h”

PropertySet* props;

//==============================================================================
class JuceAudio1StandaloneApplication : public JUCEApplication
{
public:
//==============================================================================
JuceAudio1StandaloneApplication() {}

const String getApplicationName()       { return ProjectInfo::projectName; }
const String getApplicationVersion()    { return ProjectInfo::versionString; }
bool moreThanOneInstanceAllowed()       { return true; }

//==============================================================================
void initialise (const String& commandLine)
{
    // Add your application's initialisation code here..
    filterWindow = new StandaloneFilterWindow(String("TITLE"), Colours::black, props);
    filterWindow->setTitleBarButtonsRequired(DocumentWindow::allButtons, false);
    filterWindow->setVisible(true);
    filterWindow->setResizable(true, true);
}

void shutdown()
{
    // Add your application's shutdown code here..
    deleteAndZero(filterWindow);
}

//==============================================================================
void systemRequestedQuit()
{
    // This is called when the app is being asked to quit: you can ignore this
    // request and let the app carry on running, or call quit() to allow the app to close.
    quit();
}

void anotherInstanceStarted (const String& commandLine)
{
    // When another instance of the app is launched while this one is running,
    // this method is invoked, and the commandLine parameter tells you what
    // the other instance's command-line arguments were.
}

private :
StandaloneFilterWindow *filterWindow;
};

//==============================================================================
// This macro generates the main() routine that launches the app.
START_JUCE_APPLICATION (JuceAudio1StandaloneApplication)

 

Thank yall