Carnatic music system is an Indian music system that is of a very ancient origin. It is probably the oldest recorded music system in the world. It is believed that it has its origins in Sama Veda – one of the four ancient vedas. Sama Veda is actually hymns derived from Rig Veda set to musical tunes! Sama Veda is the Veda of music and melodies.

Melakartha – Base Raga in the Carnatic Music System

The Carnatic music system has 72 base ragas (called Melakartha Ragas) and thousands of derived ragas. Each raga in Indian music system depicts a mood. Some ragas are suitable to be played during sun rise, some during sunset, some produce a devotional feeling, some produce a romantic feeling, and so on. After all, music is what feelings sound like!

A base raga is a raga with 7 swaras (notes) in an octave. So there are 72 Melakartha ragas in carnatic music. Derived ragas (called Janya ragas) are ragas derived from a base raga and can have any number of notes.

The 7 notes of a raga are called Sa, Re, Ga, Ma, Pa, Dha, Ni akin to Do, Re, Mi, Fa, So, La, Ti in western classica music. However, the swara of a carnatic raga is much more complex, and the frequencies of notes are relative to each other, rather than a defined or fixed one.

The names of the 7 swaras are abbreviations of their actual names – shadja, rishabha, gandhara, madhyama, panchama, dhaivata and nishada.

Now in carnatic music, except for the first and fifth swara (Sa and Pa), other swaras have more than one form. So Ma has two forms, while other four Ri, Ga, Dha and Ni have three variants each.

If we consider the first note of an octave as Sa, then see the different positions other notes can occupy in the image below. All notes have been abbreviated to their first letter, so we have Sa(S), Ri(R), Ga(G), Ma(M), Pa(P), Dha(D) and Ni(N). Notes that can have more than on variant are indicated with the variant number, like D1, D2, N1, M2 etc.

Close up of piano keys

Now, since Ri always comes after Sa, it can be either R1 or R2 or R3. If Ri is R2, since Ga always comes after Ri, Ga can be either G2 or G3, but not G1, because it is nothing but R2.

With this simple rule that two notes cannot occupy the same place, we can see that we have 2 possible combinations for Ma, 6 possible combinations for Ri and Ga, and 6 possible combinations for Dha and Ni. So in all we have 2 x 6 x 6 = 72 possible combinations of the 7 notes here. Hence, there are 72 Melakartha ragas.

Katpayadi as a Hash table to calculate Melakartha Raga number

Each Melakartha raga has a number that ranges from 1 to 72, and a raga name. Now note that one had to remember which raga has which combination of notes, and this is a very difficult thing as we have 72 different combinations.

Hence, the ancient Indian musicians came with a simple solution for the same. They named the ragas so that the raga number could be calculated from the raga name! This was done using the Katapayadi Sankhya scheme. Read about the Katapayadi algorithm.

So, if you had a Melakartha raga name like Hanumatodi, then you can instantly calculate its raga number as 8 using the Katapayadi scheme. The first two consonants of the raga name were used in the Katapayadi scheme. In other words, Melakaratha raga names acted like a hash table, and the hash number was calculated using Katapayadi algorithm!

Then the musicians went a step further and devised another rule that allowed to calculate all the 7 notes of the raga from the raga number itself! In other words, the raga name were not just mapped via an algorithm to its number, but the number itself was first carefully selected so that it was possible to find its notes using the raga number!

Calculation of Raga notes from Raga number

The rule to find the notes were simple as follows. The notes Sa and Pa were already known since they are fixed. Now we had to find Ri, Ga, Ma, Dha and Ni.

Finding the note for Ma

Since there are two possible variations of Ma, the ragas were numbered so that the first 36 ragas had M1 and the next 36 had M2. In other words, if the raga number was <= 36, then its Ma note was M1, and if it was >36 then its Ma note is M2.

Finding the notes for Ri, Ga, Dha and Ni

The possible combinations for Ri and Ga are as follows:

R1 G1 R1 G2 R1 G3 R2 G2 R2 G3 R3 G3

Similarly, the possible combinations for Dha and Ni are:

D1 N1 D1 N2 D1 N3 D2 N2 D2 N3 D3 N3

So the rule to find each of these combinations was to

First divide the raga number by 6.

If the remainder is 0, then quotient is the RG combination number and 6 is the DN combination number.

If the remainder is non-zero, then quotient+1 is the RG combination number and remainder is the DN combination number.

For instance, if the raga number was 12, then since remainder is 0, RG=R1 G2 (because quotient is 2) and DN=D3 N3 (combination 6)

For instance, if the raga number was 27, then since remainder is non zero, RG=R2 G3 (because quotient is 4, so quotient+1=5) and DN=D1 N3 (because remainder is 3)

This is such an amazing piece of art work, not just some mathematics. The entire base raga system of carnatic music has been so skillfully designed that just by knowing the raga name one can instantly calculate the raga number, using which can then quickly calculate all the notes of that raga. Absolutely no need to remember all the individual 72 combinations against the raga name! Wonderful, isn’t it?

Download HitXP Mobile App on Google Play