Jump to content

Genetically Evolved Music?


lof

Recommended Posts

I had this thought on my mind for a while now.

How about evolving melodies, harmony or even the whole piece genetically?

Melodies would have to mate to create offspring melodies with some mutations and then through a process of selection the 'perfect' melody could arise.

It could be used either to develop main themes or something else ;)

I was thinking about it for a while and I think I'm just about to start coding.

Would anyone of you be interested in such a project?

To be honest I'm looking to hear back especially from older part of the forum, people with a lot of experience in music and composing, people who actually know how the music is structured but younger and eager composers are welcome as well.

Just tell me what you think.

Link to comment
Share on other sites

I had this thought on my mind for a while now.

How about evolving melodies, harmony or even the whole piece genetically?

Melodies would have to mate to create offspring melodies with some mutations and then through a process of selection the 'perfect' melody could arise.

It could be used either to develop main themes or something else ;)

I was thinking about it for a while and I think I'm just about to start coding.

Would anyone of you be interested in such a project?

To be honest I'm looking to hear back especially from older part of the forum, people with a lot of experience in music and composing, people who actually know how the music is structured but younger and eager composers are welcome as well.

Just tell me what you think.

I think its a wonderful idea, actually. I've tried in my own compositions to create something similar. I would be interested.

Link to comment
Share on other sites

Hard to build anything around theory of evolution since there's no "functional" way to categorize melodies, they'd just end up similar to whatever model you're using.

And of course what is a "perfect" melody is another totally different thing altogether.

Link to comment
Share on other sites

It's been done before - a fellow postgrad student I know wrote a piece called 'Mutations' which was based on the idea you describe. But in fact the idea of spinning out a small piece of material into a larger form, generating subsidiary ideas is almost as old as music. Medieval composers took existing plainchant melodies and decorated them to produce a vastly bigger composition from a single source. Haydn keeps spinning out the same motifs in new ways, whilst Brahms and Sibelius 'rotate' the same section within a symphonic movement so that the whole piece is a series of developing variations - which are in turn made from small motifs constantly re-arranged in the manner of Haydn. Strict serial music is a process of 'evolving' a 12-note row through arranging it in different combinations. And so on. You see my point though - almost the whole of Western art music is based on the idea of taking something small and changing it a little, to the extent that one might theorise it is actually an inherent process in both human creativity and biology. You can certainly base a piece on the idea of 'evolving' a melody - in Vaughan Williams' Eighth Symphony (a shockingly underplayed work) the first movement is a series of 'variations in search of a theme' - that is, we are gradually given more and more of the theme (never presented in full) as we move through the variants of it. The 'swan hymn' in the finale of Sibelius' Fifth is a direct consequence of all the melodic motifs heard so far in the symphony, as is the trombone theme in his Seventh.

The scientific side of me would beg leave to correct your notion that the evolutionary process seeks a goal of producing a 'perfect' organism, but that's a bit off topic...

Link to comment
Share on other sites

Nice idea, not perfectly new though. There are quite a few composers who use biological growth algorithms or evolutionary systems for their compositions. Which doesn't mean it's a field that's already "fully covered". It is a very broad idea, so there can be a wide range of musical approaches to this.

The most important question here is not so much to decide to "make a piece based on evolution", but to determine what that -exactly- means to you, musically. What are your musical parameters? In what way do your patterns mutate? In what way do they "reproduce"? And probably most importantly: What is your selection criteria for letting one mutation die and another survive?

