Search code examples
javagenetic-algorithmevolutionary-algorithmjfugue

Looking for evolutionary music example code


I would like to implement an interactive evolutionary algorithm for generating music (probably just simple melodies to start with).

I'd like to use JFugue for this. Its website claims that it is well-suited to evolutionary music, but I can't find any evolutionary examples.

I already have a framework to provide the evolutonary machinery. What I am looking for is some simple, working code that demonstrates viable approaches for the musical part (e.g. suitable encodings and evolutionary operators for the evolved tunes).

I have some ideas how it might be achieved, but I'm not particularly knowledgeable about music theory, so to start with I'd like to just reimplement something that is known to work.

So does anybody have, or know of, any freely available code (any language is fine) that demonstrates one or more approaches to evolutionary music?

EDIT: I'm specifically looking for evolutionary code rather than other techniques that could be used for music synthesis.


Solution

  • So far I've found only this, which is a genetic programming example in C.

    Update (January 2010): And this online system, which doesn't have source code but is an example of what can be achieved. I also found Grammidity, which allows for sequences of MIDI events to be evolved from grammars.

    Update (July 2011): I've just found some relevant Python code on the MIT Open Courseware site.