My Spring semester mini-project here at the University of Birmingham is on the use of Genetic Programming techniques to allow computers to compose music. Genetic Programming is an Artificial Intelligence technique that evolves "fit" individual programs from an initially random population of programs. In the case of music, fitness can be defined as how pleasing it is to listen to a particular sequence. For now, all of the pieces are short melodic sequences, generated by programs which are a series of commands such as play these two note sequences, or play the note sequence shifted up. The problem with genetic programming is that tens to hundreds of individuals need to be evaluated over many generations before a satisfying individual is found. Since fitness here is measured as how pleasing the sequence sounds, somebody must sit down and listen to potentially thousands of pieces, many of which may be terrible. The long term goal of this project, therefore, is to take data of people rating pieces in GP runs with fewer individuals and generations, and use that to construct a neural net or mathematical function which can rate individuals in the absence of a human. This stand-in can then be used in more extensive runs to generate pleasant sounding musical pieces.
The program is run under just about any UNIX/X-Windows environment, with the development system being a 133MHz Pentium system with 32 MB of RAM running under Linux. When run, the simple X-interface shown below comes up and prompts the user to rate each individual in the generation. After this a new generation is created and the process repeats.
This section contains some of the musical sequences generated during the development of the GP system to date. Unless otherwise specified, the piece is the best of run individual. Each piece is accompanied by the details of the parameters and function/terminal sets in use when the sequences were created. Earlier pieces were generated earlier in the development of the software. The GP code is based on the Lil-GP programming system developed by Doug Zongker at Michigan State University.
Sequence in AU Format |
Details of GP Run |
||||||||
1tune.au |
|
||||||||
2tune.au |
|
||||||||
3tune.au |
|
||||||||
4tune.au |
|
||||||||
5tune.au |
|
||||||||
6tune.au |
|
||||||||
7tune.au
7tune-1.au (Gen2) |
|
||||||||
8tune.au
8tune-0.au (Gen1) |
|
||||||||
9tune.au
9tune-0.au(Gen1) |
|
The following gzipped tar file contains the source code for the GP-Music System. With minor modifications it should run on any Unix workstations with audio output. The xforms library needs to be installed on your workstation, and a means of playing XM mod files to the audio on your workstation is needed. A README file is included in the tar file with more details.