QuantizationConfig

data class QuantizationConfig(val slopeThresholdCentsPerSec: Float = 150.0f, val maxDeviationCents: Float = 50.0f, val medianFilterWindowSamples: Int = 7, val applyMedianFilter: Boolean = true, val minSegmentDurationMs: Int? = null)

Configuration for pitch quantization (snapping to target intervals).

See also

PitchAnalysis.quantize

Constructors

Link copied to clipboard
constructor(slopeThresholdCentsPerSec: Float = 150.0f, maxDeviationCents: Float = 50.0f, medianFilterWindowSamples: Int = 7, applyMedianFilter: Boolean = true, minSegmentDurationMs: Int? = null)

Types

Link copied to clipboard
class Builder
Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Whether to apply the median pre-filter.

Link copied to clipboard

Maximum allowed distance to the nearest target interval.

Link copied to clipboard

Median filter window applied before quantization.

Link copied to clipboard

Minimum quantized segment duration; shorter runs are dropped. null = no minimum.

Link copied to clipboard

Maximum pitch-slope for a frame to be considered "stable" enough to quantize. Frames exceeding this are left unquantized (set to NaN → maps to unvoiced in the output contour).