Tessera
Multi-metric batch analysis facade — breath, agility, and vocal range from a single PitchContour.
What is Multi-Metric Analysis?
Given a pitch contour from a vocal performance, Tessera computes all requested voice metrics in one pass, sharing the contour data across metrics instead of re-extracting it. The result bundles nullable fields for each metric — null means "not requested" or "insufficient data".
When to Use
| Scenario | Use This | Why |
|---|---|---|
| Profile a singer from one recording (batch) | Yes | All metrics in one call |
| Stream metrics from a live recording | No | Use TesseraSession |
| Only one metric needed | Consider individual facades | TesseraBreath, TesseraAgility, TesseraRange |
Quick Start
Kotlin
val result = Tessera.analyze(contour)
println("Breath control: ${result.breath?.controlScore}")
println("Agility: ${result.agility?.scores?.firstOrNull()}")
println("Range: ${result.vocalRange?.range?.octaves} octaves")
// Specific metrics only
val breathOnly = Tessera.analyze(contour, setOf(TesseraMetric.BREATH))Swift
let result = Tessera.analyze(contour: contour)
print("Breath control: \(result.breath?.controlScore ?? 0)")
print("Agility: \(result.agility?.scores.first ?? 0)")
print("Range: \(result.vocalRange?.range.octaves ?? 0) octaves")Common Pitfalls
Contour must have ≥ 2 samples: Throws
IllegalArgumentExceptionper ADR-022 on empty or single-sample contours.Null metric meanings differ by type: A null
breathoragilitymeans the metric was not requested (they never return null for insufficient data — the ≥ 2 samples guard fires first). A nullvocalRangemeans not requested OR insufficient voiced data for range estimation.For streaming, use TesseraSession: This facade processes the entire contour in one call. Feeding it incrementally rebuilds from scratch each time.
See also
Streaming counterpart for live recording
Individual breath facade
Individual agility facade
Individual range facade
Enum for selecting which metrics to compute
The multi-metric result type
Functions
Analyze a pitch contour for the requested voice metrics.