UserShrutiDerivation

data class UserShrutiDerivation(val targetHz: Float, val source: UserShrutiDerivation.Source)

Result of com.musicmuni.voxatrace.common.MusicTheory.deriveUserShruti.

Computed from the user's natural speaking pitch (NSP) and most-recent vocal range. The policy: when the measured vocal-range span is wide enough for traditional Sa placement (≥ rangeThresholdSemitones, default 18), the derivation uses the continuous formula from Musicmuni research synthesis (§B7) — Sa = max(rangeLow + 7, nspMidi − 2) clipped to rangeHigh − 17, rangeHigh − 12. Below threshold (or when no vocal range is available), the formula degrades and the derivation falls back to NSP.

Constructors

Link copied to clipboard
constructor(targetHz: Float, source: UserShrutiDerivation.Source)

Types

Link copied to clipboard

Properties

Link copied to clipboard

Which input drove the derivation. UI uses this to render the appropriate Result-screen variant (e.g. "your shruti stays from your vocal range" vs "your shruti is set from your speaking pitch").

Link copied to clipboard

Frequency the user's practice shruti should anchor at. Caller maps this Hz to the nearest valid shruti id in their shruti map.