Page  270 ï~~A FUZZY-SET-THEORETIC FRAMEWORK TOWARDS COMPUTER GENERATION OF ALAP PATTERNS IN HINDUSTANI MUSIC Dr LM Chelpa National Institute for Training in Industrial Engineering Vihar Lake Road, BOMBAY, MH-400 087 INDIA ABSTRACT: The advent of theoretical computer science, and artificial intelligence has enabled researchers to look at music from totally different viewpoints. Though the application of computers in the analysis & synthesis of western music is an old phenomenon, it is relatively new in Indian music. This paper proposes a framework based on fuzzy set theory, for the generation of alp patterns in hindustani music. Having identified the different levels of abstraction in the a/lp patterns, this paper proceeds to discuss fuzzy-set-theoretic techniques which can be used for computer implementation of the rules at each level of abstraction. 1.0 INTRODUCTION The advent of theoretical computer science and artificial intelligence has enabled researchers to look at music from totally different view points. Though the application of computers in the analysis and synthesis of western music is an old phenomenon, it is relatively new in Indian music. Arnold [2] has analyzed alap (to be explained later) patterns for two rigs (to be defined later) in order to study a list of allowed moves, which is further used to isolate and study the contextual use of minimally sized kernels of musico-lingustic meaning. Computer Group at TIFR, India [4,18,19] had attempted to reproduce the output of veena (a stringed instrument) on a computer through synthesis. Bhaskaran [3] tried the Markoff process approach to generate musical phrases in Carnatic music. Parikh [16] used Monte-Carlo simulation in order to generate musical phrases for a rag in hindustani music, but no computer implementation has been discussed. Chelpa [6] had used fuzzy algorithmic approach [22] towards the generation of al'p patterns in hindustani music. Present paper attempts to identify the various levels of abstraction in alap and the rules concerning each level. It is further attempted to identify the fuzziness in these rules and discuss ways of tackling it using fuzzy-set-theoretic methodologies. However it is not attempted to document all the rules governing alp. 2.0 HINDUSTANI MUSICAL TERMINOLOGY Indian classical music is broadly classified into Hindustani music and Carnatic music. The rendering of hindustani music is characterized by (1) Alip, (2) Vilambit, (3) Madhya Laya and (4) Drut Laya. In step (1) the musician expounds the beauty of the rig (melody) through improvisations with no percussion accompaniment. For a hindustani musician, al~p forms a very important component of a concert as the finer nuances of the r~g can be brought out as the musician need not comply with the requirements of the rhythm. Steps (2) through (4) are mainly ICMC 270

