Computer-Aided Analysis of Javanese Music





The Gamelan and its Music

Preparing the Data

Processing: Display

Processing: Statistics

Processing: Pattern-Search

Summary and Perspective


This paper is a progress report on one facet of a continuing research project at the Institute of Ethnomusicology of the University of California at Los Angeles, under the direction of Dr. Mantle Hood1. It deals only with computing techniques and approaches; results and their interpretation will be published elsewhere

The main goal of the project is to clanfy the concept of patet (mode) in Javanese gamelan music, and to learn how requirements of patet affect and guide group improvisation (an integral element of gamelan performance). The first task set for computer-aided analysis was to test on a large data base theoretical hypotheses previously proposed by Dr. Hood from examination of a relatively limited corpus. Two phases of the job may be treated separately: (a) preparation of a computer-readable data base; and (b) processing. Before moving on to this discussion, however, a brief sketch of gamelan music will aid those unfamiliar with its terminology and terrain.

The Gamelan and Its Music


Gamelan music is organized around a cantus-frmus-like theme here called "Fixed Melody" (abbreviated FM), performed by a family of one-octave metallophones (saron) a set of gong kettles (bonang panembung) plays a simpler version of the melody. Interpunctuating gongs provide a colotomic structure, dividing the FM into regular phrases; gong, kempul, kenong, and ketuk are the main colotomic instruments. Panerusan instruments are those that improvise intricate elaborations on the FM; these include gendèr (multioctave metallophone ), xylophone, flute, vocalists, and rebab (two-string spike fiddle). Finally, a pair of drums (kendang) provides agogic accentuation, and together with the rebab functions to coordinate the ensemble.

Two tuning systems are found: sléndro and pélog. Sléndro has five pitches arranged in large seconds and small thirds ( 1 2 3 5 6); pélog, with seven available pitches (of which five are used at one time), has smaller seconds and wider thirds. In each tuning system are three patet; these are shown, together with typical cadential formulae, in Figure XIII-1.

Sléndro patet nem

6 5 3 2

Sléndro patet sanga

2 1 6 5

Sléndro patet manyura

3 2 1 6

Pélog patet lima

5 3 2 1 or 5 4 2 1

Pélog patet nem

2 1 6 5

Pélog patet barang

3 2 7 6

Figure XIII-1. The patet


The traditional notation system makes use of a vertical staff, one line per pitch. Horizontal lines mark time units. Round notes indicate the FM, hook shaped notes the bonang panembung part. Symbols on the left and right of the staff are colotomic structure and drum patterns, respectively. Recently a simplified cipher notation has been adopted. In Figure XIII-2 the same phrase is given in traditional, cipher, and Western notations.


Preparing the Data


The first data to be encoded were a collection of thirty-eight gendèr improvisations, part of a tape-recorded field collection, which were transcribed into cipher notation. The coding system devised may be termed "attributive," that is, each note is qualified by attributes (octave, duration, damping, and so on), and the resulting note groups joined into a string. This procedure soon proved troublesome. A single coding or punching error of duration-attribute would throw everything else out of phase. Code errors were difficult to detect because proofreading involved decoding and cross-checking with cipher notation.


Figure XIII 2. Traditional, cipher, and Western notations, where T = Ketuk, W = Wela (colotomic rest), K = Kenong, G = Gong. (Traditional gamelan notation from Jaap Kunst, Music in Java, The Hague, Nijhoff, 1949, used by permission of Martinus Nijhoff.)

Figure XIII 3. Gendèr transcription


Figure X111-4. Gendèr transcription selected events only (see text)


To remedy the situation, a positional notation was proposed in which each card-field space represents a predetermined time unit. This leads to a card format essentially like cipher notation itself, making for simple proofreading and keypunching directly from the cipher notation, eliminating costly intermediate coding. The gendèr transcriptions have three musical lines: FM, right-hand, and left-hand pitches (see Figure XIII-3). In cipher notation a dot placed above or below a note indicates high or low octave, and this convention is retained in the keypunch format. Thus a group of six cards with aligned fields is necessary to reproduce cipher-notation format&emdash;three "note cards" and three "dot cards." In core storage the six fields are arranged as rows of a matrix (6 x n, where n = piece length); therefore a given column of the matrix will contain all information about the selected time unit ( in PL/1 the conceptual format is an array of character strings, but the principle remains identical).

Once this convenient coding system had been established, a second dataset was selected for keypunching, consisting of eighty-two representative pieces from a large Djogjakarta kraton (palace) music manuscript Keypunching was accomplished directly from traditional notation; each four-card group includes Fixed Melody, bonang panembung part, and colotomic structure. Finally, the two corrected datasets, each about l0,000 cards, were transferred to tape for ease in processing (no processing applications have yet been necessary which would justify the extra expense of disk storage).


Processing: Display


Listing the dataset tapes can normally be accomplished on peripheral equipment, with stock programs available at most computing centers. However we found it helpful to write a tape-to-print program that checks for illegal characters and rearranges the output into a more readable format (adding spaces between card groups, and so on). With one small modification this basic program becomes a useful analytical tool. A PRINT/NO PRINT branching network, inserted at the appropriate point, establishes a "variable event-display gate," allowing the researcher to concentrate on a particular musical event in its rhythmic and structural context by suppressing irrelevant notes. Figure XIII-3 is a normal page from a gendèr transcription; Figure XIII-4 shows the same segment of music with all notes suppressed except where FM, gendèr right and left coincide in pitch. The tendency of these octaves to fall on main structural points (quadratic subdivisions of the kenong phrase, marked A, B. C, D) is clearly apparent. Six event displays have been produced so far from the gendèr dataset, two from the FM dataset, mainly dealing with dissonance treatment. This technique, of course, generates prodigal amounts of output, and might be considered inefficient in terms of "machine time." However, in "people time"--results per man-hour--it is in fact highly efficient and productive, which is, after all, the more relevant measure.


