PeakStats

data class PeakStats(val referenceInterval: Float, val peakPosition: Float, val peakAmplitude: Float, val mean: Float, val median: Float, val stdDev: Float, val variance: Float, val coeffOfVariation: Float, val skewness: Float, val kurtosis: Float, val pearsonSkew2: Float)

Statistical summary of pitch distribution around a detected histogram peak.

Produced by PitchHistogram.computePeakStats, keyed by reference interval.

Constructors

Link copied to clipboard
constructor(referenceInterval: Float, peakPosition: Float, peakAmplitude: Float, mean: Float, median: Float, stdDev: Float, variance: Float, coeffOfVariation: Float, skewness: Float, kurtosis: Float, pearsonSkew2: Float)

Properties

Link copied to clipboard

Coefficient of variation (stdDev / mean).

Link copied to clipboard

Distribution kurtosis (3 = normal).

Link copied to clipboard
val mean: Float

Mean pitch (cents) of samples assigned to this peak.

Link copied to clipboard

Median pitch (cents) of samples assigned to this peak.

Link copied to clipboard

Histogram amplitude at the peak (proxy for duration/prominence).

Link copied to clipboard

Detected peak position in cents (the "actual" position).

Link copied to clipboard

Skewness coefficient: 3 × (mean − mode) / stdDev, where mode is the histogram peak position. (Named after Pearson's formula but uses mode, not median.)

Link copied to clipboard

Target interval in cents (the "expected" position).

Link copied to clipboard

Distribution skewness (0 = symmetric).

Link copied to clipboard

Standard deviation of the pitch distribution (cents).

Link copied to clipboard

Variance of the pitch distribution (cents²).