estimateTuningOffset

fun estimateTuningOffset(contour: PitchContour, refFreqHz: Float, centTolerance: Float = 50.0f): Float

Estimate global tuning offset by aligning a pitch histogram with the 12-TET grid.

Return

Estimated tuning offset in cents

Parameters

contour

Input pitch contour

refFreqHz

Reference frequency in Hz (typically tonic)

centTolerance

Half-width of window around each 12-TET interval for scoring