Ideas Are Running In My Head; Music Evolution

Bosbeetles idea?

  • Silly it'll never work

    Votes: 1 12.5%
  • Silly I like the idea

    Votes: 7 87.5%
  • Silly but I like the idea and want to help

    Votes: 1 12.5%
  • Bosbeetle shut the fuck up!

    Votes: 0 0.0%
  • Biologists make me itchy

    Votes: 2 25.0%
  • I like the concept of female files

    Votes: 6 75.0%
  • Get out of here!

    Votes: 0 0.0%
  • Evowhat?

    Votes: 0 0.0%
  • Music?

    Votes: 1 12.5%
  • This is already done much better by : [author]

    Votes: 0 0.0%
  • No.

    Votes: 0 0.0%
  • Thats not a program/game it's a waste of time.

    Votes: 0 0.0%

  • Total voters
    8

Bosbeetle

Terminally lost
Joined
Sep 7, 2008
Messages
4,275
Age
42
Location
The Netherlands
Website
Visit site
Hello all,

I am a cell biologist and I have a problem idea.

The pandora has got me excited about coding stuff however I cannot code, but I can think about coding and about programs. Thats what I've done. Ever since reading about Richard Dawkins dabblings in simulated evolution it is a concept that excites me. As well as randomized music of the likes of John Cage et.al. Recently I've been thinking about incorporating it into a program I'd like to spend time with however here I like to asses feasibility and potential.

The idea I had was about a musical evolution program, nothing to fancy, no advanced harmonics etc, more or less basic evolution theory applied to music files almost treated as if their binary code was DNA. However with a slight twist to the soley academic endeavours of many others I'd like to incorporate a human factor.

So heres the brief runthrough. Take 2 music files (one male one female; arbitrairy) split their raw data up according to some features recombine these split up parts into a new file. Randomly mutate these files. Analyse this file and asses if it is viable (according to set rules).

Then comes the human part these files then could be evaluated by human ears (first 1 pair but later maybe it could be a webbased voting system :p) and the files get a 'popularity' factor. The most popular 'files' will get an advantage and get some more children. So the created files get fed back into the program and a second generation gets generated.
This human part should be ommitable and you should be able to just skip if you want to see what the computer makes after more cycles.

With just 2 files this probably will get a bit boring soon, so I thought of the lone wolf option that is an injection of a new (insanely popular) file that will soon be assimilated among the new generation.

I could see myself playing with this for a long time as I'm intrigued by sound in general and why certain transitions sound good and others not. And I think this could lead to some very strange 'music'

(I have quite some ideas about this and put it up in a pdf, I have more ideas but havent worked them out yet)

So now for the questions to you,
What do you think about such a thing could you see yourself listening to computer generated music and rating it?
More important is it feasible for me to undertake something like this, I am quite terrible at coding but with time and help I might get somewhere?
However if I do it myself it would take many years is there somebody here that is challenged by these ideas and willing to help me start?
If I start, where should I start what language has good sound analysis libs etc. ?

link to the pdf: http://home.planet.nl/~slotm048/music_evolution.pdf
 
This sounds really, really complicated. You'd need an insane algorithm to get anything sounding even remotely meaningful. If you're not a coder then, as a first project, you'll probably end up in a mess.
 
Pleng said:
This sounds really, really complicated. You'd need an insane algorithm to get anything sounding even remotely meaningful. If you're not a coder then, as a first project, you'll probably end up in a mess.


I don't want to have it sounding meaningfull, I don't care about the musicality of it, i'm more interested in sound as is. Than again I think I have to agree that it will be complicated. I was planning on buying this book http://art-artificial-evolution.dei.uc.pt/ it also has sample code so maybe I could get stuff out of that :) (as well as brushing up on the computational side of evolution)

Than again I am more a biologist so I could get the evolution part right (or right enough) but the sound is indeed the weak spot.

(I thought it was possible to handle raw music files just a text, they have a header block and the rest is just raw data)
 
