SvaraTemplate

data class SvaraTemplate(val cents: FloatArray, val symbols: List<String>)

A raga's measured intonation grid: the cents (relative to tonic) of each svara the raga uses, with its label.

Produced by com.musicmuni.voxatrace.tona.PitchAnalysis.computeSvaraTemplate from a pitch contour, a tonic, a genre, and explicit svara names. The cents are data-driven: where the histogram shows a clear peak near a svara's theory position the measured peak cents are used; otherwise the theory default (12-TET for Hindustani, just-intonation for Carnatic) fills in. The grid is extended across octaves, so the same svara appears multiple times with octave markers on its symbols, following the VoxaTrace convention (a combining dot above the letter per octave up, below per octave down; e.g. S, , ).

Consumed by com.musicmuni.voxatrace.tona.PitchAnalysis.transcribeNotes to label notes. cents and symbols are parallel arrays of equal length, sorted ascending by cents.

Constructors

Link copied to clipboard
constructor(cents: FloatArray, symbols: List<String>)

Properties

Link copied to clipboard

Svara positions in cents relative to tonic (across octaves).

Link copied to clipboard
val size: Int

Number of svara entries (across all octaves).

Link copied to clipboard

Svara labels, parallel to cents (e.g., "S", "g", "Ṡ", "ṇ").

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int