<Meditates randomly on music> .... <Rant Begins>
Since the length of a musical phrase (in terms of number of notes) or no. of counts isn't unlimited, there is bound to be a theoretical upper bound on the number rhythmic patterns and melodic phrases that may be obtained. The question is  approximately just how many?
First, we need some simplifying assumptions as there are obviously numerous complexities. Since CM is based on the gamakas, and even a slight difference in handling of mathematically unquantifiable phrases can turn out 2 different phrases with the same swara skeleton, I ignore the gamaka part out entirely. Let us also ignore the flexible stretching and shrinking that occurs in the part of our music not bound by the tala (which would be a gamaka in itself).
This then reduces the number of patterns available to a function of the pattern length (in terms of counts or notes) :
1) For rhythmic patterns, it is fairly simple. Assume one beat (t) and a pause (,), the building blocks of rhythm. Say we have a rhythmic pattern of 5 counts : In blank form, it is      .
If you want to have a proper 5 note pattern, your first blank has to be a beat (t), otherwise it will create a pattern of lower length. The other blanks can be either a 't' or a ',' (2 possibilities). Therefore total number of patterns is 1 x 2 x 2 x 2 x 2 = 1 x 2^(51) = 16 patterns. Extrapolating for a pattern of 'x' number of notes, the number of patterns possible will be at 2^(x1) for a pattern of x notes.
Obviously we do not use only one syllable for a beat in CM (I don't know the full list of jathi patterns), so if the number of possible syllables is 'n', the total number of possibilities in a 5 beat pattern is n x (n+1)^(41). If you have 6 syllables, then the first beat has 6 patterns and the others can have 7 patterns (the "," is the silent 7th syllable). Therefore you will have 6 x 7^4 = 14406 patterns !!
Finally, there is one special possibility that all 5 patterns may be left silent, so the silence itself is an additional pattern which means totally you have 14407 patterns. So then, the general rule is then for a system with "n" syllables and "x" count pattern  f(n,x) = n x (n+1)^(x1) + 1
Even a tani avartanam from a mathematical perspective, is one <gigantic> rhythmic pattern. A smart enough effort could probably give us the pattern number for a tani avartanam.
<To be continued ... Analysis of Melodic Patterns>
An upper bound for rhythm and melody?

 Posts: 2271
 Joined: 13 Jan 2013, 16:10
 x 164
 x 9

 Posts: 2271
 Joined: 13 Jan 2013, 16:10
 x 164
 x 9
#2 Re: An upper bound for rhythm and melody?
<Continued>
2) In melody, the rules are the same, however the context and assumptions are slightly different. Since CM generally limits itself to 3 octaves and uses 12 notes in an octave (differing shrutis for one note need not apply ), you have a total of 36 possible notes. But that includes only up to the upper nishadam, the top shadja at the end of the upper octave makes for note #37. So totally 37 notes.
But there is a difference between singing SSSS and S,,, therefore the comma (,) is mathematically equivalent to a 38th note. Here the comma stands for a continuous kaarvai. I am not treating a pause as part of a melodic pattern since it generally serves to split the melody into separate patterns.
But a melodic line can be entirely silent (Yes, in my world, silence is also very much a part of the music). Hence that +1 at the end still applies.
Therefore the theoretical number of melodic patterns of a given length in 3 octaves with 12 tones will be : f(37, x) = 37 x 38^(x1) + 1
I've already worked it out for you, and the numbers are just RIDICULOUS. It may not be infinite, but with numbers like those, it might as well be. Link to the excel sheet below. Note that the graph's vertical axis is logartihmic, hence each step represents an increase by a factor of TEN. Otherwise it would be unreadable!
https://www.dropbox.com/s/nrp52rjvw6h00 ... .xlsx?dl=0
The graphs show the trend from 0 (silence) up to 32 count patterns of rhythm and melody.
Then there is a special entry for a 128count pattern. If you had the breath in you to sing a 128 note long brigha (and a voice that could reach 3 full octaves), mathematics tells you that there 4.299 x 10^203 possible ways of doing so (including one long event of silence). To give you the picture, write down 4 followed by 203 zeroes. It's a bit bigger than that. .
Just the number of rhythmic patterns of 128 counts with ONE syllable alone come to 1.7 x 10^38 (a 39 digit number!)  that is how many ways you can play in just 4 cycles of your everyday Adi talam. With one stroke.
<Take deep breath and meditate here>
In reality the rules of ragas and the aesthetics of the music will mean that the practical number of useful phrases is much less. After all, who wants to hear a 16 note kalpanaswara pattern of NNNNNNNNNNNNNNNN (Vasudevayani). But this function offers an upper bound as to just what is possible.
But it immediately tells you why nadaswara vidwans for one could make such long alapanas and why some musicians have been described as "ganga pravaham" or a dam with it's floodgates open. "Where does such imagination come from?" has been asked . The answer is it is a law of nature. Stretch that brigha length by just one more note, you can get exponentially more (38x ) manodharma . That's far more than expected, isn't it?
Ultimately, the lesson to take away is this  The longer you can stretch a pattern, the greater your manodharma will be, quantitatively. The genius lies in knowing how to use said law to make immortal music. A great musician can create epic music in a moment of mere silence (Yes Shri Palghant Mani Iyer, I was referring to you).
All ideas originate from silence and again dissolve into silence. <Meditation resumes .... incubation continues>
<I will be most grateful if you can tell me if I missed anything anywhere. I've edited it as I realized 36 notes in 3 octaves did not include the topmost shadja, which would be note #37. Link is also updated. I split the post into 2 for readability>
2) In melody, the rules are the same, however the context and assumptions are slightly different. Since CM generally limits itself to 3 octaves and uses 12 notes in an octave (differing shrutis for one note need not apply ), you have a total of 36 possible notes. But that includes only up to the upper nishadam, the top shadja at the end of the upper octave makes for note #37. So totally 37 notes.
But there is a difference between singing SSSS and S,,, therefore the comma (,) is mathematically equivalent to a 38th note. Here the comma stands for a continuous kaarvai. I am not treating a pause as part of a melodic pattern since it generally serves to split the melody into separate patterns.
But a melodic line can be entirely silent (Yes, in my world, silence is also very much a part of the music). Hence that +1 at the end still applies.
Therefore the theoretical number of melodic patterns of a given length in 3 octaves with 12 tones will be : f(37, x) = 37 x 38^(x1) + 1
I've already worked it out for you, and the numbers are just RIDICULOUS. It may not be infinite, but with numbers like those, it might as well be. Link to the excel sheet below. Note that the graph's vertical axis is logartihmic, hence each step represents an increase by a factor of TEN. Otherwise it would be unreadable!
https://www.dropbox.com/s/nrp52rjvw6h00 ... .xlsx?dl=0
The graphs show the trend from 0 (silence) up to 32 count patterns of rhythm and melody.
Then there is a special entry for a 128count pattern. If you had the breath in you to sing a 128 note long brigha (and a voice that could reach 3 full octaves), mathematics tells you that there 4.299 x 10^203 possible ways of doing so (including one long event of silence). To give you the picture, write down 4 followed by 203 zeroes. It's a bit bigger than that. .
Just the number of rhythmic patterns of 128 counts with ONE syllable alone come to 1.7 x 10^38 (a 39 digit number!)  that is how many ways you can play in just 4 cycles of your everyday Adi talam. With one stroke.
<Take deep breath and meditate here>
In reality the rules of ragas and the aesthetics of the music will mean that the practical number of useful phrases is much less. After all, who wants to hear a 16 note kalpanaswara pattern of NNNNNNNNNNNNNNNN (Vasudevayani). But this function offers an upper bound as to just what is possible.
But it immediately tells you why nadaswara vidwans for one could make such long alapanas and why some musicians have been described as "ganga pravaham" or a dam with it's floodgates open. "Where does such imagination come from?" has been asked . The answer is it is a law of nature. Stretch that brigha length by just one more note, you can get exponentially more (38x ) manodharma . That's far more than expected, isn't it?
Ultimately, the lesson to take away is this  The longer you can stretch a pattern, the greater your manodharma will be, quantitatively. The genius lies in knowing how to use said law to make immortal music. A great musician can create epic music in a moment of mere silence (Yes Shri Palghant Mani Iyer, I was referring to you).
All ideas originate from silence and again dissolve into silence. <Meditation resumes .... incubation continues>
<I will be most grateful if you can tell me if I missed anything anywhere. I've edited it as I realized 36 notes in 3 octaves did not include the topmost shadja, which would be note #37. Link is also updated. I split the post into 2 for readability>

 Posts: 10929
 Joined: 03 Feb 2010, 00:01
 x 11
