Saturday, November 24, 2007

Interpreting Melakartha Chart

This post is heavily inspired and guided from my talk with my Flute Sir: Shri. Bhaskar. My talk with him on one of my flute classes about Raagas in Carnatic music has instilled tremendous reverence in me for Carnatic Music.

Let me get the terminologies right first:
Raaga - The progression of swaras in some specific order. Each Raaga has Arohanam and Avarohanam.

Swaram - The fundamental constituent of a Raaga. There are 7 Swarams. Sa Ri Ga Ma Pa Dha Ni. Sa and Pa are called Prakruthi Swaras, for there is only one type of Sa and Pa. (its equivalent of C and G in Western Music). The rest has that many variations represented in brackets.
Ri(3)
Ga(3)
Ma(2)
Dha(3)
Ni(3).
Note that Ri2 == Ga1, Ri3 == Ga2, Dha2 == Ni1, Dha3 == Ni2, where "==" is the Equivalence relation.

Arohanam and Avarohanam - A raaga can have musical notes that either ascend or descend relative to current position. When you are in a note and you want to ascend, you should look at your current position in the ascending table and continue to sing the next swaram in the ascending table. When you descend, you just follow the descending table and continue to descend along the swarams defined in that table. The ascending table is called Arohanam and the descending table is called Avarohanam. If there is an anomaly in ascending of an Arohanam and descending of an Avarohanam, its called Vakram.

Melakartha Raagas - There are over 2000+ note progressions forming Raagas. All of them can be derived from 72 raagas called Melakartha Raagas. What’s special about Melakartha Raagas:
They are symmetric, in the sense that Arohanam.reverse() == Avarohanam.
They are complete, in the sense that each of the 72 melakartha has at least and utmost one instance of the 7 swaras in their Arohanam and the rule holds good for Avarohanam too.

How did we arrive at 72?
Its basic combination: There is Sa(1) - Ri(3)- Ga(3) - Ma(2) Pa(1) Dha(3) Ni(3)
Ri2==Ga1
hence when Ri2 is there, Ga1 is not possible as part of melakartha scheme. Hence for Ri2 the Ga that can follow can be only Ga2 and Ga3.

It’s the same with Dha and Ni combo.

Hence,
Sa - 1
Ri Ga - (R1 G1, R1 G2, R1 G3, R2 G2, R2 G3, R3 G3) - 6
Ma - (Ma1, Ma2) - 2
Pa - 1
Dha Ni - (D1 N1, D1 N2, D1 N3, D2 N2, D2 N3, D3 N3) - 6

Multiply the possibilities to get the overall possibilities = 1 * 6 * 2 * 1 * 6 = 72.
Ok, so we now understood how Melakartha scheme is 72.

What is Janya?
A Janya is some raaga that is derived from Melakartha Raaga. The cookbook way of preparing a Janya from its melakartha raaga is : do a transformation (add, delete one or more swaras and change order) on the Melakartha. Note that when adding a new swara, that swara must exist on its Melakartha, you can't arbitrarily insert a swara that’s not in the melakartha.

We will now try to explore more about Melakarthas:
(Note: I have not devised them, I m just trying to spell out the requirements and trying to map the existing awesome solution to the requirements).

Now that we have the fundamentals, lets add some notation to Melakartha and make it systematic.

1. Lets put numbering from 1-72 to easily identify the Raaga.
2. Lets name them.
3. Lets devise a system to classify them easily so that given number, should be able to tell the Swaras in it (and hence the arohanam and avarohanam).

3rd can be achieved if 1st point is done correctly.

All Melakarthas already have names, so lets use them. For classifying, the chart below is going to help us tremendously:





























