LV2 support in Ardour 2.8.3
I'm currently porting my JACK client plugins to LV2 since the inclusion of externalUI support in ardour 2.8.3 now makes it look like this is a viable option. I have a working prototype of the EQ - but one or two aspects of the LV2 behaviour in ardour are making it difficult to wrap this thing up - I wonder if anyone can shed any light on this...
1) When I load an LV2 plugin, the 'Instantiate' function is called as I would expect. Then the 'Activate' function is called - however the plugin does not show as activated in Ardour e.g. it does not highlight in red until you click on it with the mouse.
2)When I 'Delete' the plugin I get the following sequence of calls:
I would expect just an optional 'Deactivate' if the plugin was active and a mandatory 'Cleanup'
3)When I 'Cut' the plugin - none of these functions get called so the plugin is still resident but 'untouchable' - and not shown in the Ardour mixer. If I add it again I now have two running but only one shows in the channel.
4)With regard to externalUI - When I double click the plugin to open the GUI I get UI_instantiate as I would expect followed by 'show' as I would also expect. However when I 'Delete' the plugin no UI calls are issued e.g. 'hide' and the UI Cleanup is never called. So the user interface does not know the plugin has been removed.
5) Only when I shut down Ardour with the plugin running does 'hide' get called.
These last two issues are making it very difficult to shut down or remove the plugin in a clean way without ending up with 'orphaned' GUIs after the plugin has been deleted. There are ways around it but it would be easier if the UI 'hide' and 'cleanup' functions were called at the correct times. Am I misunderstanding this or are there still one or two bugs in LV2 support to clear up?