TonalSegment

data class TonalSegment(val startSeconds: Float, val endSeconds: Float, val label: String? = null, val meanCents: Float? = null, val slopeCentsPerSec: Float? = null, val interceptCents: Float? = null)

A labelled time-span from melodic transcription.

Produced by PitchAnalysis.labelByMeanPitch and PitchAnalysis.fitLinearSegments. Distinct from calibra.model.Segment (which models song structure with index / lyrics / student timing).

See also

PitchAnalysis.labelByMeanPitch
PitchAnalysis.fitLinearSegments

Constructors

Link copied to clipboard
constructor(startSeconds: Float, endSeconds: Float, label: String? = null, meanCents: Float? = null, slopeCentsPerSec: Float? = null, interceptCents: Float? = null)

Properties

Link copied to clipboard
Link copied to clipboard

End time in seconds.

Link copied to clipboard

Linear regression intercept (cents). Null for label segments.

Link copied to clipboard

Interval label (e.g., "S", "R2", "C4"). Null for unlabelled.

Link copied to clipboard

Mean pitch in cents relative to tonic. Null for fit segments.

Link copied to clipboard

Linear regression slope (cents per second). Null for label segments.

Link copied to clipboard

Start time in seconds.