Saturday 11 May 2013

Plug-In Editors

A plug-in editor is the plug-in's custom GUI. It is the interface through which we edit the plug-ins parameters.

As mentioned previously we are not going to deal with doing a custom GUI just yet. This means we need to tell the host that it should make its own interface for our plug-in.  It does this using all the information about the plug-in's parameters we gave it earlier.

Look at the code in 'PluginProcessor.cpp' and find this bit:
bool GainPluginAudioProcessor::hasEditor() const
{
    return true; // (change this to false if you choose to not supply an editor)
}
There is even a comment here to tell us what we need to do. We will do what it says.

I'll just give a quick overview of the bits present in this function you may not have seen before.

The return type of the function is 'bool'. This is a Boolean value (either 'true' of 'false'). So the host can ask our plug-in if it has an editor, using the 'hasEditor' function. All the plug-in needs to do is return 'true' or 'false'. We will change it to 'false'. The code should now look like this:
bool GainPluginAudioProcessor::hasEditor() const
{
    return false; // (change this to false if you choose to not supply an editor)
}
That is all we need to change in our code. Save this change to your project. The next job is to build the plug-in.

Have a nice day now!
Sean

1 comment:

  1. Whooo!!! thanks for the tutorial... now I made the same plugin that in the tutorial but with a gui!! let me know if you want the source code

    ReplyDelete