Research->Genre Study->Ethnic Music->Gamelan Music
What is ethnic music? What element distinguishes an ethnic music style from other ethnic music styles? For example, what is the difference between Okinawa music and Scotland music? I think elements of music are (1) melody (scale), (2 ) chord, (3) rhythm, and (4) instruments. 
First, let's think about melody. Rock and Blues are easy examples, even though they are not ethnic music. Rock uses normal music scale while Blues includes blue-notes in its music scale. Next, think about chords. Rock uses simple chords (triad) while Jazz includes 7th in its chords. Chord progression of Jazz is more complicated than that of Rock as well. For rhythm, Rock uses 8 beat, Fusion uses 16 beat, Jazz uses 4 beat. Finally, think about musical instruments. It is easy to see differences between Classical music and Rock music. Especially, musical instruments are important elements of ethnic music, since each country has different music instruments. 
I am trying to capture features of each ethnic music style based on this idea, and to reproduce them with automated composing system. This page includes considerations that I faced when I embedded functions of ethnic music composition.
Gamelan Music
Typical Gamelan Music consists of continuous sound of gongs. Flute sound or human voice are upon the sound of gongs occasionally. Gamelan is a general name for musical instruments of Indonesian music. Native people call their music "Karawitan." "Karawitan" is classified by area, such as Java Karawitan and Bali Karawitan. 
There are two music scales, Slendro and Pelog. These are common in Java and Bali. Pelog includes half pitches in the scales, while Pelog does not include them. Although both scales have 5 notes basically, Pelog may consist of 7 notes, and Slendro may consist of 4 notes. Pentatonic Pelog sounds like Okinawan music scale, and Slendro sounds like Scotland music scale since it is a music scale without half pitches. Slendro divides the octave into 5 evenly spaced frequencies, and they are close to "C", "Eb", "F", "G" ,"Bb." "Automated Composing System" transfers these notes to "A", "C", "D", "E", "G" and uses them. Different musical instrument sets are used for each music scale. 
Java Gamelan has to include both musical instrument sets of Pelog and Slendro, because a music tune can include both Pelog and Slendro. There are some variations of Gamelan regarding region and time. For example, musical instruments had been changed. Therefor music scales were also changed. Furthermore, different musical instruments were used for different purposes, such as sacred ceremony, funeral, amusement. It is very hard to define gamelan music scales, because each musical instrument is tuned differently. 
Gongs' tones vary from low pitches to high pitches, and Gamelan music mixes these variations. Higher notes are used more than lower notes per major. Although real Gamelan music typically repeats the same pattern of 1 or 2 majors, "Automated Composing System" tends to generate random notes more.
Sample by Automated Composing System
Scale
Slendro "C", "D", "E", "G", "A" Pelog "C", "D", "E", "F", "G", "A" ,"B"
Instruments
Gamelan (Gongs and other instruments)
Links to related topics
"Balinese Gamelan" page of "Ancient Future" contains several MIDI files of Gamelan Music. Also some information about Balinese Gamelan is available.