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 |
| Parameters: |
16 Individuals, 6 Generations, 4 Individual Tournament Selection, Max
Depth 6 |
| Terminal Set: |
Notes C-2, C#2, ..., A#3, B-3, and RST |
| Function Set: |
Play-One, Play-Two, Add-Space |
|
| 2tune.au |
| Parameters: |
16 Individuals, 6 Generations, 4 Individual Tournament Selection, Max
Depth 6 |
| Terminal Set: |
Notes C-4, C#4, ..., A#5, B-5, and RST |
| Function Set: |
Play-Two, Add-Space |
|
| 3tune.au |
| Parameters: |
16 Individuals, 6 Generations, 4 Individual Tournament Selection, Max
Depth 6 |
| Terminal Set: |
Notes C-4, C#4, ..., A#5, B-5, and RST |
| Function Set: |
Play-Two, Add-Space, Play-Twice, Shift-Up, Shift-Down, Mirror, Play-And-Mirror |
|
| 4tune.au |
| Parameters: |
16 Individuals, 6 Generations, 4 Individual Tournament Selection, Max
Depth 6 |
| Terminal Set: |
Notes C-4, C#4, ..., A#5, B-5, and RST |
| Function Set: |
Play-Two, Add-Space, Play-Twice, Shift-Up, Shift-Down, Mirror, Play-And-Mirror |
|
| 5tune.au |
| Parameters: |
16 Individuals, 6 Generations, 4 Individual Tournament Selection, Max
Depth 12 |
| Terminal Set: |
Notes C-4, C#4, ..., A#5, B-5, and RST |
| Function Set: |
Play-Two, Add-Space, Play-Twice, Shift-Up, Shift-Down, Mirror, Play-And-Mirror |
|
| 6tune.au |
| Parameters: |
16 Individuals, 6 Generations, 4 Individual Tournament Selection, Max
Depth 12 |
| Terminal Set: |
Notes C-4, C#4, ..., A#5, B-5, and RST |
| Function Set: |
Play-Two, Add-Space, Play-Twice, Shift-Up, Shift-Down, Mirror, Play-And-Mirror,
ADF0, ADF1, ADF2 |
| ADFs: |
ADF0: No parameters, doesn't call other ADFs
ADF1: One parameter, doesn't call other ADFs
ADF2: No parameters, calls ADF0 and ADF1 |
|
| 7tune.au
7tune-1.au (Gen2)
7tune-2.au (Gen3)
7tune-3.au (Gen4)
7tune-4.au (Gen5)
7tune-5.au (Gen6)
|
| Parameters: |
16 Individuals, 6 Generations, 4 Individual Tournament Selection, Max
Depth 12 |
| Terminal Set: |
Notes C-4, C#4, ..., A#5, B-5, and RST |
| Function Set: |
Play-Two, Add-Space, Play-Twice, Shift-Up, Shift-Down, Mirror, Play-And-Mirror,
ADF0, ADF1, ADF2 |
| ADFs: |
ADF0: No parameters, doesn't call other ADFs
ADF1: One parameter, doesn't call other ADFs
ADF2: No parameters, calls ADF0 and ADF1 |
|
| 8tune.au
8tune-0.au (Gen1)
8tune-1.au (Gen2)
8tune-2.au (Gen3)
8tune-3.au (Gen4)
8tune-4.au (Gen5)
8tune-5.au (Gen6)
|
| Parameters: |
16 Individuals, 6 Generations, 4 Individual Tournament Selection, Max
Depth 9 |
| Terminal Set: |
Notes C-4, D-4, E-4, F-4, G-4, A-5, and B-5, and RST (C-Major Key) |
| Function Set: |
Play-Two, Add-Space, Play-Twice, Shift-Up (in key), Shift-Down (in
key), Mirror, Play-And-Mirror |
|
| 9tune.au
9tune-0.au(Gen1)
9tune-1.au(Gen2)
9tune-2.au(Gen3)
9tune-3.au(Gen4)
9tune-4.au(Gen5)
9tune-5.au(Gen6)
9tune-interesting.au
|
| Parameters: |
16 Individuals, 6 Generations, 4 Individual Tournament Selection, Max
Depth 9 |
| Terminal Set: |
Notes: C-4, D-4, E-4, F-4, G-4, A-5, and B-5, and RST (C-Major Key)
Pseudo-chords (three note sequences): C-Chord, D-Chord, E-Chord, F-Chord,
G-Chord, A-Chord, B-Chord |
| Function Set: |
Play-Two, Add-Space, Play-Twice, Shift-Up (in key), Shift-Down (in
key), Mirror, Play-And-Mirror |
|
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.