Page  271 ï~~composition oriented where the percussionist accompanies the musician. Vilambit, Madhya Laya and Drut Laya compositions have, respectively, slow, medium and fast rhythmic components. The two major components of any hindustani music item are the swara vistar and the tin. The essential differance between these two is that given a musical phrase and a unit of time, the number of swarns (notes) appearing on an average in one unit of time is far less in swara vistar than in tin, meaning that swara vistar has a very slow movement where as a tin has a fast movement. Over the centuries musicians have identified seven musically appealing sounds and named them 'Shadja', 'Rishab', 'Gandhar', 'Madhyam', 'Pancham', 'Dhaivat', and 'Nishad' which respectively correspond to C, D, E, F, G, A and B notes of the western music [17]. These are abbreviated respectively as S, R, G, M, P, D and N and pronounced as Sa, Re, Ga, Ma, Pa, Dha and Ni. A rag normally consists of a minimum of five swarns both in the iroh (ascent) and the avaroh (descent) [11]. The swaras a rag can take are classified as vidi, samvidi and anuvidi. Vidi (sonant) [17] is the most important swara in the rag. Samvidi (sonant in the next tetrachord) is the swara second in importance to the vidi swara. Anuvidi swaras are those swarns that are allowed in the rig other than vadi and samvdi. Those swars that are not allowed in the rig are known as vivdi swaris. In addition to these, a rig is characterized by its pakad (characteristic phases). The pakad brings out the beauty of the rig while keeping its uniqueness intact. 3.0 RULES FOR ALAP The alip movement is guided by a set of loosely structured rules as shown in Fig. 1. There is a lot of uncertainty in these rules. This uncertainty is the one that enables musicians to bring about the requisite variety in their rendering. Some typical rules for alip are discussed below. E-L.evel: The E-level, the edifice level, is the highest level in the levels of abstraction. This is the level at which decisions regarding the rig to be played, the duration for which it is to be played are taken depending on the mood and the time. For example, the composition can be in rag Yaman Kalyan to be played in a very slow tempo depicting a meloncholy mood for a duration of half an hour. Though considerable research needs to be done, some qualitative results are available regarding the relationship between the emotions and rags [10] and emotions and swars [20]. The association of rags with particular time such that the emotion the rig evokes is most compatible with certain time of day or night is an interesting feature of hindustani music. The rules for such associations involve considerations of either scale, position of v'di swara, or the rigs tonal movement [8,9]. In the present context, the decision to be taken regarding the rg is dependent on the mood to be depicted which inturn is dependent on the time. Though rules concerning such a choice are adhoc [7], most musicians tend to use such rules in deciding the choice of the rig. For example, one sample rule would be RULE 1: "If the time of the day is early hours of morning, then choose rig Bhairav". Another factor which influences such a choice is the season. In hindustani music there are rgs for every season, and it is believed that in a particular season an overall mood prevails. Hence, musicians can play the rig of the season at anytime during that season. One such rig is Megh which is played during mansoon. A rule which allows such a choice is RULE 2: "If the season is mansoon, then rig Megh can be chosen irrespective of the time". ICMC 271

Page  272 ï~~E-Level El I...-----.I ------I ---------- M-Level M1 M2 M3 M4... ----------....--------I!---------- P-Level P1 P2 P3 P4.... -------..I---- ----I..........! T-level T1 T2 T3 T4... I------I------------I R-Level R1 R2 R3 R4.. I------I----------- S-Level S1 S2 S3 S4... Fig 1. Hierarchy Depicting The Levels Of Abstraction In Alap MLey-l This is the musical theme level. Each musical theme corresponds to alp around a particular swara which has been chosen as the theme. In essence the musician weaves musical patterns such that this swara is in focus. As alip is a progressive movement from lower swars to the higher swaras, invariably swaras from lower, middle and higher octaves, respectively, qualify to be the themes. However, not all swaras a rag takes can be themes. Choice of theme swars depends on the rules governing the rig. Among the theme swaras, some form strong themes where as others form weak themes. The difference between the strong and weak themes is marginal, in that musical phrases invariably end on strong themes and occassionally on weak themes. A typical rule concerning musical themes in the case of rag Yaman Kalyan is RULE 3: "If the theme is Ma, then Ma can occur occassionally as the nyasa swara of the phrase". Nyasa swara is the trailing swara of a phrase which accentuates the phrase. A statistical analysis of the alap sketches of rag Yaman Kalyan by noted hindustani musicians performed by Arnold [2] indicates that only 1% of the time Ma has been used as the nyasa swara where as Sa, Ga, Pa and Ni have been used around 27%, 34%, 20% and 15% of the time respectively. P-Le#O Rules at the Passage level are mainly concerned with the limits of each passage and change over from one passage to the next. A musical passage is a group of musical sentences under one musical theme. Alip progresses gradually from lower swarns to higher swar's by progressively weaving patterns around the chosen theme swara. In doing so, normally, swars lower than the theme swara are chosen for composing alp phrases, though there are exceptions ICMC 272

