TesseraAgility

Public facade for vocal agility analysis.

What is Vocal Agility?

Agility measures how dynamically a singer varies pitch — fast ornaments, gamakas, runs. The 10-stage pipeline computes log-derivative RMS of pitch (captures speed of pitch change) and oscillation RMS (captures regularity), then a linear classifier maps these to a 0–1 agility score.

When to Use

ScenarioUse ThisWhy
Score vocal agility from a recordingYesOne-shot computeScore(contour)
Inspect the pipeline intermediate (RMS, oscillation, smoothed pitch)YescomputeContour + explore AgilityContour
Per-segment agility in a multi-segment lessonYesPass segments as List<Pair<Float, Float>>
Multi-metric analysisUse Tessera or TesseraSession

Quick Start

Kotlin

val score = TesseraAgility.computeScore(contour)
println("Agility: ${score.scores.first()}")

// Per-segment scoring
val segments = listOf(0f to 5f, 5f to 10f)
val segScores = TesseraAgility.computeScore(contour, segments = segments)

Swift

let score = TesseraAgility.computeScore(contour: contour)
print("Agility: \(score.scores.first ?? 0)")

Common Pitfalls

  1. Contour must have ≥ 2 samples: Throws per ADR-022.

  2. Scores below 0.5 indicate little agility: The sigmoid output ranges 0–1; a monotone contour scores near 0. Meaningful agility pushes scores above ~0.5.

  3. Segment times are in seconds: Pair(startSec, endSec). Segments with no data points in range score near 0 (not 0.5). Only zero/negative- duration segments return an explicit 0.5 fallback.

See also

The 10-stage pipeline intermediate

Result with per-segment or single score

Configuration (only DEFAULT preset currently)

For multi-metric batch analysis

Functions

Link copied to clipboard
fun computeContour(contour: PitchContour, config: AgilityConfig = AgilityConfig.DEFAULT): AgilityContour

Compute the agility contour (10-stage pipeline intermediate).

Link copied to clipboard
fun computeScore(agilityContour: AgilityContour, segments: List<Pair<Float, Float>>? = null, config: AgilityConfig = AgilityConfig.DEFAULT): AgilityScore

Compute agility score from a pre-computed contour.

fun computeScore(contour: PitchContour, segments: List<Pair<Float, Float>>? = null, config: AgilityConfig = AgilityConfig.DEFAULT): AgilityScore

Compute agility score directly from a pitch contour (convenience).