Last edited by a moderator:
too sick, didn't read.

But let me say -- when I see "I cannot code", my first thought is "yes, you _can_". IT takes years to be any good at it, but it doesn't take long to _Start it_, especially with scripting languages being not only common, but actualyl very good, these days; especialy for someone with the big credits you have to be a bio, shoudl be a piece of cake ;)

jeff
 
What would be a good scripting language to start with?

The last thing I made was in basic :D

I think I will try and write the whole thing not for sound but for strings so I get the whole backbone working. I just have to decide on what language to use. However getting stuff like length and lowest values out of a string are easy compared to getting the length and lowest values of sound.
 
I like the concept of evolution, so I like the idea behind evolutionary music. You can tell by CromoZome and my WIP Biotix that I want to create self generating games.
I've never got around to writing anything that can analyse sounds and music, but I would imagine it to be complicated... that being said I'm here to bounce around ideas if you make any progress with this! :)
 
A very tough question since it depends on many factors including..

- your interests (what you want to do with it, where you come from)
- how much support do you need (I'd say go with somethign very well established and mainstreamy, so you can get FAQs and help when you need it)
- where you want to run it (pandora? desktop? linux or windows or osx? again, g mainstream and its not a problem)
- what sort of features -- strong graphics/opengl support, or jst number crunching with ascii?
- easy to learn?

I've pretty much been coding since I was a little kid, so its hard for me to make a suggesiton that is of use, but I'm a big fan of Python for 'really useful' scripting language, that is quite popular and around.. and is on pandora already.

Python has pretty sensible syntax and enforces some style constraints making things easier to read/consistent, and yet has many of the great features of daddies like Lisp etc; pretty easy to get started with (_I_ think :), yet very flexible and solid.

You can get python for windows, linux and OSX, and well supported in all of them; there are bindings to everything (Talking to databases, doing UIs with GTK or QT or whatever, pygame etc) for all major OSes; theres crazy stuff like jython (for running python code on a JVM), but stick to standard python (cpython, the one written in C) and you should be good to go.

Ignore fancy stuff until you need it and its not too scary, hopefully :)

jeff
 
PokeParadox said:
I like the concept of evolution, so I like the idea behind evolutionary music. You can tell by CromoZome and my WIP Biotix that I want to create self generating games.
I've never got around to writing anything that can analyse sounds and music, but I would imagine it to be complicated... that being said I'm here to bounce around ideas if you make any progress with this! :)


Cool I definetly will put progress here and ideas.

torpor said:
This is something that Puredata was designed for ..


PureData looks very nice sort of like matlab, I'll definitely give that a spin :)
 
Last edited by a moderator:
The problem here is that you don't have a "working format" for performing music mutations.

Let me explain by sticking to the cell biology analogy ("translations" for computer scientists in parentheses):
If you have a DNA string ("string of bytes"), it's just a string to begin with. Then it gets scanned ("parsed") by various polymerases ("parsers"), and transformations are applied according to a strict set of rules: there are exons and introns that are omitted and/or retained according to specific nucleotide sequences ("control characters"), and the RNA ("working copy") that finally gets produced isn't the final product; it gets transformed into polypeptide chains (proteins) and much later actually becomes a part of whatever its needed for.

So if you have a cell/group of cells ("a music file") you can't, just by looking at it, tell the DNA sequence that was used to create it. And if you try to mutate the cell directly - like by ripping out parts of it and replacing it by others, it's not going to work very well; it's probably going to die ("become corrupt"). AKA: If you take an MP3 file and rearrange bytes randomly, it's not going to be playable. At all. It will probably crash most media players.

So you have to have a "working format" (DNA) and a "production format" (bacterium/animal/whatever) for your music evolution program.

The diagram you linked to contains an algorithm for transforming a production format (an audio file) into a working format (rearrangeable sound snippets separated at silent segments). This algorithm isn't very good, however, since it won't make changes to individual segments, and therefore you get resulting songs that just sound like two songs were glued together (one singer sings a verse then another...) and there won't be any interesting results.