Page  273 ï~~as is evident from the alfp sketch in Fig 2. This means that more combinations are possible as higher swaras are chosen as theme swaras. Hence, the allocation of the total duration available to each theme swara has to be done in such a way that the duration of the theme swara increases progressively as the theme swara moves from lower swaras to higher swaras. In reality, a musician doesn't allocate durations to the themes, but develops a feel for the time lapsed by having a fuzzy count of the time spent on various swaras. Also, when the artist wants to change over to a new theme, he/she suggests that subsequently a new theme will be chosen. This raises expectations in the audiance. Suggestions are brought about either through the use of the several alankaras (ornamentations) along with the theme swara or by playing the next theme swara in its own right but with very low emphasis. A rule which characterises such an expectation is RULE 4: "If sufficient time.. has lapsed on the present swara and a suggaestion is being made then it is likely that the next theme swara will be chosen shortly". T-Lv The sentence level essentially focusses on the constituents of the musical sentences. Any musical sentence contains a subject. The theme swara under consideration can alone constitute the subject or the subject can be a musical phrase which normally ends on the theme swara. It doesn't necessarily mean that the theme swara has to always be a member of the subject. Such subjects can be interpreted as sub-themes of the overall musical theme. Playing such musical themes calls for a very high level of virtuosity on the part of the musician as he/she is not expected to dilute the main theme. The al'p sketch [15] in Fig 2 indicates that Ni Dha (N D) is the subject while Dha is the theme. The selection of the subject is done at the T-level. Subjects are normally the complete pakad or a part of a pakad and are chosen keeping in view the rules regarding nyasa. A typical rule at this level would be RULE 5: "If rag is Bhoop, then select apart of the pakad phrase as the subject such that the nyasa is either Sa or Ga". (1) D D M GR G M DN D; (2)DMGRS R G M DND; (3)N N D D N D; (4) M M G G DDMMNND D N D;(5) N D N M,DMDG, M G M R, G RGS, R G M D ND; Fig2. Partial Alap Sketch Of Rag Gurjari Todi R-Level: The phrase level focusses essentially on the rules governing the formation of the musical phrases. The number of swaras which constitute a musical phrase can vary anywhere from one swara to many where many can be of the order of 10 to 15 swars or even more. A musical phrase essentially is a series of swaras which is musically meaningful. A group of musical phrases constitute a musical sentence. In hindustani music literature various musical phrases are described as alankaris. Alankaras consist of various types of progressions of swaiTas both in the aroh and in the avaroh, for ex: SRG,RGM,GMP...; SG,RM,GP...; SNDP,NDPM,DPMG...; etc [11]. An analysis of the arp sketch shown in Fig. 2 reveals that the first phrase is straight avaroh from from Dha to Re and then it is a iroh from Re to Dha with the phrase ending on the subject. The first Dha which doesn't feature in the above explanation can be viewed as a swara played to emphasize the theme. Emphasis is normally given by repeating the swara successively or by playing it for a longer duration. Another type of alank'ra, viz., Ma Ga, Dha Ma, Ni Dha, with each swara repeated twice appears in the third phrase. The second and fourth phrases can also be analyzed in a similar fashion. Given the first phrase of Fig. 2 a musician will be able to generate many more phrases ICMC 273