If you want to take your own concept seriously and not just come up with "just a set of variations on a theme" (or Sch

Link to comment
Share on other sites

Having read Gardener's post, I forgot to mention minimalism. Here, there are some pieces that literally move from one cell of material to another via intermediate stages. The works of Andressen, Glass, Reich and Riley et al might yield some inspiration.

Link to comment
Share on other sites

Ok, I am surprised with the response I must admit. Both in quantity and quality.

As you probably have noticed I'm fairly new to the forum. So far I only posted to revisions topics and that was somehow different. It made me use language I thought will be more appropriate and easier to understand with 'melodies', 'themes' and 'perfect'.

So please let me change it now and go into more details.

I said 'perfect' melody. So the question arises if evolution ever produces anything perfect. Obviously not. In Genetic Programming you stochastically transform populations of programs into new and (only) hopefully better or fitter programs, where fitness is a measured value reflecting how close / far the algorithm's output is from the desired one.

As SSC has noticed there is no functional method of comparing fitness of two melodies.

But you don't need to have mathematical concepts involved to tell what you like more.

An individual growing the music could be presented with three or four sample melodies and asked to select the best or the worst of the set (positive or negative selection).

I can even imagine having an interactive installation evolving music where the fitness is measured by visitors movement and opinions.

Siwi, it all has been done before. Or not? It depends how you understand IT.

You are right that the whole western music is somehow based on evolving small fragments into larger and larger bits all the way to 19th century and it Motivisch-thematische Arbeit. Then we had mathematically structure works and on counterweight

aleatory music. And still with the majority of music history being around sipping small bits around you won't say, there isn't a big difference in the end results.

And there is huge difference between consciously evolving theme and stochastically changing structures.

Gardener, I think, got what I was thinking about. And I fully agree that the most important question is to determine what _exactly_ it means. That is why I started the thread, this discussion in hope that together we could find the answer.

And also I hope to find more possible uses for such technique. For now I have to stop writing and do some other things but in next post I will try to describe explain in more details how I see it. What should mutate, how, and what are possible applications.

Link to comment
Share on other sites

As SSC has noticed there is no functional method of comparing fitness of two melodies.

But you don't need to have mathematical concepts involved to tell what you like more.

Just making random mutations and choosing what you personally like works of course. The question here is however whether you actually want your idea of evolutionary growth be somewhat audible by the audience, or whether it's a mere aid for yourself to write music you like. None of these approaches is wrong by any means - personally however, when I have a concept that I find interesting, I like it if it appears in a form that is in some way relevant to how the work sounds at the end, and not just a personal aid. If you only use your personal, unfiltered aide as a selector between "fit" and "unfit", the selection process may sound very arbitrary and all the audience will hear is that you're varying melodies - without being able to understand why you're changing them a certain way. That's why I'd strive for a slightly less "intuitive" method there: Instead of, in each case, just thinking "which do I like more", you could first try to work out what properties about melodies/patterns/whatever you generally like and write them down - and then use those stated criteria for your judgement. This means you're still basing it on what you like, but you're limiting your number of criteria and define them sharply, making your process a lot more clear and transparent. That's just one thought though.

Another idea that would interest myself very much however would be working with -different- "environments", i.e. selection criteria throughout the piece. Define for yourself what an "environment" is for you, musically, then prearrange certain environments in your piece and let your musical ideas mutate and propagate through them and see how in different environments different things are "fitter" and others less so.

For example: You could write an orchestral piece, where you define "environments" as "instruments". And your selection process could be as simple as "things that are easy to play on that instrument". Then you start with a certain cell, a musical gesture within a certain instrument group or several of them and let it randomly mutate and, either according to your formal plan or randly/statistically, move towards being played by different instruments and then slowly let those mutations "die" that are harder to play on those instruments - so in the end you'll end up with tons of very different mutations of your starting cell being played by different instruments (maybe at once), and get a very "idiomatically playable" music for all instruments "as a free gift" as well. But of course, that's only a rather primitive example - you could do it more sophisticatedly, or in totally different ways.

I can even imagine having an interactive installation evolving music where the fitness is measured by visitors movement and opinions.

Yes, something like this could be interesting too, and I've actually had similar ideas in the past. A large setup of many speakers, all with proximity sensors next to them and you're letting random mutations go through all of them and see where most people are walking towards, and letting these persist and others die. Sort like a simulation of the "market". Quite a contemporary idea :P

But the contrary might be interesting too: Letting the preferred versions die, and the others persist, creating a music that always sneakily avoids the audience. Or maybe don't even let the preferred versions die, just make them "sterile" and not able to mutate anymore and see how long it takes for the audience to get bored when their favourite sound just becomes stagnant and repeats over and over again.

But, as always, the idea is only the first tiny, tiny, tiny aspect. The question of how to execute it can totally destroy your clever idea, or make a seemingly banal idea suddenly very interesting.

Link to comment
Share on other sites

In this discussion, the question of what makes a musical fragment (or whole) fitter than another has of course been raised. And of course the one answer that comes immediately to our minds is listener/composer preferences. While I do think that such an approach has merit I think that it has serious limitations as well. Specifically:

1) The process of evolution is already implicit in most composition processes. Evolution takes place any time a composer engages in trial and error to any degree, or decides to eliminate any component of a piece that he/she sees as inappropriate, insufficient, unappealing, or unconducive to a given end.

2) Music has been evolving for as long as it has existed. Almost any music that is appreciated today has evolved from previous music. Music that was not as 'fit' did not make it very far past conception, or very far past the 'environment' (cultural preferences) that it evolved to inhabit. In other words, music is evolving as we speak with the power of a planet's worth of composers and listeners. To compete with that power, or even approach it, with the resources presently available to any individual is incredibly unfeasible.

3) Musical preferences tend be strongly effected by environmental influences (such as culture) that A) tend to act over long periods (months to years) B) result in long term changes that frequently remain in effect (though often to diminishing degrees) for the rest of the individuals life and C) have a decreased ability to affect change in older individuals.

The overall effect of that is that the rate of evolution of music is effectively bottlenecked by the rate of change in individual's preferences. Of course, music may still evolve within the environment of present musical preferences, but because of punctuated equilibrium, the rate of improvement of that music will decrease the further we go in time from the initial change in selective pressure. Also, individuals seem to prize (perceived) originality over imitation, which paradoxically favors designs that tend (or at least seem) to be less evolved (occurring earlier in time) than those that come after.

In other words, even if you can outpower global evolution you will still face a degree of limitation from the dynamics of individual preferences.

4) Finally, an individuals ability to accurately rate the superiority (in this case defined by preference) of numerous similar items decreases with the number of total items they are rating. Also, an individuals preferences will fluctuate across time. The ultimate effect of those two points is that you would need a substantial group of people to act as judges (to control for variance and order effects), judging a limited number of items at one time, and the judging process would have to take place over days, months, or years (depending on the number of generations you choose to go for) in order to prevent individuals from overly suffering sensitization effects (increasing standards of judgement, inaccurate memories, context effects of previously heard music.)

In light of those considerations, I believe the only feasible way to pull something like this off would be to use an artificial neural network design that involves 'training.' The reason I believe that is that sufficiently advanced computers could potentially rival the 'evolutionary proccessing power' of earths population as well as overcome human limitations on the evolution of music.

Unfortunately, at this time computer power and neural network theory are not sufficiently advanced to handle this task, though some limited success has been achieved in the field of AI composition.

Link to comment
Share on other sites

  • 2 months later...

It's interesting. However, the difficulty I see in creating "significant" music by genetic algorithms is that you need an object function to maximize - in the simplest case, some algorithm that, given two pieces from the previous generation, takes one as better than the other and let it live, and suppress the other. So you need to program a musical judge. Some things (e.g, technical feasibility of the piece given the instruments, or other technical issues) could be easy to program. With some more difficulties you can program certain kinds of adherence to some style - e.g., harmonic common practice for a choral. What about more important things like piece unity, correct development of the material, beauty?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...