R aga Space Visualization: Analyzing Melodic Structures in Carnatic and H industani Music (2024)

Abstract: The concept of raga in Indian classical music serves as a complex, multifaceted melodic entity that can be approached through various perspectives. Compositions within a raga act as foundational structures, serving as the bedrock for improvisations. Analyzing their textual notations is easier and more objective in comparison with analyzing audio samples. A significant amount of musical insights can be derived from the discrete swara sequences alone. This paper aims to construct an intuitive visualization of raga space, using swara sequences from raga compositions. Notations from public sources are normalized, and their TF-IDF features are projected into a low-dimensional space. This approach allows for qualitative analysis of both Carnatic and Hindustani ragas, mapping them to known raga theory.

## introduction indian classical music, comprising of carnatic and hindustani systems, centers on the concept of raga. ragas are melodic frameworks for improvisation, each with unique characteristics. compositions objectively represent a raga, encapsulating its grammar and essential phrases in their notations. analyzing ragas from notations offers several advantages. it eliminates issues related to the limited availability of high-quality, authentic recordings and avoids the subjectivity inherent in various renditions and interpretations of ragas. however, this approach has some limitations. notations do not capture the subtleties of gamakas and other embellishments. carnatic ragas with multiple varieties of the same notes need to be dismissed due to the inherent ambiguity in the notation. the core idea of this paper is the visualization of ragas as entities in low-dimensional space, with their sequences as discrete points. unlike previous works that analyze a small number of ragas, this study examines a wide variety (341) from both systems of indian classical music, aiming to automate the process with minimal manual work. this visualization-based comparative analysis helps understand melodic characteristics and similarities/differences within and across both systems, offering a novel perspective on raga structures. ## feature extraction term frequency-inverse document frequency (tf-idf) @xcite is a numerical statistic that reflects the importance of a term in a document relative to a collection of documents, often used in information retrieval and text mining. in the context of raga sequences, tf-idf can be employed to extract characteristic "words". here, we consider swaras as letters, and the ragas as sentences with inherent meaning. similar ideas were seen in (garcia-valencia, 2020). given the absence of explicit word boundaries in raga sequences, we enumerate all n-grams. this results in a vocabulary v of words, where @xmath0. here, w i is a specific n-gram from the vocabulary v and r j is a raga from the set of all ragas r. the tf-idf score for a word w i in a raga r j is calculated as: we use tf-idf because it is simple and efficient, and has an ability to rank words in a way that is easy to interpret. ## methodology feature extraction was conducted using the tfidfvectorizer class from the sklearn.feature_extraction.text module @xcite . a custom tokenizer specific to our notation was built, and the parameter lowercase was set to false to preserve the integrity of our notations, as case changes would change the swara variety. we found that the parameter 3-5 for generating n-grams was best suited for the experiment, as pakads have words of similar size. the resulting document-term matrix represents each raga's word composition as a feature vector. to validate the selected features, we rank each raga's word list by tf-idf score and filter out words not present in the raga sequence. the words hence obtained act as good representation of the ragas, much like those in the sancharam or chalan as given in @xcite @xcite . a sample is given in ## future work a prospective direction for future research lies in the development of a new classification system for ragas grounded in the raga space. this system would integrate both categorization paradigms of carnatic and hindustani music, namely the melakarta and thaat systems, into a cohesive framework. such an approach would involve the construction of an empirically-based, mathematically-derived classification system. given that this study relies solely on musical notation in melodic systems, it can be extended to incorporate other musical systems, such as the arabic maqam system. ## conclusion the visualizations obtained solely from the notations sourced from websites present compelling results that are consistent with established raga theory. given the dynamic nature of the evolution of new ragas, future ragas naturally integrate into the raga space, serving as reference points for comparison with existing ragas. the 'interactive graph' can be used in music education to give valuable insights on ragas in an engaging manner.