Page  274 ï~~from this by slightly perturbing it. Some of the ways in which it can be done are discussed below. Instead of stopping the avaroh at Re, a musician can proceed upto Sa as is done in the second phrase. Yet another way is by varying the durations for which each swara is played. These can be expressed as rules as follows: RULE 6: "Vary the phrase's limit lighty", RULE 7: "Emphasize the theme swara m..re", and RULE 8: "Var1 the durations of the swaras in the phrase". One point to be borne in the mind is that these rules are context dependent. S-Level The lowest level in the hierarchy is the swara level. At this level one is concerned with the intonations of the swars and their frequencies. There are different ways of intonating the swaras, for ex: kan, meend [15], etc. Kan basically concerns with the playing a swara with a touch of another swara. Here kan swara basically graces the main swara. Invariably kan swara will be of a very short duration compared to the main swara. This can be expressed as RULE 9: "If a swara is used as a kan swara then it is to be played for a very short duration". While playing meend also a musician plays the swara with a touch of another swara with a difference that in meend the movement from one swara to the next is very gradual. This is expressed as RULE 10: "If meend is to be played, then the movement from the meend swara to the main swara has to be very gradual". Another important type of intonation used in hindustani music is3ndolan, i.e., oscillating a swara. This has been a phenomenon of interest to many researchers [14]. Andolan of Ga in rag Darbari is very pronounced. Mark Levy sketches fourteen examples of Ga in Darblri by various musicians. These indicate various ways in which ndolan can be executed. A general rule concerning andolan is RULE 11: "If a swara has to be played with indolan then vary the pitch of the swara within limits". Laboratory studies [1,14] have shown that the frequencies taken by each swara have been varying from musician to musician and also from one performance to the next for the same musician. Mark Levy observed that the average pitch is relatively consistent from one performance to the next. 4.0 FUZZY-SET-THEORETIC FRAMEWORK This section focusses on the identification of fuzziness in the rules discussed in the previous section and relevent techniques which can be used to implement these rules on a computer. It can be observed that the underlined words in these rules have fuzzy connotations. Hence, computer programs which deal with such fuzzy knowledge bases have to essentially reason in imprecise and non-quantitative terms. Although present-day computers are not designed to execute fuzzy instructions, they can be programmed to do so [5]. Choice of a rg based on rule 1 requires mapping of the time of performance on to an interval whose end points are fuzzy. A peculier case can be one where a musician can start the performance at a time instant which properly qualifies to be called "early hours of morning" with most of the remaining part of the performance falling into "late hours of morning". This results in a partial match between the facts and the rules. Methodologies for dealing with such knowledge bases are discussed by Zadeh [24]. Similar explanation can be offered in the case of "season" in rule 2. The words "occassionally" in rule 3 and "likely" in rule 4 can be implemented as fuzzy probabilities [13,21] as "occassionally" is derived from fuzzy statistical information and "likely" is basically a fuzzy expected value. The word "sufficient time"in rule 5 as explained in section 3 is a fuzzy measure of the time lapsed and is derived from the fuzzy information about the time spent on the musical ICMC 274

Page  275 ï~~sentences in the present passage where as in the case of "a part" in rule 5 the fuzzy count is derived from non-fuzzy information. As discussed by Zadeh [22], the words "shortly, "slightly" and "short" are fuzzy quantifiers. An observation of rule 4 indicates that the change over from the current theme to the next theme will be done in the next few sentences. But it doesn't give a clue to the exact instant when this would occur. This is dependent on the intentions of the artist as to how long the artist wants to sustain the expectancy in the audiance. Similarly, in rule 6 the limit can be reduced or increased depending on the current position of the limit and the mood of the artist. In rule 9 normally the duration varies from occurance to occurance within a very small interval. Hence, fuzzy sets can be defined corresponding to "short". "Very" can be implemented as a linguistic hedge [22]. Various techniques for handling fuzzy quantifiers are available in literature [12,24]. The fuzzy predicates "suggestion" in rule 4 and "more" in rule 7 can be implemented as a combination of many more rules. Possible rules for these can be derived from the discussions in section 3. The variation of durations as indicated in rule 8 is essentially the problem of assignment of fuzzy values to durations which are derived from the existing durations and the rules regarding the importance of swarns. The words "gradual" in rule 10 and "vary" in rule 11 can be implemented as S-functions [23]. This implementation enables us to build into the system a lot of variety regarding meend and andolan. This variety can be obtained by varying the parameters of the s-function. In case of "limits" in rule 11 the problem is of selecting the upper and lower bounds for the pitch in a fuzzy range. 5.0 DISCUSSIONS Having identified the six levels of abstraction in alap, some of the rules which govern each level have been discussed. As is seen in section 4, fuzzy-set-theoretic methodologies offer a natural way of dealing with the type of uncertainty observed in these rules. Another important aspect of such an implementation is that the system is full of surprises for the audiance while conforming to the structure of the rg. 6.0 REFERENCES 1) Arnold EJ & Bernard Bel "A scientific Study of North Indian Music", NCPA Quarterly J. vol XII, No.2 & 3, 1983. 2) Arnold WJ "Raga Rupa: Computer Analysis and Sangita Sastra", Personal Communication, 1986 3) Bhaskaran K "Creation of Kalpana Swaras: Computer's Aid Enlisted", Sruti, Feb, Pp 11 & 13, 1986. 4) Bidnurkar MG and Padma Rangachari "Generating Instrumental Music by the Computer", NCPA Quarterly J., Vol 1, #2, pp 55-64, Dec, 1972. 5) Chang SK "Fuzzy Programs: Theory and Applications", Proc. Polytechnic Institute of Brooklyn conf. on Computers and Automata, NY, 1971. 6) Chelpa LM "Computer Generation of AI~p Patterns Using Fuzzy Sets", Nat. Syst. Conf, Bombay, Pp. 401-407, 1984. 7) Das KN "Time Theory of Ragas (North India)", J. of the Music Acad, Vol XVII, Madras, The Music Acad, 1951. ICMC 275

