To give a very brief about this topic - Music had its roots in 'OM' and from there the 'Samavedam '. We get a lot of information on the history of Indian music from the Bharatha shastra and Sangitha rathnakara (both in sanskrit)and also from Silappadigaram and the Tolkkapium (Tamil) since 5th century ( if I remember correctly). One can trace two historically distinct traces of music traditions - Sanskrit (using shajmam , Rishabam etc for its swaras) and Tamil (Kural , Thuttam etc for naming its swaras). The distinction between Hindusthani and carnatic grew more distinct only after the 12th century when the north India absorbed the arabi/muslim music and developed into a distinct style and the south -carnatic music got established .In Hindusthani ,music it uses the THAATS and the carnatic developed a scientific Mela system of raga classification . The raga classification in 72 melas etc are all recent ones - some 3 -4 centuries old. Raamamatya is the first one to do a basic classification and then Venkatamakin. The real growth of carnatic music is from the days of Sri Purandaradasa...ofcourse through Trinity till date....
Others may very well add their views and informations for more knowledge.
This is only a gist . For a detailed study , you will need a life time.There are quite a number of researchers in this field. Our own Madras Univ Music dept has done a lot of researches in this line.