Abstract. A system for automatic composition using grammatical evolution is presented. Compositions are created under the constraints of a generative grammar, and under the bias of an automatic fitness function and evolutionary selection. This combination of two methods of imposing order on randomness is seen to be powerful and flexible. Human evaluation of automatically-evolved pieces shows that a more sophisticated grammar in combination with a naive fitness function gives better results than the reverse. Key words: Grammatical evolution, music, automatic composition