Page  276 ï~~8) Deva BC "Ragas and their Time", Psychoacoustics of Music and Speech, Madras, The Music Acad, 1967. 9) Deva BC "Music of India: Scientific Study", Munshi Ram Manoharlal, Delhi, 1980. 10)Deva BC "An introduction to Indian Music", Publications Div., Min. Info. and Broadcasting, Govt. of India, New Delhi, 1981. 11)Devar PBR "Rag Bodh" Smt Champavati Deodhar, Bombay, 1983. 12)Eli Sanchez "On the combination of Fuzzy Quantifiers in Natural Language", Proc. of the American Control Conf. San Diego, CA, June 6-8, 1984 13)Kandel A and Byatt WJ "Fuzzy Sets, Fuzzy Algebra and Fuzzy Statistics", Proc. IEEE, vol 66, pp 1619-1639, 1978. 14)Mark Levy "Intonation in North Indian Music", Biblia Impex Pvt. Ltd., New Delhi, 1982. 15)Omkar Nath Thakur "Sangitanjali", Srikala Sangit Bharati, Kasi Hindu Viswavidhyalaya, Varanasi, Vol.6, 1962. 16)Parikh KS "Music Research on Computers, Why and How to Make Computers Sing", Sangit Natak, Jul, Pp.106-13, 1970. 17)Ravi Shankar "My Music & My Life",Vikas Publ.Delhi, 1968. 18)Subramanyam N and Thosar RB "Computer Simulation of Instrumental Music", TIFR, Report # 59,1969. 19)Subramanyam N and Thosar RB "Computer Simulation of Instrumental Music", The J. of CSI, Vol.1, #2, Dec, 1970. 20)Sunil Bose "Indian Classical Music: Essence and Emotion", Vikas Publ. House Pvt. Ltd., Delhi, 1990. 21)Zadeh LA "Probability Measures of Fuzzy Events", J. Math. Anal. and Appl., Vol 23, pp 421-427, 1968. 22)Zadeh LA "Outline of a New Approach to the Analysis of Complex Systems and Decision Processes", IEEE Trns. Sys, Man & Cyb. Vol. 1, # 1, Pp. 28-44, 1973. 23)Zadeh LA "Fuzzy Sets", in "Encyclopaedia of Computer Science and Technology", Belzer J, Nolzman H and Kent A (eds), M.Decker, N Y., pp 325-363, 1977. 24)Zadeh LA "The role of Fuzzy Logic in the Management of Uncertainty in Expert Systems", Fuzzy Sets and Systems, vol. 11, pp 199-227, 1983. ICMC 276