So to make life easier and the results better, I think you should do the following: First create a working format, make some good starting songs in this format, and then evolve these songs via the evolution process.
A good artificial working format would be something like MIDI, where the segments you are able to rearrange are a lot smaller and there are a lot more of them.
Another alternative is to do something like electric sheep: create a working format that consists of just a few numbers (e.g. beat frequency, kind of beat, the basic tunes of the refrain, number of refrains, the parameters for some algorithm that picks the instruments etc), and create a huge algorithm that transforms these few numbers into music via a set of transformations.

Anyways, the most important point I'm trying to make: create a "working format", and use that as a base for your evolution system. Don't try to play Dr. Frankenstein; create DNA instead of ripping out body parts.
 
dflemstr said:
The problem here is that you don't have a "working format" for performing music mutations.

Let me explain by sticking to the cell biology analogy ("translations" for computer scientists in parentheses):
If you have a DNA string ("string of bytes"), it's just a string to begin with. Then it gets scanned ("parsed") by various polymerases ("parsers"), and transformations are applied according to a strict set of rules: there are exons and introns that are omitted and/or retained according to specific nucleotide sequences ("control characters"), and the RNA ("working copy") that finally gets produced isn't the final product; it gets transformed into polypeptide chains (proteins) and much later actually becomes a part of whatever its needed for.

So if you have a cell/group of cells ("a music file") you can't, just by looking at it, tell the DNA sequence that was used to create it. And if you try to mutate the cell directly - like by ripping out parts of it and replacing it by others, it's not going to work very well; it's probably going to die ("become corrupt"). AKA: If you take an MP3 file and rearrange bytes randomly, it's not going to be playable. At all. It will probably crash most media players.

So you have to have a "working format" (DNA) and a "production format" (bacterium/animal/whatever) for your music evolution program.

The diagram you linked to contains an algorithm for transforming a production format (an audio file) into a working format (rearrangeable sound snippets separated at silent segments). This algorithm isn't very good, however, since it won't make changes to individual segments, and therefore you get resulting songs that just sound like two songs were glued together (one singer sings a verse then another...) and there won't be any interesting results.

Yes the phenotype genotype thing I've been thinking about that, (btw I dont mind getting a frankenstein that gets all glitchy and patchy I like that, I've done some manual trials with this algorithm and it got some nice results) The rearrangement is not the only thing I was planning on using because you need mutation and I put that the diagram aswell, I was thinking along the lines of get the data out of the music file (like the raw data out of a wav file) and randomly mutate several characters. I think in the 8bit blocks in a wav you can use any number (this might not be true) so that would not corrupt the file only mutating headers etc would (for mp3 I would probably have to decode than mutate than encode again, if it is not possible to encode it it would be considered 'dead'). I think these mutation would lead to intresting crackles an noises. But your right it would be reading the 'creatures' genotype rather than its phenotype in the way I planned it. (it depends a bit where you put the border actually)

So to make life easier and the results better, I think you should do the following: First create a working format, make some good starting songs in this format, and then evolve these songs via the evolution process.
A good artificial working format would be something like MIDI, where the segments you are able to rearrange are a lot smaller and there are a lot more of them.
Another alternative is to do something like electric sheep: create a working format that consists of just a few numbers (e.g. beat frequency, kind of beat, the basic tunes of the refrain, number of refrains, the parameters for some algorithm that picks the instruments etc), and create a huge algorithm that transforms these few numbers into music via a set of transformations.

Anyways, the most important point I'm trying to make: create a "working format", and use that as a base for your evolution system. Don't try to play Dr. Frankenstein; create DNA instead of ripping out body parts.

If the recombination can be done with midi segments it would be very nice however I don't want the parts to be to small because I was aiming at preserving cetain parts and thus creating gene like segments of the 'song' however I would want to encourage I am after sound more than song so it could be selection for a cetain sound to be present.

