Plugin Directory Scanner Question

Hi all,

I’m trying to populate a KnownList with AU plugins from the default folder, however, the consequent popup list isn’t being filled with any values?

Am I missing a method from the pluginDirectoryScanner potentially, or misunderstanding the search path?

    // Create object of list of known plugins.
    KnownPluginList knownPluginList;
    // Specifiy the plugin format (AU) and search path.
    AudioUnitPluginFormat pluginFormat;
    FileSearchPath searchPath ("~/Library/Audio/Plug-Ins/Components");
    // Create scanner for  directory and populate plugin list.
    PluginDirectoryScanner pluginDirectoryScanner (knownPluginList,
                                                   true /*is reccursive*/,
                                                   true /*is asyncronous*/);

    // Create popup menu and fill with known plugins
    PopupMenu m;
    knownPluginList.addToMenu (m, KnownPluginList::defaultOrder);
    const int choice =;
    // Oh no... they aren't being shown, nothing in list :(


You will actually have to scan with the PluginDirectoryScanner in order for the KnownPluginList to be populated, it’s not enough to just create the scanner instance.

So, something like :

void scanPlugins(PluginDirectoryScanner& scanner)
    String plugname;
    while (true)
        String nextname = scanner.getNextPluginFileThatWillBeScanned();
        if (scanner.scanNextFile(true, plugname)==false)

String doAUPluginScan(KnownPluginList& kpl)
    AudioUnitPluginFormat aupf;
    PluginDirectoryScanner scanner(kpl, aupf, aupf.getDefaultLocationsToSearch(), true, File());
    return String();

However, if you are working with a GUI application, it’s probably easiest to deal with the plugin scanning with the JUCE PluginListComponent. (I had to write the manual scanning code for a command line program which obviously can’t use the GUI component.)

1 Like