I've made a computed
test file to better illustrate the specific nerd issues I'm trying to solve. Origin was a mono pink noise, left and right channels filtered by 1st-order lowpasses at around 300kHz, with a 10% difference between them (like a 10% difference in cable capacitance would produce), all other effects like static gain difference, gain drift, propagation delay etc neglected.
Setup file is attached.
Manual best fit for phase null was acheived with 0.00225 samples shift (with L:reference, R:compare), with the test file being noise the trend-lining issue was mitigated:
View attachment 108292
But of course the tiny magnitude difference isn't yet corrected, we see the (in this case) rising slope:
View attachment 108294
(the general offset comes from the computed gain correction factor of 0.999982674755387)
In the spectrum of the residual we see comb-filtering and that's also exactly how it sounds:
View attachment 108298
All of this is expected as the constant offset (==constant group delay) correction is only an approximation of the not
truly constant group delay delta, and in general we are not undoing the general transfer function mismatch, with the magnitude part missing.
Quick shot with LTspice :
View attachment 108300
Looks like a reasonable match (0.00225@ 48kHz is 47ns vs 62ns, and the magnitude factors @20kHz are also close, both being ~5mdB).
Basically, I would think all the data needed for a transfer function matching is available, using the (smoothed) gain and phase delta curves to create an inverse filter undoing it. When the input data is "good enough" (high energy / low noise, dense full spectrum) and ref and comp being already really close (sample-sync'd / no clock drift, low gain drift) to provide meaningful raw data to obtain reasonable smoothing, I would think it is possible to do such a "linear transfer function matching" to fully expose the part of the residual which isn't explained by simple static transfer function delta.
PS: If it is of any help, I could upload a test file with artifical known gain drift, also supplying the modulator file (1.0 + some heavily low-passed 1/f noise for something like 0.1%/0.01dB range of deviation).