SessionConfig

data class SessionConfig(val autoAdvance: Boolean = true, val scoreThreshold: Float = 0.0f, val maxAttempts: Int = 0, val resultAggregation: ResultAggregation = ResultAggregation.LATEST, val hopSize: Int = 320, val autoPhaseTransition: Boolean = true, val autoSegmentDetection: Boolean = true, val playInterSegmentAudio: Boolean = false, val scoreCalibration: ScoreCalibration = ScoreCalibration.IDENTITY)

Configuration for a CalibraLiveEval session.

Note: Pitch detection is configured separately via PitchDetectorConfig and the detector is injected into CalibraLiveEval.create.

For student key transposition, use com.musicmuni.voxatrace.calibra.CalibraLiveEval.setStudentKeyHz at runtime - this allows key adjustment mid-lesson.

Usage

// Tier 1: Use presets
val session = CalibraLiveEval.create(reference, SessionConfig.PRACTICE, detector)

// Tier 2: Use Builder
val config = SessionConfig.Builder()
.preset(SessionConfig.PRACTICE)
.scoreThreshold(0.6f)
.build()

// Tier 3: Use .copy()
val config = SessionConfig.PRACTICE.copy(maxAttempts = 5)

Constructors

Link copied to clipboard
constructor(autoAdvance: Boolean = true, scoreThreshold: Float = 0.0f, maxAttempts: Int = 0, resultAggregation: ResultAggregation = ResultAggregation.LATEST, hopSize: Int = 320, autoPhaseTransition: Boolean = true, autoSegmentDetection: Boolean = true, playInterSegmentAudio: Boolean = false, scoreCalibration: ScoreCalibration = ScoreCalibration.IDENTITY)

Types

Link copied to clipboard
class Builder

Builder for SessionConfig.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Automatically advance to next segment when current ends (default true)

Link copied to clipboard

Automatically transition LISTENING → SINGING in singafter mode (default true)

Link copied to clipboard

Automatically detect segment end from player time (default true)

Link copied to clipboard

Hop size between frames in samples (default 320 = 20ms at 16kHz)

Link copied to clipboard

Max attempts before forced advance (0 = unlimited)

Link copied to clipboard

Play authored reference audio that sits between the playhead and a starting segment (a lesson intro at session start, a rest / count-in / interlude between segments) instead of seeking over it. Capture and scoring of the segment begin when playback reaches its start. Applies to auto-advance and to startPracticingSegment; explicit navigation (seekToSegment, retry) still jumps straight to the segment. Default false (all such audio is skipped, the historical behavior).

Link copied to clipboard

How to aggregate multiple attempts into final score (default LATEST)

Link copied to clipboard

Curve applied (exactly once, at the scoring seam) to every raw score the session produces — segment results, the session score, and the scoreThreshold comparison. Default ScoreCalibration.IDENTITY (raw scores pass through, the historical behavior). See ScoreCalibration for presets and the custom-curve contract.

Link copied to clipboard

Min score to auto-advance (0 = disabled, advances regardless of score). Compared against the CALIBRATED score (after scoreCalibration), the same number surfaced in results — so the threshold lives in the units the user sees.