quantize

fun quantize(contour: PitchContour, tonicHz: Float, targetIntervalsCents: FloatArray, config: QuantizationConfig = QuantizationConfig.DEFAULT): PitchContour

Quantize a pitch contour to the nearest target intervals where the pitch is stable.

Return

New PitchContour with quantized pitch values (unvoiced where unstable)

Parameters

contour

Input pitch contour

tonicHz

Tonic frequency in Hz

targetIntervalsCents

Target interval values in cents

config

Quantization configuration