Processing: Statistics


Computer statistics are facile to the point of glibness, and one must take care to avoid being seduced into "statisticulation." Statistics have the advantage, however, of objectivity; and since ethnomusicologists frequently deal with musical cultures as external observers rather than as native practitioners, objective techniques are welcome safeguards against unconscious superimposition of alien values, which seldom apply.

The first statistical programming related to this project was an experiment in computer synthesis of Fixed Melodies, by Dr. Leon Knopoff, based on statistics from Mantle Hood's earlier manual analyses. A set of nine syntactical rules were established; those governing pitch choice were programmed using a nearest-neighbor Markoff process, with transition probabilities derived from the analysis; other rules determined form and cadence pattern. The resulting tunes were not inconsistent with the literature, but neither were they wholly satisfactory imitations, leading to the inference that more refined analysis was necessary adequately to define the style.

The FM dataset was then processed to provide more detailed and extensive statistics. Frequency counts were obtained for all pitches (to construct weighted scales), for pitches at selected structural points (gong and kenong tones), and for two-, three-, and four-note patterns. In Figures XIII-5, XIII-6, and XIII-7 part A in each figure shows nearest-neighbor transition frequencies for sample Fixed Melodies; conjunct intervals are shaded (including unisons). The first line of part B summarizes the percentages of conjunct intervals (77, 83, 76 per cent), which deviate significantly from the expectation of conjunction in a random system (44 per cent). Further, examining the other figures, one discovers marked differences in melodic treatment of the various pitches, though relatively similar percentages occur across the three patet. Pitch 8 (high 1) occurs infrequently and must be examined separately. Pitches 1 and 6 behave consistently with less conjunction than 2, 3, or 5. This may be explained by thinking of 1 and 6 as the outer boundaries of the normal melodic compass, hence more prone to skips (for example, a descending phrase 3 2 1 6 would be possible on instruments with a low 6; but the FM-carrying saron normally spans only the 1 to i octave, hence a skip up to 6 is forced). One may also note that these statistics do not violate the prominent features of the patet cadential formulae--sanga and manyura reveal prominent l-6 skips (2w5, 32w), nem stresses highly conjunct 5-3 (6v2)--and hence might reflect some kind of mutual influence or interaction between cadential formula and overall melodic motion. More positive statements would not be justified at this point. However, several interesting avenues of exploration have been opened, and additional effort spent analyzing these statistics would perhaps be fruitful, surely justifiable.


Processing: Pattern search


The patet cadential formulae are not frequently sounded in a direct fashion, but rather are varied with complex and subtle techniques. To investigate the various cadence forms, a program was developed which, once provided with the archetypal four-note formula, could recognize, isolate, and label direct or retrograde patterns with embellishments or extensions of any length. The program's vocabularly includes sixteen positive identifications and four negative responses. Figure XIII-8 is a summary of all cadence patterns found in the FM dataset, patet sanga. Figure XIII-9 is a segment of output with the relevant cadence pitches circled. Most identifications are unequivocally correct, admitting of no other interpretation; when dealing with "ambiguous" situations (insufficiently defined by program logic) the program's choices are always understandable but often the weaker of the available choices. Further development of program logic may be guided by these "wrong" responses. Programming is considerably more complex for even this kind of elementary pattern search than for the statistical and display techniques previously outlined. Nevertheless, this area of research promises to be extremely valuable as the pattern-recognition vocabulary grows larger.


Summary and Perspective


Since the inception of this project in 1964 a great deal has been learned from false starts, setbacks, and occasional successes; from these experiences the following general observations may be drawn. A research project utilizing computer-aided analysis is a complex system involving numerous interacting variables and must be treated as such if efficient production of results is desired. If at all possible, the principal researcher should have programming knowledge. If not, it appears more satisfactory to train music students in programming rather than to hire programmers untrained in music; students will generally maintain close contact with the project for longer periods of time, will be more interested in research problems and musical results, and will be able to capitalize on their new programming ability as a tool in their own research. It follows that processing methods producing useful results with simple techniques (such as display programs) are doubly efficient when used as on-the-job training for apprentice programmers. Much thought should be given the choice of a music representation code, whether to use one of the general-purpose codes now available, or to design a system to meet the special needs of the data at hand; care taken at this step can dramatically improve later programming efficacy.

This paper has dealt with the nature of the research problem, and methodologies of data preparation and processing. By means of short examples three processing types were distinguished: display, statistics, and pattern search&emdash;each capable of effective contributions toward the project's goal, learning more about patet. We will continue to construct statistical models of patet operation and check these by means of music synthesis programs. The most promising area for future development seems to be pattern recognition, and efforts will be concentrated in that direction. Though we have barely scratched the analytical surface, progress to date can be described as stimulating and most encouraging.










































Figure XIII-8. Summary of sanga cadence types



Figure XIII s. Gending Lungkeh. Slendro patet nem


Figure XIII 6. Gending Gendrehkemasan. Sletndro patet sanga

Figure XIII 7. Gending Mantra Kendo. S1endro patet manyura

Figure XIII g. Some sanga cadence patterns


UCSC | Arts Division