Thanks very much for the replies. I’ve now implemented two LV2 plugins successfully but without the GUI part so far.
I have made the latency correction work for a simple 40 sample delay and the plugin analyser that is built in to Ardour then reports flat phase response instead of a fixed group delay plotted as a sawtooth. That is all correct.
But I have a slight problem with the plugin analyser. One of my plugins contains a hilbert transform with 40 sample latency. To narrow down the problem I made a temporary plug in which is just the hilbert transform on its own.
This has a zero at DC and corresponding low-frequency roll off. It seems to be having its frequency response plotted incorrectly by the plugin analyser white line plot, which shows gain at low frequencies and no roll off. But the roll off plotted on the ‘live signal’ spectogram is correct and the sound is correct.
Cutting this example down to just a 40 sample delay followed by two taps of opposite polarity and equal magnitude, a function that is a just a high pass filter after latency correction, still has the wrong plot.
I assume that the plugin analyser cannot cope with units that have significant latency, even if this is reported?
Thanks for any pointers.