#3 Re: An upper bound for rhythm and melody?
I usually can not resist getting into this kind of stuff, but no time now. Later Srinath. Hope you get other kindred spirits in the mean time!
I sometimes wonder about the fact that there are so many songs in so many generes over so many centuries and they all sound different. Your numbers show the possibilities and the reasons why they sound different and why there is no need to fear music running out. Add to this the timbre of the voice and style of singing, the same rhythm and melody takes on a different personality.
I sometimes wonder about the fact that there are so many songs in so many generes over so many centuries and they all sound different. Your numbers show the possibilities and the reasons why they sound different and why there is no need to fear music running out. Add to this the timbre of the voice and style of singing, the same rhythm and melody takes on a different personality.

 Posts: 2271
 Joined: 13 Jan 2013, 16:10
 x 164
 x 9
#4 Re: An upper bound for rhythm and melody?
Welcome anytime to join in. You're right, I couldn't quantify gamakas, or ragas, tone or the impact of different tempos or schools and those parameters. The analysis therefore is restrained to plain notes. And this is just 3 octave music. A grand piano has more than 7 octaves worth of range. So f(86, x) = 85 x 86^(x1)+1 anyone?vasanthakokilam said:
I sometimes wonder about the fact that there are so many songs in so many generes over so many centuries and they all sound different. Your numbers show the possibilities and the reasons why they sound different and why there is no need to fear music running out. Add to this the timbre of the voice and style of singing, the same rhythm and melody takes on a different personality.
Also I was not aware of how many jathi syllables or mridangam strokes (not to mention ghatam, kanjira, thavil, etc..) exist, but all rhythm is basically a combination of a stroke and a rest (it is the pause, or the rest, that creates rhythm from continuous sound, hence it is called "laya"  rest), so a single stroke analysis was good enough. But I would be grateful if someone could tell me all the strokes used in a mridangam or a thavil at least.
A 1 kalai Adi talam  20 avartanam tani in single stroke  the number of ways is 2.29 x 10^192  a 193 digit number!
The universe will have long ceased to exist before mankind works out all the possibilities.

 Posts: 49
 Joined: 03 Feb 2010, 15:28
