LV2 Issues

Hi,
Pair of couples of issues in LV2 implementation:

On Projucer side:
Export with pluginChannelConfigs= set breaks LV2 plugin output.
To reproduce add pluginChannelConfigs={0,2} to AudioPluginDemo.jucer, build LV2 plugin, load in any host, try to play a sound.

Export with enablePluginBinaryCopyStep=1 breaks LV2 .ttl extraction.
To reproduce set enablePluginBinaryCopyStep=0 in AudioPluginDemo.jucer, build LV2 plugin.
I’ve compared exported Makefiles and this line is missed, when copy step is disabled:
JUCE_LV2_FULL_PATH := $(JUCE_OUTDIR)/$(JUCE_TARGET_LV2_PLUGIN)

On Host side:
Dropdown selectors in Generic parameters view shows wrong parameters.
To reproduce open any LV2 plugin with dropdown parameter, for example GitHub - x42/midimap.lv2: Rule based MIDI mapper plugin
JUCE:
LSP_JUCE

jalv:

audioProcessorParameterChangeGestureBegin() and audioProcessorParameterChangeGestureEnd()aren’t working:
To reproduce try to read gestures End or Begin with APH debug window:
LV2_gesture

I think this is a one-line fix in the manifest-generator code. We shouldn’t be enabling all buses there if the preferredChannelConfigurations are enabled.

Thanks, I must have overlooked this when testing. I also found some issues with the copy step for VST3 plugins, so I guess most people are leaving the copy step enabled when using the Makefile exporter.

Thanks, I think this is a scaling issue between normalised/non-normalised parameter values. I’ll get that fixed.

As far as I’m aware, the LV2 specification doesn’t provide any way of communicating begin/end gestures for patch-style parameters. I opened an issue with a potential implementation on the official LV2 repo, but it didn’t go anywhere: Add patch touched property (!29) · Merge requests · LV2 / lv2 · GitLab

Good to know. Thanks.

I pinged David Add patch touched property (!29) · Merge requests · LV2 / lv2 · GitLab

Did this ever get fixed?

I have a fix awaiting merge, but we have a bit of a review backlog at the moment.

The issues mentioned in this thread should now be fixed:

1 Like

Great, thank You!

Updating and will report back

Doesn’t seem to build on Linux.

Linking Organ - VST3
Compiling include_juce_audio_plugin_client_Standalone.cpp
Linking Organ - Standalone Plugin
Compiling include_juce_audio_plugin_client_LV2.cpp
make: *** No rule to make target '../../../../modules/juce/modules/juce_audio_plugin_client/LV2/juce_LV2TurtleDumpProgram.cpp', needed by 'build/intermediate/Release/juce_LV2TurtleDumpProgram_e74ea61b.o'.  Stop.
Error: Process completed with exit code 2.

You can try with this repo here: GitHub - FigBug/Organ

Yep, looks like Projucer adds two extra ../ in makefile for that source, if I change the Line:
$(JUCE_OBJDIR)/juce_LV2TurtleDumpProgram_58b6de4c.o: ../../../../../modules/juce/modules/juce_audio_plugin_client/LV2/juce_LV2TurtleDumpProgram.cpp
to
$(JUCE_OBJDIR)/juce_LV2TurtleDumpProgram_58b6de4c.o: ../../../modules/juce/modules/juce_audio_plugin_client/LV2/juce_LV2TurtleDumpProgram.cpp
it compiles

It happens when you use local juce modules path for juce_audio_plugin_client
if you set juce_audio_plugin_client to use global path, then exported Makefile is correct.

Thanks, hopefully that’s fixed here:

Nope, still no luck. Same Organ repo I linked above.

Compiling include_juce_audio_plugin_client_LV2.cpp
make: *** No rule to make target '../../../ci/bin/modules/juce/modules/juce_audio_plugin_client/LV2/juce_LV2TurtleDumpProgram.cpp', needed by 'build/intermediate/Release/juce_LV2TurtleDumpProgram_486ed8b9.o'.  Stop.

It works for some projects but fails for Organ:

JUCE v7.0.2

**********************************************************
Projucer 7.0.2  ---  Build date: Sep 14 2022
Log started: 14 Sep 2022 9:18:21am

Linux
CPU: 3892MHz  Cores: 8  32034MB
Invalid MIT-MAGIC-COOKIE-1 key
Authorization required, but no authorization protocol specified

Invalid MIT-MAGIC-COOKIE-1 key
Authorization required, but no authorization protocol specified

Loading project: /media/src/src/audio/Organ/plugin/Organ.jucer
Re-saving file: /media/src/src/audio/Organ/plugin/Organ.jucer
Finished saving: Xcode (macOS)
Finished saving: Visual Studio 2022
JUCE Assertion failure in juce_File.cpp:207
Illegal absolute path: modules/juce/modules/juce_audio_plugin_client/LV2/juce_LV2TurtleDumpProgram.cpp
JUCE Assertion failure in juce_File.cpp:207
Illegal absolute path: modules/juce/modules/juce_audio_plugin_client/LV2/juce_LV2TurtleDumpProgram.cpp
Finished saving: Linux Makefile

Ok, now it builds.

For the record, the fix (hopefully for good, this time) is here:

2 Likes

Thanks, it work now.

Another issue in host side with Gx plugins with guiext. For example GitHub - brummer10/GxBoobTube.lv2: The BoobTube is a little tube boost pedal simulation, it's a variation of the ValveCaster. It adds some overdrive and tube compression along with boosting the signal
It shows only generic UI. If I change lines ingx_boobtube.ttl:

-@prefix guiext: <http://lv2plug.in/ns/extensions/ui#>.
+@prefix ui: <http://lv2plug.in/ns/extensions/ui#>.
-  guiext:ui <http://guitarix.sourceforge.net/plugins/gx_boobtube_gui#_boobtube_>;
+  ui:ui <http://guitarix.sourceforge.net/plugins/gx_boobtube_gui#_boobtube_>;

and:

 <http://guitarix.sourceforge.net/plugins/gx_boobtube_gui#_boobtube_>
-  a guiext:X11UI;
-  guiext:binary <gx_boobtube_ui.so>;
-        lv2:extensionData guiext::idle ;
-        lv2:requiredFeature guiext:makeResident;
+  a ui:X11UI;
+  ui:binary <gx_boobtube_ui.so>;
+        lv2:extensionData ui:resize ;
+        lv2:extensionData ui:idleInterface ;
+        lv2:optionalFeature ui:idleInterface ;

then GUI draws in APH, though resizing is not working, while all is fine in Jalv.

kindly bump^

I think that this is not working because JUCE hosts don’t support the makeResident feature.

I think this plug-in’s manifest is broken - I don’t see any makeResident feature in the UI documentation. There’s makeSONameResident, but that’s deprecated, so I don’t think it’s worthwhile adding support to JUCE. As well as that, I think guiext::idle is incorrect. It includes an extra :, and according to the docs, the feature is called idleInterface, and it must be added as an optional or required feature as well as listed as extension data.

With all that in mind, I’d recommend patching the plug-in to fix these issues. Just modifying the manifest may not be enough; if the plug-in really needs the “makeResident” feature, then the binary must be updated to drop this requirement in order for the plug-in to work in a JUCE host.

For what it’s worth, I tried a handful of plug-ins from the lv2-guitarix-plugins package on my Fedora system. All of the UIs I tested opened in the AudioPluginHost without problems.