ok,
Lets try to analyze the chart first and spell the notations in the chart. In the chart above you wont find Sa and Pa. The reason being it’s part of all the 72 Melakarthas and there is only one version of Sa and Pa. There are only 2 versions of Ma. Hence there should be 72/2=36 raagas with Ma1 and 36 raagas with Ma2. The remaining swaras are Ri Ga Dha Ni. (Sa Pa Ma are explored).
Each of these 36 raaga blocks should have Sa Ri* Ga* Ma1 Pa Dha* Ni*
(* denote raagas that can vary and non * are those that are fixed for those 36 Raagas).

Now, lets say we now break this 36 into blocks of combiations of Ri and Ga.
The Ri Ga combination (as we saw from the
Melakartha explanation) can be [R1 G1, R1 G2, R1 G3, R2 G2, R2 G3, R3 G3]. which is 6.
Hence the 36 is divided now it 36/6 = 6 blocks. Each of these blocks has one of the above combiations for Ri and Ga. Now for the third block of Ri Ga it is
Sa Ri1 G3 M1 P D* N*. In other words, the only variables now are Dha and Ni.
When we are in the 3rd block, 2 blocks each consisting of 6 raagas precede it. Hence the first raaga in this block should be numbered 13. Its swara signature is S R1 G3 M1 P D1 N1. (which is GayakaPriya).

This is found easily with the above chart this way. All melakartha raagas on the right hand side has Suddha Madhyamam (which is Ma1) and the raagas on left hand side has Pratha Madhyamam (Ma2). For Ri and Ga classification, we express different notation as:
R1 is denoted as Ra
R2 is denoted as Ri
R3 is denoted as Ru

G1 is denoted as Ga
G2 is denoted as Gi
G3 is denoted as Gu


The Dha and Ni combinations in order of [d1 n1, d1 n2, d1 n3, d2 n2, d2 n3, d3 n3] are the 6 raagas in each block.

Thus if you know the Swara signature, you can find the Raaga and vice versa with this chart.

So we have explored the combination of Swara Signature -> Raaga Number, Raaga Number -> Raaga Name (which is obvious with the chart) and Raaga Name -> Swara Signature, all with the help of this chart.

Lets say you don’t have this chart, how will you find the Raaga Number, given Raaga Name? This is also possible, but it’s not so direct though.

Take the first 2 letters of the Raaga.
Lets take Maya Malava Gaula.
first two letters as per sanskrit/tamil/kannada are Ma Ya.

Vallinam letters, with their chronology in brackets are : Ka(1) Sa(2) Da(3) Tha(4) Pa(5) Ra(6)
Mellinam letters, with their chronology in brackets are : Ga(1) Gya(2) Na(3) Na(4) Ma(5) Na(6)
Idaiyinam letters: Ya(1) Ra(2) La(3) Va (4) LA(5) Zha (6)

look at the chronology numbers for Ma and Ya. They are 5 and 1 respectively. Reverse them, so it becomes 15, which is the raaga number for Maya Maulava Gaula.

There are counter examples that don’t work with this. But, it seems that a similar grouping of letters in Sanskrit/Kannada seems to work to get the right number. (I need to find out what should be patched). In Tamil, each of vallinam, mellinam and idayinam have only 6 letters, where as the units digit of a raaga number can be from 1-9 and the tens digit can be from 1-7.
This has to be apparently fixed, after which it would be a perfect mapping :-).

In whatever case it is, the chart is useful at least to get swaras for a given melakartha raaga or to get the raaga give the swara and also to find the raaga number in both the above cases.
Hope my post was useful. Thanks a lot for reading till the end of the post.

Thursday, October 18, 2007

My Recent Flute Creation - Papa Kehte Hein

My recent flute creation. Click on Play button below to play



If you did not like the background music, you can see the bgm less version here:
Click here
For a complete list of all recordings Click Here

Saturday, October 13, 2007

My recent flute recording - Maalai Pozhudhin Mayakkathile Naan

My recent flute creation. Click on Play button below to play



For a complete list of all recordings Click Here

Monday, October 08, 2007

My recent flute recording - Unna Vida from Virumandi