#5 Re: An upper bound for rhythm and melody?
Nice. Does this not cover the topic Talaprasthara in the Tala and Laya Section? For example if one takes a three note pattern, one can list out all combinations of rhythms. I lost track of the other thread in the terminology, but this seems pretty comprehensive. Am i missing something?
Narayana.
Narayana.

 Posts: 2271
 Joined: 13 Jan 2013, 16:10
 x 164
 x 9
#6 Re: An upper bound for rhythm and melody?
They had derived the general pattern for deconstructing the compositions of a number : https://en.wikipedia.org/wiki/Compositi ... inatorics)
The idea was to use the numbers as a base for understanding the techniques. Later you could substitute the numbers for talangas and see how it works.
"...Each positive integer n has 2^(n−1) distinct compositions..."
Later on, I had found for myself the connection between binary logic and rhythmic patterns and was pleasantly surprised to see how excel could generate every pattern that added up to a number using binary numbers. Consequently the binary number when converted to decimal automatically became the pattern's own serial number. Regarding the graph in my excel sheet for rhythmic combinations up to 32 counts  every possible one can be generated in "32bit memory"
The idea was to use the numbers as a base for understanding the techniques. Later you could substitute the numbers for talangas and see how it works.
"...Each positive integer n has 2^(n−1) distinct compositions..."
Later on, I had found for myself the connection between binary logic and rhythmic patterns and was pleasantly surprised to see how excel could generate every pattern that added up to a number using binary numbers. Consequently the binary number when converted to decimal automatically became the pattern's own serial number. Regarding the graph in my excel sheet for rhythmic combinations up to 32 counts  every possible one can be generated in "32bit memory"

 Posts: 49
 Joined: 03 Feb 2010, 15:28
#7 Re: An upper bound for rhythm and melody?
Nice. When I was reading the talaprasthara topic, it occurred to me that there would have been a more elegant mathematical description, but I did not pursue looking into it. There were some discussions. But I got caught up in the terminology and then went about my other work. Now I see how it is laid out and it is pretty elegant! How neat and organized!
Narayana.
Narayana.

 Posts: 3258
 Joined: 15 Jun 2009, 07:16
 x 3
 x 7
#8 Re: An upper bound for rhythm and melody?
@Srinathk A duo of legendary mathematicians have dealt with just additive factors ( not necessarily the order of numbers  which would be relevant to musical combinations).
https://youtu.be/y_0NuOBNobk?t=1858
But mysterious that the "pi" occurs there! What is an irrational number doing there in counting? Well it is explained in the video.
https://youtu.be/y_0NuOBNobk?t=1858
But mysterious that the "pi" occurs there! What is an irrational number doing there in counting? Well it is explained in the video.