ShrutiSense: Microtonal Modeling and Correction in Indian Classical Music
Rajarshi Ghosh, Jayanth Athipatla · 2025
Read ShrutiSense: Microtonal Modeling and Correction in Indian Classical Music by Rajarshi Ghosh, Jayanth Athipatla (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2508-01498.txt.
Introduction
Rajarshi Ghosh and Jayanth Athipatla present a 2025 paper on Indian classical music and computers. The music uses 22 microtones, called shrutis, per octave. That system gives fine pitch nuance past the twelve-tone Western scale. Standard music software flattens those microtones and ignores raga grammar. Raga rules govern how melodies may move. Their system, called ShrutiSense, handles pitch at the symbolic level.
Two tasks anchor the work: fixing westernized or corrupted pitch lines, and filling missing notes. A finite-state tool fixes lines inside the shruti frame. A grammar-bound hidden Markov model fills gaps under raga rules. Tests on simulated data check both tools. Musicians and archivists get software that respects the tradition's own pitch logic. Digitizing heritage music without flattening its core traits is the broader prize.
Catalog record
| CREATOR | Rajarshi Ghosh, Jayanth Athipatla |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 20 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2508-01498
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
ShrutiSense: Microtonal Modeling and Correction in Indian Classical Music Rajarshi Ghosh, Jayanth Athipatla Abstract Indian classical music relies on a sophisticated microtonal system of 22 Shrutis (pitch intervals), which provides expressive nuance beyond the 12-tone equal temperament system. Existing symbolic music processing tools fail to account for these microtonal distinctions and culturally-specific raga grammars that govern melodic movement. We present ShrutiSense , a comprehensive symbolic pitch processing system designed for Indian classical music, addressing two critical tasks: (1) correcting westernized or corrupted pitch sequences, and (2) completing melodic sequences with missing values. Our approach employs complementary models for different tasks: a Shruti-aware Finite-State Transducer (FST) that performs contextual corrections within the 22-Shruti framework and a Grammar-Constrained Shruti Hidden Markov Model (GC-SHMM) that incorporates raga-specific transition rules for contextual completions. Comprehensive evaluation on simulated data across five ragas demonstrates that ShrutiSense (FST model) achieves 91.3% Shruti classification accuracy for correction tasks, with example sequences showing 86.7–90.0% accuracy at corruption levels of 0.2 to 0.4. The system exhibits robust performance under pitch noise up to ±50 cents, maintaining consistent accuracy across ragas (90.7–91.8%), thus preserving the cultural authenticity of Indian classical music expression. 1 Introduction Indian classical music represents one of the world’s most sophisticated microtonal systems, employing 22 distinct pitch intervals called Shrutis within each octave Muni Circa 200 BCE–200 CE . Unlike Western music’s 12-tone equal temperament, this system provides finer granular control over pitch relationships, enabling the subtle melodic ornamentations and emotional expressions that characterize ragas. The concept of Shruti, first formalized in Bharata’s Natya Shastra (circa 200 BCE–200 CE), divides the octave into 22 mathematically precise intervals, each serving specific melodic and emotional functions within different raga contexts. 1.1 Problem Definition and Real-World Applications Processing Indian classical music poses distinct challenges for contemporary digital music technologies due to its microtonal structure and grammar-rich melodic design. These challenges appear across multiple real-world domains. In digital music education, online platforms and mobile applications need precise pitch feedback for learners practicing ragas, yet existing Western-oriented tools often miscorrect notes in ways that violate raga grammar. For archival digitization, historical recordings and manuscripts require symbolic transcription methods that retain cultural nuance, but most tools reduce pitch data to the 12-tone equal temperament (12-TET) system, erasing vital microtonal content. Performance assistance technologies, such as live accompaniment and tuning systems, demand real-time correction algorithms that honor microtonal aesthetics without compromising melodic flow. Similarly, music information retrieval platforms, such as search engines and recommendation systems, benefit from culturally-aware analyses capable of identifying raga-specific structures and pitch relationships. To support these domains, ShrutiSense introduces two key computational tasks: pitch correction, which transforms noisy or Western-biased pitch sequences into culturally appropriate output conforming to Shruti resolution and raga grammar; and melodic completion, which fills in missing pitches using contextual musical cues and embedded cultural knowledge to restore and enhance symbolic content for interactive composition, transcription, and preservation purposes. 1.2 Technical Contributions Our primary contributions include: (1) formalization of the 22-Shruti system within a computational framework with explicit raga grammar encoding, (2) development of grammar-constrained probabilistic models that balance pitch accuracy with cultural authenticity, (3) comprehensive evaluation framework demonstrating superior performance over naive quantization approaches, and (4) open-source implementation 1 1 1 The code is available at https://github.com/rajarshi51382/microtonal-carnatic enabling reproducible research in computational ethnomusicology. 2 Mathematical Foundations 2.1 Shruti Theory and Scale Selection We formalize the 22-Shruti system as a logarithmic frequency division of the octave. Let f_{0} denote the fundamental frequency of the tonic ( shadja ). Following the theoretical framework established by Bhatkhande 1934 , we define each Shruti s_{i} as f_{i}=f_{0}\cdot 2^{c_{i}/1200} where c_{i} represents the cent value of the i -th Shruti relative to the tonic. Our implementation uses the widely-accepted 22-Shruti scale with cent values: \mathbf{C}=\{0,90,112,182,204,294,316,386,408,498,520,\\ 590,612,702,792,814,884,906,996,1018,1088,1110\} (1) This scale selection represents a consensus among contemporary musicologists and provides computational tractability while preserving essential microtonal distinctions. Alternative Shruti theories exist (e.g., Sarangadeva’s 22-Shruti system, Ramamatya’s modifications), but our chosen scale aligns with modern performance practice and digital applications. The minimum distinguishable pitch interval is: \delta_{\text{shruti}}=\min_{i,j}|c_{i}-c_{j}|,\quad i\neq j=22\text{ cents} (2) 2.2 Raga Grammar Construction We model each raga as a directed graph G=(S,T) where S=\{s_{1},s_{2},\ldots,s_{22}\} is the set of Shruti positions and T\subseteq S\times S represents permissible transitions between Shrutis. The raga grammar construction process involves classical treatises defining arohana (ascending) and avarohana (descending) scales, vadi-samvadi relationships, and varjya (forbidden) notes. Our current implementation covers five major ragas: Yaman, Bhairavi, Bilaval, Kalyan, and Khamaaj, representing diverse tonal structures and transition patterns. The grammar function G(s_{i},s_{j}) is defined as: G(s_{i},s_{j})=\begin{cases}1&\text{if }(s_{i},s_{j})\in T\\ 0&\text{otherwise}\end{cases} (3) Transition weights incorporate both theoretical and empirical preferences: w(s_{i},s_{j})=G(s_{i},s_{j})\cdot\exp(-\alpha\cdot d(s_{i},s_{j}))\cdot\text{pakad\_bonus}(s_{i},s_{j}) (4) where d(s_{i},s_{j}) represents interval distance, \alpha=0.1 controls stepwise preference, and pakad_bonus provides additional weight for characteristic phrase patterns. 3 Data Collection and Preprocessing 3.1 Dataset Construction We synthesized 1,000 pitch sequences from canonical raga grammar rules (without model-generated sequences), then applied controlled corruption patterns simulating common digitization errors such as random note substitutions (10-50% of sequence), and missing value patterns (10-50% missing rates). ShrutiSense accepts multiple input formats, including MIDI data (Note-on events converted to cent deviations from tonic), symbolic notation (manual pitch annotations in cents or Shruti labels), and audio-derived pitch (fundamental frequency tracks from audio analysis). The preprocessing pipeline normalizes all inputs to cent values relative to a detected or specified tonic, handles octave disambiguation, and segments long sequences into musically meaningful phrases (typically 8-32 notes). 4 Grammar-Constrained Hidden Markov Model The Grammar-Constrained Shruti Hidden Markov Model (GC-SHMM) is defined over a state space S=\{s_{1},s_{2},\ldots,s_{N}\} , where N represents the number of active Shrutis in a given raga, typically ranging from 7 to 10. The observation sequence O=\{o_{1},o_{2},\ldots,o_{T}\} contains noisy pitch values measured in cents. Emission probabilities are modeled using Gaussian distributions centered around the theoretical frequencies of each Shruti, with variance \sigma=25 cents reflecting empirical pitch deviation P(o_{t}|s_{i})=\frac{1}{\sqrt{2\pi\sigma^{2}}}\exp\left(-\frac{(o_{t}-\mu_{i})^{2}}{2\sigma^{2}}\right) where \mu_{i} is the cent value of state s_{i} . A key feature of GC-SHMM is its enforcement of raga grammar through constrained transitions. The probability of transitioning from state s_{i} to s_{j} is given by P(s_{j}|s_{i})=w(s_{i},s_{j})/Z_{i} if the pair satisfies the grammar function G(s_{i},s_{j})=1 , and zero otherwise, where Z_{i}=\sum_{k:G(s_{i},s_{k})=1}w(s_{i},s_{k}) ensures proper normalization. Additionally, direction-aware transition matrices A_{\text{up}} and A_{\text{down}} distinguish ascending and descending movements, with melodic direction inferred via pitch gradients. For task-specific inference, the correction task utilizes the Viterbi algorithm to identify the most probable Shruti sequence, computed by maximizing over permissible transitions and emissions: \delta_{t}(j)=\max_{i:G(s_{i},s_{j})=1}[\delta_{t-1}(i)\cdot P(s_{j}|s_{i})]\cdot P(o_{t}|s_{j}) For completion tasks with missing pitches, the forward-backward algorithm is employed, where \alpha_{t}(i) and \beta_{t}(i) represent the forward and backward probabilities respectively, and the marginal probability \gamma_{t}(i) is computed as \gamma_{t}(i)=\frac{\alpha_{t}(i)\beta_{t}(i)}{\sum_{j}\alpha_{t}(j)\beta_{t}(j)} At missing positions, a uniform emission P(o_{t}|s_{i})=1 is used, ensuring the model relies entirely on contextual grammar constraints to infer the correct Shruti. 5 Shruti-Aware Finite-State Transducer The Shruti-aware Finite-State Transducer (FST), denoted as \mathcal{T} , maps input pitch sequences to corrected or completed outputs by applying weighted edit operations. The transducer supports four operation types: direct matches mapping input pitches to their nearest Shruti states, insertions to add missing Shruti symbols, deletions to remove spurious tokens, and substitutions to correct misclassified pitches. The total path cost combines three components: pitch fidelity, grammar compliance, and edit penalties,