openmixer — generated API reference
    Preparing search index...

    Function coarseDelayOf

    • The COARSE delay: where the cross-correlation of the pair peaks.

      The cross-spectrum IS the correlation, one inverse transform away — nothing is measured again and nothing new is asked of the kernel. Three things about how it is taken here:

      It is the ANALYTIC correlation, not the real one. Only the positive-frequency bins are transformed, so the result is complex and its MAGNITUDE is the correlation's envelope — smooth, single-lobed, and blind to polarity. A real correlation carries the band's carrier on top of that envelope, and an INVERTED pair puts its peak DOWNWARD: an argmax over a real correlation would find a neighbouring carrier crest instead, half a period from the truth. Polarity is the fit's own separate answer (spec §1) and must not disturb the delay.

      Parabolic interpolation across the peak and its two neighbours gives the sub-sample position. The envelope's main lobe spans fftSize / (kHi - kLo + 1) samples — some 25 for both bands this desk uses — so three samples straddling its top describe it well, and the anchor lands inside a sample instead of on one.

      Only the band's bins are transformed. The anchor and the slope that refines it must be answers about the SAME data, or the residual they compose is a difference between two questions.

      null when the band carries no energy at all — the same absence the fit reports as no-shared-energy.

      Parameters

      Returns CoarseDelay | null