My recent flute creation. Click on Play button below to play



For a complete list of all recordings Click Here

Friday, September 28, 2007

Singapore SFO Tour Videos

Click the play button to play each one of them.

















Tuesday, August 28, 2007

Nivio - Roaming Windows Logon Profile across the internet

Have you heard of the WebOS? http://en.wikipedia.org/wiki/Web_operating_system

Typical drawbacks of such a system is the interoperability with Windows system. Most cannot run anything beyond whatever AJAXified applications that the WebOS author had written. In other words, anything complex beyond Mail, file Management and Photo Management, IM, Word Processor, Excel and PowerPoint is virtually impossible to be run.

Nivio draws a solution taking this into consideration. Nivio runs as a RDC application. What I assume they have written is to use the RDC library available in Windows and wrap it up as a ActiveX application in Windows IE combo. For Firefox and other Browsers + other OS combo, what they have used is to write a (supposedly)thin Applet to run RDC.
(Well, when in this world an applet was called Thin Client, for its bulky memory footprint? :p)

I assume that they have a Load Balancing System that can handle RDC requests from various clients and ensure some QoS on the requests. In my person experience, I have seen that RDC works well when the bandwidth is atleast 256Kbps+ (well it has worked in 64kbps as well, but running something complex that would change the screen often is ruled out).

The biggest question in this whole system is the scalability. How many users can their system scale. It is known fact that a system in RDC can reasonably handle double digit figures to few hundreds of connections. With a server farm of Windows Servers and roaming profile across them, i think they can sustain a decent lot.

There is also another way that they might have implemented. Throw a VMWare server farm, and put a load balancing RDC Connection acceptor that forwards connection to the VMWare Server Pool..

The 2nd one seems much more scalable as VMWare is much more proven than Windows 2003 Windows Terminal Server systems, but in any case, Nivio will have to shell out cash for each client connection (either now or at a later time).

Another question at hand is, when you play , say youtube video, how good will be the change in your screen? Answer currently is pathetic in RDC. It will be tough to see much change. The Nivio guys will ahve to sweat it out in this part, and significant space for innovative solution exists in this area.

There is another known issue with RDC. Sometimes when you see error messages, they are shown in the actual monitor, but donot appear in RDC Client. I have seen this issue when using RDC myself, although I cannot tell with confidence if this bug still persists in RDC, but I hope this issue might have been solved by Microsoft.

Well, thats it for the day. Ciao.

Sunday, May 27, 2007

Human Computation

There are several cases where humans excel computers at computation. This is harnessed in Luis von Ahn's work on Human computation.

http://video.google.com/videoplay?docid=-8246463980976635143

If you want to see a demo, you can see here: http://images.google.com/imagelabeler/

I now see that some other implementation of the same thing, which is much more interesting and pragmatic:
http://bmaurer.blogspot.com/2007/05/recaptcha-new-way-to-fight-spam.html

Interesting indeed.

Friday, May 18, 2007

Save Trees - Creative Advertisement

A very creative advertisement that I saw at MG Road, Bangalore.
It tells that "No one ever attained enlightenment under a lamp post, Please plant trees. -WWF".



Thursday, May 03, 2007

Letter Writing

From,
xxxxx,
xxxxx,
place - zipcode.

To,
The Inspector,
Some Police Station,
Place - ZipCode.

Respected Sir/Madam,
Sub: Request to find lost bicycle - lost on 3rd May 2007.

I bought a new bicycle from (The proof of the same is attached to the letter). I lost it on 3rd May 2007, morning. On 2nd May 2007, I locked my bicycle at the basement. It was last sighted by Mr.XXX at around 11 PM on 2nd May. On 3rd May morning, when I came to the basement to start my cycle, it was not there. The watchman has no clue of anyone having come to the building after 11 PM, nor he says he heard any sound of someone opening the gates. The details of my bicycle are below:
  1. Detail 1
  2. Detail 2
  3. Detail 3