The problem I have with the second aproach if applied to sound that it will stay 'clean'. So maybe I shouldnt call it evolution but decaying or oxidizing music however with some selection applied. (would love to see one of those electric sheep ending op glitchy as hell instead of all smooth )

Btw. in a way the file is the DNA (genotype) for the computer the sound is the organism (fenotype).

And thanks for the feedback will think more about it.
 
Last edited by a moderator:
Bosbeetle said:
The problem I have with the second aproach if applied to sound that it will stay 'clean'. So maybe I shouldnt call it evolution but decaying or oxidizing music however with some selection applied. (would love to see one of those electric sheep ending op glitchy as hell instead of all smooth )
Most electric sheep are actually chaotic; the ones you saw on the page are ones that are 1000's of generations old and thus look smooth. Or do you mean, like really chaotic images? Containing static noise and so on?

((naw)mcx created a series of images on my PandoraWalls site, where he used the Flam3 algorithm that is also used in electric sheep; they are a little bit more chaotic. See this.)

If you want more chaos in the music, but so that it still can sound good, just use the parametric evolution method that I suggested and use fractal functions instead of linear functions (let the seed for the beat be fed through a state machine a few evolutions and use that as the real beat pattern etc.). That way, one can do random mutations while still getting music that sounds good (because as you say - changing random bytes in samples will only lead to crackles)

Bosbeetle said:
Btw. in a way the file is the DNA (genotype) for the computer the sound is the organism (fenotype).
Yeah I at first wanted to use those terms, but a genotype is generally a segment of DNA for which there exists one or more directly-linked phenotypes, but it doesn't have to be that way in the binary world, so that's why I didn't use those terms :D
 
Last edited by a moderator:
dflemstr said:
If you want more chaos in the music, but so that it still can sound good, just use the parametric evolution method that I suggested and use fractal functions instead of linear functions (let the seed for the beat be fed through a state machine a few evolutions and use that as the real beat pattern etc.). That way, one can do random mutations while still getting music that sounds good (because as you say - changing random bytes in samples will only lead to crackles)

It is a good suggestion but probably very much beyond my scope. I'll settle for crackles for now :D

btw slowly desintegrating what would happen by just random mutation of samples is also beautiful, listen to the desintegration loops of william basinski, however natural decaying of magentic tape is different to random mutation i think it wont be that dissimilar

.
 
Last edited by a moderator:
Puredata is very much fun at least something i get sound out of, will definitely play with it some more.

That said pure data is pretty realtime I have to dabble with it more to find if it is usable in an input --> output manner.
 
You absolutely can use it for offline/non-realtime processing, very easily.

In fact, I'd investigate the wide wooly world of Puredata patches, if I were you. Your ideas are good - but not uncommon in the PD scene. Perhaps you'll find, out there in academia, implementations (in PD) of your ideas already .. or at least come pretty close. Generative/evolutionary processing is a hot topic in the PD-heads scene ..
 
torpor said:
You absolutely can use it for offline/non-realtime processing, very easily.

In fact, I'd investigate the wide wooly world of Puredata patches, if I were you. Your ideas are good - but not uncommon in the PD scene. Perhaps you'll find, out there in academia, implementations (in PD) of your ideas already .. or at least come pretty close. Generative/evolutionary processing is a hot topic in the PD-heads scene ..


yes thats why I also included the 'its already done' option in the poll :D

And Ill look into patches and such first I have to get the hang of it but its a very nice 'language' pretty intuitive for a biologist :D

BTW is anyone planning on porting PD to the pandora, I read that there is some activity on beagleboard :)
 
Last edited by a moderator:
Gruso said:
I knew I should have posted earlier. I'm WAY out of my depth now, but watching with interest. :)


I hardly touched the water here, there is no depth at all. Mind you probably this will take years for me Im just being curious. I would love to see PD on the pandora, that would make it a great audiodevice.
 
Last edited by a moderator:
Back
Top