Heya, I’m making a plugin that hosts other plugins and I`m trying to transform my current plugin loading functions from hosting VST3 into hosting LV2 but I’m finding it kinda difficulty, JUCE Forums only have 2 posts about the LV2PluginFormat class and none have real stuff about it.
My goal is to be able to simply supply a path and be able to load the LV2 plugin from it.
I’m aware that we need to create the plugin instance from it’s description. Here’s my current code (if I change LV2PluginFormat to VST3PluginFormat it works OK for VST3):
void PluginChainHostAudioProcessor::scanAndLoadPlugin(const juce::File& file) {
juce::LV2PluginFormat format;
juce::OwnedArray<juce::PluginDescription> foundPlugins;
format.findAllTypesForFile(foundPlugins, file.getFullPathName());
if (!foundPlugins.isEmpty()) {
loadPlugin(*foundPlugins.getFirst());
} else {
juce::Logger::writeToLog("No plugins found in file: " + file.getFullPathName());
}
}
The issue I’m facing is that LV2 plugins are actually a folder with files inside it. I’ve tried loading from the manifest.ttl and the pluginName.dll (on windows) and pluginName.so (on linux) but I’m not able to get the descriptions or any data from the LV2