I kindly request you to find my bicycle. I m having a tough time commuting without it. I would be very grateful to you for the same.

Thanking you.
Yours Truly,
Varun.

====================
How was the letter writing exercise?
Sadly my "lost bicycle " letter writing skills seems to have some use now. :(

Monday, April 16, 2007

what Math and life have in common

I recently (around an year) saw a quote which said , life is like PI (3.141592654), Real but irrational. Recently I saw another contender for a similar quote :), but this time its PI and the imaginary number (i) who are fighting with each other.

The link is here
http://www.mightywombat.com/toons/numbers.gif

if you are lazy visiting the link, here is the pic:





Friday, March 02, 2007

Debugging AJAX and HTTP Requests for Web Applications

You have an AJAX based or just plain old HTTP based Web Application. You want to see some way to know what transpired between the Server and your web client. There are several reasons to know this,
  • first in that case you can avoid printing lot of Logs in your server thus less burden on your server.
  • Another reason is quicker Code-Debug cycle, its lot more easier to finish off all the test/pick logs/correct in one system..and the deploy your code in server.
  • You really want to know if your request reached the server, what parameters you sent in your GET/POST query, what other HTTP headers you sent along (such as session Id/cookie info) in addition to whatever you want to know, such as when is the Content Expiration date..
  • You plainly have no idea what the application you have taken responsibility does, you want to know what URL your application launches, what it does, and use the URL to continue to debug, so that you can quickly reach the spot where your HTTP request hits the server and what process/whatever is called from there...
There are several tools that you can do.. with increased efficiency and productivity. All of the tools mentioned below are Free and mostly Open Source (Free!=Open Source)..

Lemme start from the most lame ones to the more specific ones and tell you which could be a good one..
1. Ethereal -http://www.ethereal.com/
Ethereal is more a network Packet capturing tool, however, it can be used to capture HTTP traffic alone. In the filter option choose the HTTP as the protocol. If you know which URL/port your client calls, it can make things more specific. Once you get the result, you start scratching your head about how you comprehend the packets that have been captured. You need to select all the packets captured and then choose the HTTP Response Data option (donno where its , but basically it appends the packets in sequence (even if they are out of sequence) to get the response data as a stream that you can copy somewhere and continue debugging). This is a good option, but over time, you will understand that, you need to have all your other applications that use HTTP to be out of the capturing system (by setting proper filter mechanism) or close all applications that use HTTP. Also, that makes things slow, because I assume Ethereal patches the actual TCP stack files in your system and would painfully process every packet coming to your system (or sent from your system), then apply the packet filter and then show in the window it has.
Time to grow up for a better tool


2. IE HTTP Headers and its clone in Firefox called LiveHTTP Headers: www.blunck.info/iehttpheaders.html & livehttpheaders.mozdev.org/

They basically sniff whatever traffic is sent from or sent to/from your browser. IEHTTPHeaders has a distinction for HTTP and HTTPS with colors and you can choose the colors. That way its a good tool. What its bad at is that, it contest with McAfee Virus Scan for the same API when sniffing Browser traffic and can cause your IE to crash randomly sometimes and usually when you exit IE (you will forget when you last closed IE without a crash)...
Live HTTP Headers seem to be good, I haven't had issues with that, but neither have I worked in a great deal with it to certify that it doesn't have problems. Both IE HTTP Headers have questions when a request comes early but its HTTP response is late and between that time window, some other smaller request is answered. There is no intuitive way to know that. Atleast in Live HTTP Headers, it seems to be better with a horizontal line. Its tough in IEHTTPHeaders.

Overall comment is: Well, this looks cool , better than just sniffing logs... but this too can be overwhelming at times, when you have quick several requests... Also I have seen Firefox Freeze (run at 100% for a long time ) a few times and I cudnt pin point on LiveHTTPHeaders, so I leave that to you to decide.

