correct Boundary Octaves
fun correctBoundaryOctaves(pitchesHz: FloatArray, hopMs: Int = 10, boundaryWindowMs: Float = 50.0f): FloatArray
Correct octave errors at phrase boundaries (onset/offset).
YIN sometimes detects the wrong octave at the start or end of a phrase where the signal is weaker. This corrects by comparing boundary regions to the stable interior of each phrase.
Return
Corrected pitch array
Parameters
pitches Hz
Input pitch array in Hz (-1 for unvoiced)
hop Ms
Hop size between frames in milliseconds (default: 10)
boundary Window Ms
How much of phrase edges to check (default: 50)