ShrutiOption

data class ShrutiOption(val hz: Float, val pitchClassIndex: Int, val pitchClassName: String, val noteLabel: String, val shiftSemitones: Float)

One viable shruti option for the student to pick from.

Options are produced by com.musicmuni.voxatrace.common.MusicTheory.alignShruti as part of ShrutiAlignmentResult.options. They span the range [-maxFineTuneSemitones, +maxFineTuneSemitones] of pitch class shifts relative to the lesson's reference key. Each option's hz is computed at the octave nearest to the student's anchor shruti, so the chips stay in the student's vocal range regardless of which key the lesson is in.

Constructors

Link copied to clipboard
constructor(hz: Float, pitchClassIndex: Int, pitchClassName: String, noteLabel: String, shiftSemitones: Float)

Properties

Link copied to clipboard
val hz: Float

The shruti frequency in Hz at the octave nearest to the student's anchor.

Link copied to clipboard

Pitch class plus octave (e.g., "C4", "G#3"), suitable for displaying to the student.

Link copied to clipboard

Chromatic index of the pitch class (0..11), where 0 = C, 1 = C#, ..., 11 = B.

Link copied to clipboard

Pitch class name in Western notation (e.g., "C", "C#", "D"). One of com.musicmuni.voxatrace.common.MusicTheory.NOTE_NAMES.

Link copied to clipboard

The audio shift (in semitones) that would be applied if this option is chosen. Equal to the index offset from the reference pitch class (-maxFineTuneSemitones..+maxFineTuneSemitones). Pass to SonixPlayerConfig.Builder().pitch(shiftSemitones) to build a player config that transposes the lesson audio to this option's pitch class.