Bug 510047 - Wrong LADSPA control indexes when plugin exposes audio ports before control ports
Summary: Wrong LADSPA control indexes when plugin exposes audio ports before control p...
Status: NEEDSINFO WAITINGFORINFO
Alias: None
Product: kdenlive
Classification: Applications
Component: Audio Effects & Transitions (other bugs)
Version First Reported In: 25.08.1
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-29 12:30 UTC by sachzwang.kdebugs
Modified: 2026-01-31 11:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
diff showing my workaround to make deepfilter-ladspa plugin compatible with kdenlive (3.04 KB, text/plain)
2026-01-31 11:26 UTC, sachzwang.kdebugs
Details
output of the 'analyseplugin' tool for patched/unpatched plugin, with inline comments explaining the problem (4.11 KB, text/plain)
2026-01-31 11:37 UTC, sachzwang.kdebugs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sachzwang.kdebugs 2025-09-29 12:30:50 UTC
I had problems with several LADSPA plugins. Some seem to work, some don't. I dug a little deeper with the DeepFilterNet plugin: https://github.com/jacksongoode/DeepFilterNet

When changing control values in the Kdenlive UI, the DeepFilterNet plugin gets sent the wrong control indexes. The index is always off by 4, which I verified with a log statement in the plugin code. The DeepFilterNet plugin exposes 4 audio ports (stereo in, stereo out; index 0 to 3) and several control ports. The DeepFilterNet plugin works in Audacity. Other plugins, such als Rubber Band Stereo Pitch Shifter, work also in Kdenlive.

Rubber Band Stereo Pitch Shifter and other LADSPA plugins export control ports first, then audio ports.

Kdenlive seems to confuse the port indexes when plugins expose audio ports before control ports.


SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-39-amd64 (64-bit)
Graphics Platform: offscreen
Processors: 16 × AMD Ryzen 7 3700X 8-Core Processor
Memory: 47.0 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3060/PCIe/SSE2
Comment 1 sachzwang.kdebugs 2025-09-29 12:32:35 UTC
https://bugs.kde.org/show_bug.cgi?id=442197 seems related. "listplugins" and "analyseplugin" can be used to check the ordering of audio/control ports.
Comment 2 sachzwang.kdebugs 2025-09-29 13:03:19 UTC
I reordered the ports in the plugin to expose the control ports first, and the problem is gone. So I'm pretty sure the issue lies there. I don't know enough about Kdenlive internals to create a patch.
Comment 3 Bernd 2026-01-31 01:46:10 UTC
(In reply to sachzwang.kdebugs from comment #2)
> I reordered the ports in the plugin to expose the control ports first, and
> the problem is gone. So I'm pretty sure the issue lies there. I don't know
> enough about Kdenlive internals to create a patch.

How did you do that? If I understand what you did I may be able to work on the effect/filter. Which ones did not work?
Comment 4 sachzwang.kdebugs 2026-01-31 11:26:54 UTC
Created attachment 189091 [details]
diff showing my workaround to make deepfilter-ladspa plugin compatible with kdenlive
Comment 5 sachzwang.kdebugs 2026-01-31 11:37:23 UTC
Created attachment 189093 [details]
output of the 'analyseplugin' tool for patched/unpatched plugin, with inline comments explaining the problem
Comment 6 sachzwang.kdebugs 2026-01-31 11:42:10 UTC
(In reply to Bernd from comment #3)
> (In reply to sachzwang.kdebugs from comment #2)
> > I reordered the ports in the plugin to expose the control ports first, and
> > the problem is gone. So I'm pretty sure the issue lies there. I don't know
> > enough about Kdenlive internals to create a patch.
> 
> How did you do that?

The diff above shows how, but it's only a workaround in this particular plugin, not a fix for kdenlive.

> If I understand what you did I may be able to work on
> the effect/filter. Which ones did not work?

Any plugin that exposes audio ports before control ports, for example the DeepFilterNet plugin I mentioned above. What the plugin does is perfectly fine by LADSPA spec. The solution is not to change the LADSPA spec and all such LADSPA plugins. Kdenlive has to be changed so it can handle LADSPA plugins which expose audio ports before control ports.