Open Access Open Access  Restricted Access Subscription or Fee Access

Rule-Based and Genetic Algorithm for Automatic Gamelan Music Composition

(*) Corresponding author

Authors' affiliations



This research aims to develop a system of automatic gamelan music composition. Gamelan is the traditional ensemble music of Java, Indonesia. The authors propose a model of automatic gamelan music composition which consists of knowledge, rules, and random generation. There are three types of knowledge, basic, construction, and melodic knowledge. The basic knowledge contains the general knowledge of gamelan music. The construction knowledge controls the components building a composition. The melodic knowledge controls quality of the sound. The knowledge is transformed into rules of notes arrangement used to produce the characteristic sound of gamelan music. Genetic algorithm is used to generate a composition. Gatra, the smallest unit in a composition that contains four beats (notes), is used as a variable to construct the genes of a chromosome. The fitness value is measured based on the weight of notes distribution, identical gatras and melodic features. The evaluation is conducted to measure the quality of sound of “ladrang laras slendro pathet manyura” composition created by the system. The evaluation is conducted based on Turing test which involves human experts to recognize the composition created by the system. The results show that the model of automatic gamelan music composition proposed in this research is effective. All the gamelan experts state that it is very difficult to find the differences between the composition created by the system when it is randomly arranged and other compositions created by humans. 4 out of 6 gamelan experts failed to recognize a composition created by the system.
Copyright © 2017 Praise Worthy Prize - All rights reserved.


Rule-Based; Genetic Algorithm; Gamelan Music; Automatic Music Composition

Full Text:



D. Trueman, Why a Laptop Orchestra, Cambridge Journal Volume 12, 2007.

S. Keith, Bridging The Gap: Thoughts On Computer Music And Contemporary (Popular) Electronic Music, Proceedings of the 2010 Australasian Computer Music Conference, 2010.

J.D. Fernandez, F. Vico, AI Methods in Algorithmic Composition: A Comprehensive Survey, Journal of Artificial Intelligence Research 48, 2013.

E.R. Miranda, Composing Music with Computer, (Focal Press, 2004).

L.A. Hiller, Jr., L.M. Isaacson, Experimental Music: Composition with an Electronic Computer, (McGraw-Hill Book Company, Inc, 1959).

I. Xenakis, Formalized Music: Thought and Mathematics in Composition, (Pendragon Press, 1992).

G. Nierhaus, Algorithmic Composition: Paradigms of Automated Music Generation, (Springer Wien, 2009).

K. Essl, Algorithmic Composition, Cambridge Companion to Electronic Music, ed. by N. Collins and J. d'Escrivan, (Cambridge University Press, 2007).

S. Hastanto, Konsep Pathet Dalam Karawitan Jawa, (ISI Press, 2009)

H. Kridalaksana, F.X. Rahyono, D. Puspitorini, S. Widodo, Darmoko, Wiwara: Pengantar Bahasa dan Kebudayaan Jawa, (Gramedia Pustaka Umum, 2001).

R. Supanggah, Bothekan Karawitan I, (Masyarakat Seni Pertunjukan Indonesia, 2002).

M.C. Ricklefs, Sejarah Indonesia Modern 1200-2008, (PT Serambi Ilmu Semesta, 2008).

S. Nakagawa, Musik dan Kosmos: Sebuah Pengantar Etnomusikologi, (Yayasan Obor Indonesia, 2000).

K. Ebcioglu, An Expert System for Chorale Harmonization, AAAI-86 Procedings, 1986.

R.A. McIntyre, Bach in a Box: The Evolution Of Four Part Baroque Harmony Using The Genetic Algorithm, IEEE World Congress on Computational Intelligence, 1994.

J. Becker, A. Becker, A Grammar of the Musical Genre Srepegan, (University of Texas Press, Texas, 1982)

D. W. Hughes, Deep Structure and Surface Structure in Javanese Music: A Grammar of Gendhing Lampah (University of Illinoi Press, Illinois, 1988).

Hastuti, K., Azhari, A., Musdholifah, A., Supanggah, R., Building Melodic Feature Knowledge of Gamelan Music Using Apriori Based on Functions in Sequence (AFiS) Algorithm, (2016) International Review on Computers and Software (IRECOS), 11 (12), pp. 1127-1137.

J. Gillick, K. Tang, R.M. Keller, Learning Jazz Grammars, Proceedings of the Sound and Music Computing Conference, 2009.

P. Pestana, Lindenmayer systems and the harmony of fractals, Chaotic Modeling and Simulation (CMSIM) 1, 2012.

K. M. Kitani, H. Koike, ImprovGenerator: Online Grammatical Induction For On-The-Fly Improvisation Accompaniment, Proceedings of the International Conference on New Interfaces for Musical Expression, 2010

T.M. Oliwa, Genetic Algorithm and the abc Music Notation Language for Rock Music Composition, Proceedings of the 10th annual conference on Genetic and evolutionary computation, ACM, 2008

D. Matic, A Genetic Algorithm for Composing Music, Yugoslav Journal of Operations Research, Volume 20, 2010.

N. Fortier, M.V. Dyne, A Genetic Algorithm Approach to Improve Automated Music Composition, International Journal of Computers, Issue 4, Volume 5, 2011.

K. Hastuti, A Method for Automatic Gamelan Music Composition, International Journal of Advances in Intelligent Informatics Vol 2, No 1, 2016.

Sumarsam, Introduction To Javanese Gamelan, (Spiral-bound, 1988)

R. Supanggah, Bothekan Karawitan II: Garap, (ISI Press, 2007).

M. Pearce, G. Wiggins, Towards a framework for the evaluation of machine compositions, Proceedings of the AISB 2001, 2001.

M. Benamou, Rasa: Affect and Intuition in Javanese Musical Aesthetics, Oxford University Press, 2010.


Please send any question about this web site to
Copyright © 2005-2023 Praise Worthy Prize