Python script to create QML files for LADSPA plugins automatically

tl;dr: Here is a script that creates the QML files needed by Shotcut to load LADSPA plugins from ‘analyseplugin’ output. It works for me so far. It might have bugs. Use it as a base to integrate more LADSPA plugins but check and test the output.

Background/how this was made: I wanted to use the DeepFilter LADSPA plugin. I couldn’t be bothered to write the QML code myself – this should be automated with some kind of script if possible. I couldn’t be bothered to write the script either, so I thought, this is a job for AI. So I wrote another script first which collects the output of ‘analyseplugin’ for a given plugin together with the existing QML files. I used this as a kind of training material for Grok. I told it to generate a script which generates the QML files automatically. I then fixed a few bugs and now it seems to work. I tested it with DeepFilter. I hope this will lead to more LADSPA plugins being integrated into Shotcut. Output of the script needs to be tested and adjusted if necessary. If you’re curious, here is the Grok chat I used to make the script. Cheers!