PitchPoint

data class PitchPoint(val pitch: Float, val confidence: Float, val timeSeconds: Float = 0.0f)

A pitch detection result or timestamped pitch sample.

Used for both single-frame detection output and as elements in pitch contours.

Constructors

Link copied to clipboard
constructor(pitch: Float, confidence: Float, timeSeconds: Float = 0.0f)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Tuning status relative to nearest musical note

Properties

Link copied to clipboard

Cents deviation from nearest note (-50 to +50). Returns 0 if not singing.

Link copied to clipboard

Detection confidence (0.0-1.0), derived from YIN aperiodicity

Link copied to clipboard

True if singing/voiced audio was detected

Link copied to clipboard
Link copied to clipboard

MIDI note number (e.g., 69 for A4). Returns -1 if not singing.

Link copied to clipboard
val note: String?

Musical note name (e.g., "A4", "C#5"). Returns null if not singing.

Link copied to clipboard

Detected pitch in Hz, or -1.0 if no pitch detected

Link copied to clipboard

Detection reliability (0.0-1.0). Higher = more confident.

Link copied to clipboard

Timestamp in seconds (0 when not relevant, e.g., single-frame detection)

Link copied to clipboard

Tuning status relative to nearest note