Time to pick a better one..

3. This was called Firebug. http://www.getfirebug.com

Its a Firefox plugn. It helps people to know whats the status of the curretn request(same as previous ones). But the best part starts when you have too many requests from the server, it can show the time frame window in it (for the requests for /from the client in server which could be concurrent or that 2 of them are waiting.. something will happen that way....This one shows the Firebug Sniffer logs only for the browser window its associated with. Hence, that way its quite useful. The more interesting ones are that can see how much time a particular request has taken. Also this gives you a picture of whats happening in client at any point of time..It also shows a DOM tree, you can use that to run through the DOM for the page, which is an effective tool for debugging fro the server for the web clients.

and quite a few other options. You can quite obviously see that I m interested more about the third one(Firebug). One bad thing is that its not available for IE. but the better part is that its available in Firefox... IE has a similar tool, but not as good as this (its more matured one, but at the same time, its kind of either missing or .. Its called IE developer toolbar. I see that it has the best options such as resolution, clearing cache for a particular domain etc. But its not a matured product, in which case, its wise to think 2wice before you used it(with occasional internet explorer crash event for free).

I will paste screen shot as and when I find time...

PS: I wrote this in half sleep towards end, if you find any mistakes do comment and let me know, I will change that

Tuesday, February 20, 2007

Random Snaps

Evening Sunset



Typical Bangalore Gully



Temple and mosque.

Monday, February 19, 2007

Not my post: Bangalore Mail and Dreadful Journeys!!

The text below is copy pasted from a fwd mail I received from Priyadarshni of my class. The original writer apparently is "Kartik". I was unable to find his actual blog, in spite of my googling it out.. If anyone can provide the actual link, it would be really really great.. this whole post is so so so close to what I m experiencing in terms of "Bangalore Mail" :-)

< start copy >
First thigs first.. I owe a big apology to all those ppl who have taken some time from their busy schedules , read my blogs and had commented "don make it too personal..". coz this onez the final bit of personal stuff i have with me.. and without this i won be doing any justice to my blog theme (banglore mail) at all.. Read on..
So there was yet another "S/w Engineer in the m(oc)aking" at banglore and it was none other than meee!! Initial days at office were all perfect and just like what i had always dreamt off. Days passed in a jiffy and i had made quite a number of pals by then. At last training ended and along with it our fundoo times too..It was show time then, we had to pack our bags an move on to projects... A bunch of us were interviewed by a PM and were successfully 'hardlocked' to a proj. Now for ppl who wonder whatz all this hardlock is abt.. Its yet another jargon used in this IT industry with which the PM'S glue u on to a seat in the project and make sure u are no more visible to the HR (an that expands to Highly Ridiculous), who usually are in dire straits looking for resources and are so desperate that they start locking evrybudy,be it the floor warden or the bay sweeper,never mind!!
Right then, First day at project and i realised that my dreams of becoming a "hardcore developer" were shaken up a bit and had underwent a li'l transformation by then. It now read "Hardware Keeper" .. That waz what the jobz nature, precisely was.. "AM GONNNA BE A SYS ADMIN, DEALING WITH HARDWARE !!!" Whoa.. Doesn it sound great, if not atleast for the first spell out!!!
What was more gloomy was i had persuaded my mates too, to take up this new assignment, citing that "this is going to be a gr8 challenge. We will get a lot of learning opportunities.. we'll hve helluva development work..blah blah" .. Poor ones , they had got convinced by tat speech , which usually a PM manages to give everytime, during indcution of rookies into proj and they do listen agaped and of course thrilled..

So a bunch of clowns aka sys admins were brain washed and were trained to become effective sys admins !!! To make situations more worser we were scoffed and ridiculed by some (not all, though) experienced ppl who were already present there .. Tougher times were those and some hom we managed to grit them out all with a steely resolve..

Days rolled on , we had slowly accustomed ourselves to the new environment and we were no more 'rookies'.. Boy, we did almost everything that even a few senior guys didnt try. Sooner those ppl who were laughing at us earlier and made a farce, now termed our bunch as "the backbone of the operation".. Its really funny when u realise how pplz perception change as time does..

So i was really engrossed during the weekdays and it was the weekends that put me down. Since i wasn living with anybody, weekends were damn boring , to say the least !! Just had the TV for my company plus the 4 walls.....After spending a few morose weekends there at bang , i finally took a decision. "I am not gonna stay here for the weekends, watever be the case.".. . Thats where it all started. I began to frequent the banglore mail and weekend speicalz , sparing those odd weekends where in i was bugged by my TL who forced to come for weekend works (crap !!)..

U won blv me , i wud have spent almost all my sal for weekend travelz.... Friday night was the best that i cud ever get and the sunday nightz were the worst.. Coming home on sat morning , freak out with friends, taste ur home food , meet all ur college pals , continue all those late night phone talks ..all these became a routine , rather !! On the contrary the sunday nigthz killed me..There were times when i really din wanna go back so much that, i used to check NDTV & headlines today constantly, hoping to hear something like "Rains lash banglore.. all trains leaving from chennai to bang cancelled indefinitely.." ....

But since we don dwell in a fairy land, where all ur dreams come true.. i'd pack my bags at snail pace and with not even the slightest of a smile , i wud leave for the station.. Through out the way i'll just be cribbing and dreaming of a transfer.. More agony would be waiting for me there at the station where i'd bump on a romantic pair who wud really be excited, unlike me, to travel together.. I'll let out a big sigh (what else can i do !!) and move on.. When i travel with mates , i wud rather be ok since we always had snippets & hot news to ruminate on ..

This became a vicious cycle then.. banglore-chennai-banglore.. Hold ur breath , u havta blv me . outta the total 1 year and 4 months , almost all weekends I_WAS_AT_CHENNAI , except for a coupla them (or +1 , thats the max). I had booked so much tickets between chn - bang , that the Indian railways later decided to issue a special railway pass for me (of course with concession!!). Go to the url irctc.co.in and i'm sure that , those chaps wud have mentioned my name somewhere in the site or atleast in the disclaimer.. sumthing like "Accept.. if over 18 years of age, first name not like 'Kartik' & travel plan definitely != chn - bang :-) ".. for the amount of transaction that i had performed over there.. Also If u had tried booking a ticket last year at the irctc and should u have experienced a "server busy error" ..hang on.."I_AM_THE_CULPRIT .."

As in a fable ,where everything ends on a positive note.. this blog is also gonna do.. After constant pestering , bickers and 'I_AM_GONNA_QUIT' threats , i managed to obtain a TRANSFER... Know wat, the first draft of the letter that i was abt to send to my HR , giving a reason for a transfer read some thing like ..

"Hi,

The reason for the exigency in my relocation to chennai is that, i am exhausted, boarding the
banglore mail and all possible special trains , that southern railways had introduced for
reducing the congestion between the 2 cities and have exceeded the quota for maximum
number of tickets that can ever be booked by a individual bet 2 stations. As a result of this i
have been denied a ticket to my home town. Sensing the ultimate danger that i could never
board a train back to chennai , i request you to kindly gimme a relocation asap..

Regards,
Kartik

p.s : I have attached a mail from the Chief station master, banglore city with this, that will give
ya more insights into the issue..


< / end copy >

Wednesday, January 24, 2007

Tuesday, January 02, 2007

The Blogger Bug

Recently I noted a bug in Blogger.com

It has to do with account migration. When you login with your google accounts login and then enter Blogger.com,
The only way to get out of this infinite loop is to type www2.blogger.com/home manually in the address bar after canceling page load.

This page flow is actually a valid test case if you have not migrated your account (I guess).

Search this site

Google