# Music composed by a computer program (AI)



## Daimonion (Apr 22, 2012)

I'm just reading about computer programs designed to compose music. Do you know any worthwhile composition produced (I am hesitant to write 'composed') in this way? (I'm interested in the topic in the context of artificial intelligence. Hence, I'd be interested in those pieces, especially, which are similar to (or even indistinguishable from?) human music)


----------



## BurningDesire (Jul 15, 2012)

Well it sounds alright, honestly it would probably sound pretty good if it were performed by a good live pianist. But I have to ask what is the point? Whats interesting about a guy feeding music by an artist into a machine so that it can copy their habits and churn out music based on calculations? I mean, you may get some pretty decent music out of it, but its not like the machine has an imagination to employ. Its just doing math. I'd much rather hear a human being who's studied the work of Chopin write something inspired by that early Romantic style, because things will not be exact stylistic copies. The composer's imagination will cause unique mutations to occur.


----------



## brotagonist (Jul 11, 2013)

I don't know how and to what extent, but Xenakis' stochastic methods were implemented by computers.


----------



## ComposerOfAvantGarde (Dec 2, 2011)

The nocturne was interesting, but what would be even more interesting to hear would be a _unique_ composition in a style perhaps close to another few composers or a mixture of utterly different composers, but unique enough to not be mistaken for another composer. THAT would be something I would love to hear.


----------



## BurningDesire (Jul 15, 2012)

ComposerOfAvantGarde said:


> The nocturne was interesting, but what would be even more interesting to hear would be a _unique_ composition in a style perhaps close to another few composers or a mixture of utterly different composers, but unique enough to not be mistaken for another composer. THAT would be something I would love to hear.


Like get it to try and combine the aesthetics of Beethoven, Satie, Ferrari and Hendrix XD


----------



## PetrB (Feb 28, 2012)

This sounds as banal / bad as some of those mimic comps in today's composers -- or some of the lesser successful of the same as heard from young composers doing model work in or out of school.

The playback is a butcher / killer -- makes the whole thing D.O.A.


----------



## PetrB (Feb 28, 2012)

BurningDesire said:


> Like get it to try and combine the aesthetics of Beethoven, Satie, Ferrari and Hendrix XD


More likely done, and far more successfully, by a composer with the sensibility and wherewithal to do it. (greater capacity for the required 'fuzzy logic' computer developers are so hoping to develop, regardless of that less perfect and not so fast human processing speed


----------



## violadude (May 2, 2011)

BurningDesire said:


> Well it sounds alright, honestly it would probably sound pretty good if it were performed by a good live pianist. But I have to ask what is the point? Whats interesting about a guy feeding music by an artist into a machine so that it can copy their habits and churn out music based on calculations? I mean, you may get some pretty decent music out of it, but its not like the machine has an imagination to employ. Its just doing math. I'd much rather hear a human being who's studied the work of Chopin write something inspired by that early Romantic style, because things will not be exact stylistic copies. The composer's imagination will cause unique mutations to occur.


Couldn't have said it better myself.


----------



## brianvds (May 1, 2013)

Well, when they created the first chess software, people also said "machines can't think creatively, and therefore the software will never, ever be able to beat the best human players." And now look where we are today. I suggest composers take steps to find alternative employment...


----------



## Petwhac (Jun 9, 2010)

Daimonion said:


> I'm just reading about computer programs designed to compose music. Do you know any worthwhile composition produced (I am hesitant to write 'composed') in this way? (I'm interested in the topic in the context of artificial intelligence. Hence, I'd be interested in those pieces, especially, which are similar to (or even indistinguishable from?) human music)


Depends what you mean by "worthwhile" music. This piece, if played well by a real pianist and nicely recorded would be indistinguishable from human music although not the most original (obviously, since the program is using a 'chopin algorithm') There were a couple of passages where the voice leading made me wince a bit but that is partly to do with the lack of dynamics.

The music is certainly 'composed', just not by a human. This opens a very complex and interesting subject.

Of course this was foreshadowed to some degree when composes subjected pitch, duration, register and dynamics to a set of pre ordered algorithms.

A computer will output data based on what a human has input in the first place.
Rather like 'Robot Wars', we could see whole concerts where real musicians play the creations of 'programmers' as opposed to 'composers'. Perhaps, actually, there is not such a distinction between the two terms. A composer, with a score writes a set of instructions for a performer and Stravinsky for one, was all for the performers just playing precisely what was notated.

*AFTERTHOUGHT* Who actually owns the copyright? :lol:


----------



## guy (Jan 4, 2014)

brianvds said:


> Well, when they created the first chess software, people also said "machines can't think creatively, and therefore the software will never, ever be able to beat the best human players." And now look where we are today. I suggest composers take steps to find alternative employment...


You don't need creativity to play chess, you need an if else statement.


----------



## guy (Jan 4, 2014)

This reminds me of the monkey at a typewriter, will, given enough time, recite Hamlet. If you give a computer enough time to compose, it will re-compose all of the works of Bach, Beethoven, Brahms, and so on.


----------



## Petwhac (Jun 9, 2010)

guy said:


> This reminds me of the monkey at a typewriter, will, given enough time, recite Hamlet. If you give a computer enough time to compose, it will re-compose all of the works of Bach, Beethoven, Brahms, and so on.


It's not at all like that really, because it's not random.The monkeys are typing randomly.
However, what you say is true but a different process to the posted piece.


----------



## Aramis (Mar 1, 2009)

I don't want to offend the computer, but he totally ripped of Chopin's E minor nocturne, so much that it's not a piece "in Chopin style" but rather one particular Chopin piece after being spoiled here and there, as if recalled by person who heard it long ago and tried to reconstruct what he/she remembers from it at the piano.








PeterB said:


> This sounds as banal / bad as some of those mimic comps in today's composers


Keys my E-flat.


----------



## ahammel (Oct 10, 2012)

Daimonion said:


> Hence, I'd be interested in those pieces, especially, which are similar to (or even indistinguishable from?) human music)


I expect that composing music in a way that is indistinguishable from the way a (skilled) human would do is one of those AI-hard problems. If a computer could do it, I would be prepared to accept that as evidence that it is possessed of human-like intelligence, and we have to have an awkward talk about whether it has the right not to be destroyed (or to vote, for that matter).



BurningDesire said:


> Well it sounds alright, honestly it would probably sound pretty good if it were performed by a good live pianist. But I have to ask what is the point?


The point is probably to learn about AI. I doubt if anybody involved expected to produce any music that was worthwhile but, speaking as a programmer, it sounds like it would be quite instructive to try, not to mention fun.



brianvds said:


> Well, when they created the first chess software, people also said "machines can't think creatively, and therefore the software will never, ever be able to beat the best human players."


Actually, and I think this must be the most amazing fact in the history of computer science, chess software is older than computers. There has been software that plays chess longer than there has been hardware that will run it.


----------



## millionrainbows (Jun 23, 2012)

guy said:


> This reminds me of the monkey at a typewriter, will, given enough time, recite Hamlet. If you give a computer enough time to compose, it will re-compose all of the works of Bach, Beethoven, Brahms, and so on.


I've always thought that the "monkey at a typewriter" analogy was seriously flawed. So many things are against it. Example: monkeys "mis-hit" the keys 30% of the time, creating double-letters or no-hits. How could a perfect book ever result from this, if the inherent "monkey" characteristics include 30% errors? Sounds like some sort of perfected monkey.

I've always liked Hiller and Isaacson's *Illiac Suite* for computer and string quartet. It has a certain tonality, a certain sound, which I immediately found endearing.


----------



## millionrainbows (Jun 23, 2012)

Brian Eno was interested in "self-generating" systems which, when set into motion, require no human input. This is not a new idea in art; there was a Surrealist who made self-destructing machines. In modernity, Mark Pauline (Survival Research Laboratories) has created some very scary industrial machines which, once started, do unpredictable things.

It's easier than you think to create "self-generating" music. Anyone with a sequencer can do it. if you create sequences of different lengths, and start them together, they will eventually go out-of-synch with each other and create new combinations. He used music in his art installations on a auto-reversing cassette player, so music would play continuously.


----------



## brianvds (May 1, 2013)

guy said:


> You don't need creativity to play chess, you need an if else statement.


Well, they certainly seemed to think you needed creativity for chess, until computers started beating the best chess players. Even a run of the mill chess program would probably beat Prokofiev at chess. Not at music though. 



guy said:


> This reminds me of the monkey at a typewriter, will, given enough time, recite Hamlet. If you give a computer enough time to compose, it will re-compose all of the works of Bach, Beethoven, Brahms, and so on.


Unless you create a more sophisticated AI. It must be possible in principle, seeing as the human brain is a mechanism. I have this feeling though that we are a loo-ong way from creating artificial brains, if we ever get there. As some wit said, if the human brain were simple enough for us to understand, then we'd be too simple to understand it.



millionrainbows said:


> I've always thought that the "monkey at a typewriter" analogy was seriously flawed. So many things are against it. Example: monkeys "mis-hit" the keys 30% of the time, creating double-letters or no-hits. How could a perfect book ever result from this, if the inherent "monkey" characteristics include 30% errors? Sounds like some sort of perfected monkey.


Well, they didn't literally mean monkeys; it's just an analogy for random processes. What's more, something like the 30% number for errors is surely an average. As with all such statistical phenomena, you just need enough monkeys, enough typewriters and enough time - sooner or later a monkey will have an error-free stint of twenty billion quintillion hits, and somewhere in there, Hamlet might be lurking.


----------



## millionrainbows (Jun 23, 2012)

brianvds said:


> Well, they didn't literally mean monkeys; it's just an analogy for random processes. What's more, something like the 30% number for errors is surely an average. As with all such statistical phenomena, you just need enough monkeys, enough typewriters and enough time - sooner or later a monkey will have an error-free stint of twenty billion quintillion hits, and somewhere in there, Hamlet might be lurking.


Nahh, I still don't buy it. An artwork, or a maple leaf, is too purposefully structured; too non-random, not general enough to be included in "random" sets. I think this whole analogy business shows a basic miscomprehension of random processes, and takes them out of their proper context. Like, randomness of snowflakes: this can only occur in certain, very specific "snowflake" conditions and context. This raises the question: is anything really "random?"


----------



## ahammel (Oct 10, 2012)

millionrainbows said:


> Nahh, I still don't buy it. An artwork, or a maple leaf, is too purposefully structured; too non-random, not general enough to be included in "random" sets.


A sufficiently large random sequence of words contains any arbitrary sequence. There's no such thing as a work of literature that is 'too structured' to be produced by random strings and, by extension, no such thing as a piece of music that is 'too non-random' to be produced by throwing notes together at random.

You may be a incredulous as you like about this, but it's a part of the definition randomness.


----------



## DeepR (Apr 13, 2012)

Ahh let's listen to Richter to forget about all this.


----------



## Petwhac (Jun 9, 2010)

millionrainbows said:


> Nahh, I still don't buy it. An artwork, or a maple leaf, is too purposefully structured; too non-random, not general enough to be included in "random" sets. I think this whole analogy business shows a basic miscomprehension of random processes, and takes them out of their proper context. Like, randomness of snowflakes: this can only occur in certain, very specific "snowflake" conditions and context. This raises the question: is anything really "random?"


Not only is the monkey analogy correct, it is a statistical certainty. It hinges though on _enough_ time being given-many hundreds of times the age of the universe itself.
These mind-boggling numbers are counterintuitive and that is why you don't 'buy' it.
I have just been reading a book on probability and it shows quite clearly that our brains have evolved to equip us with the means to understand the world on the level that we need to. Huge numbers, probability and statistics are difficult for our brains to grasp.

There is no reason why all the air molecules in the room can't bounce themselves into one corner, it may happen only once in the next trillion years or it could happen in the next 5 minutes.

Is anything really random?

Yes, at the most basic level, everything is.


----------



## guy (Jan 4, 2014)

Daimonion said:


> I'm just reading about computer programs designed to compose music. Do you know any worthwhile composition produced (I am hesitant to write 'composed') in this way? (I'm interested in the topic in the context of artificial intelligence. Hence, I'd be interested in those pieces, especially, which are similar to (or even indistinguishable from?) human music)


That computer stole my idea in the arpeggiated bass! This is like, unintentional mind plagiarism!


----------



## PetrB (Feb 28, 2012)

guy said:


> That computer stole my idea in the arpeggiated bass! This is like, unintentional mind plagiarism!


See post No. 21, above. Freddy stole your idea and mind long before you were born


----------



## brianvds (May 1, 2013)

millionrainbows said:


> Nahh, I still don't buy it. An artwork, or a maple leaf, is too purposefully structured; too non-random, not general enough to be included in "random" sets. I think this whole analogy business shows a basic miscomprehension of random processes, and takes them out of their proper context. Like, randomness of snowflakes: this can only occur in certain, very specific "snowflake" conditions and context. This raises the question: is anything really "random?"


Ahammel and Petwhac have already provided good replies to the above. I may add here another thing that some clever bloke pointed out.

As far as we can gather, the digits of pi, which go on forever, are random. Now we could, through some suitable convention, change those digits into letters or notes. If we do that, then it means that somewhere in pi, you'll sooner or later stumble upon Hamlet, or the Hammerklavier sonata. Or anything else you care to mention, including masterpieces not yet composed.

Of course, you'll need quite mind-blowing amounts of time to do so...


----------



## peeyaj (Nov 17, 2010)

Just a question to our Modernist friends here in TC:

Is music composed by a digital entity ( hardware and software) interests you? I mean, it will be a modern and technological breakthrough no matter what. It would be modern, literally speaking.


----------



## PetrB (Feb 28, 2012)

peeyaj said:


> Just a question to our Modernist friends here in TC:
> 
> Is music composed by a digital entity ( hardware and software) interests you? I mean, it will be a modern and technological breakthrough no matter what. It would be modern, literally speaking.


Dropping the very droopy semantic that anything made NOW is "contemporary".....

This was truly painful to go through. I fast forwarded, listened to what for me was enough of any musical segment, and found it all sounding totally generic, and somewhat random, unlike a piece written by one individual which could sound very similar.

This search to reach the goal is in its very infancy. What it will take is enormous amounts of inputting, likely the projected advances toward a (nano) carbon molecule computer and processor which could handle all that data without taking months to spit something out. It will also take the ability to input / program something akin to all that makes up an individual: an individual's psychology, personal viewpoint -- indeed, _*a point of view,*_ intent, aesthetic, and to be general while being yet specific, intuition.

Intuition, after all the intellectual process (including an extensive methodology, if that is the individual's inclination) is what is at work in Boulez, Ferneyhough, Beethoven or Monteverdi. That is really what is being supposedly sought after with AI, and it is parsecs away from being anywhere near that goal.

Since the advent of computers and composers having access to them, the tools have been more often than not well-used, to generate all the permutations of an idea or working principle. To go out on a limb, I would put forth the 'fact' that most of the composers who have made anything of interest using these means have gone in after the fact of the program having spit out those permutations, and then via their own taste, point of view, edited what the computer had generated, taking from that data that which most interested and appealed to them.

Interactive software is another child of this technology, where a (pre-programmed) computer will react to live musical stimuli and then generate new variations upon what it 'has heard.' -- emulating, really, improvisation as best known, perhaps, in the way Jazz operates.

What has been programmed to date in the way of compositions, whether it is that dreadful Chopin nocturne attempt or what I heard in this clip, has parsecs to go before I find the results interesting.

Yes, the human brain is a 'mechanism' much like the body is another 'mechanism.' But taking that literally is a little silly; it overlooks all the 'glitches' of how a composer's brain works, and it ignores all the 'human' factors, those wildly disparate variables, which make the music written by people -- to date anyway -- of any interest, where what is here presented is of no real interest at all, other than marking a few more baby-step technological and programming advances. This particular infant cannot even walk yet, let alone form a unique thought, it seems. (New parents think that every little baby-step baby takes and every little gas gurgle which makes us think baby is smiling, is something all of humanity will be just as enamored of, of course 

_ADD P.s. This 'modernist' loves music going all the way back... from the earliest to the newest. I could get aggressively challenging here, and absolutist along with the best, i.e. *You either love music, or you don't.*_


----------



## PetrB (Feb 28, 2012)

.............................................................................................


----------



## brianvds (May 1, 2013)

PetrB said:


> Yes, the human brain is a 'mechanism' much like the body is another 'mechanism.' But taking that literally is a little silly; it overlooks all the 'glitches' of how a composer's brain works, and it ignores all the 'human' factors, those wildly disparate variables, which make the music written by people -- to date anyway -- of any interest, where what is here presented is of no real interest at all, other than marking a few more baby-step technological and programming advances.


That is indeed the problem: a lot of what makes human music so human stems not just from the strengths of the composer, but rather weirdly, also from his weaknesses and imperfections. In order to build an AI that can compose great music, you may well have to build an AI that can pass a Turing test too, and that can climb up a mountain and get moved by the glorious view, and that can fall in love and experience lust.

Such an AI composer will in effect BE human: perhaps, instead of having a perfect composition machine that can churn out twenty high-quality symphonies per minute, you'll have a machine that not only takes as long as Beethoven to write a symphony of similar quality, but that also shouts swear words at the programmer and drives the programmer's son to a suicide attempt.

If that is the case, perhaps we'll be better off just sticking with boring old human composers.


----------



## PetrB (Feb 28, 2012)

brianvds said:


> That is indeed the problem: a lot of what makes human music so human stems not just from the strengths of the composer, but rather weirdly, also from his weaknesses and imperfections. In order to build an AI that can compose great music, you may well have to build an AI that can pass a Turing test too, and that can climb up a mountain and get moved by the glorious view, and that can fall in love and experience lust.
> 
> Such an AI composer will in effect BE human: perhaps, instead of having a perfect composition machine that can churn out twenty high-quality symphonies per minute, you'll have a machine that not only takes as long as Beethoven to write a symphony of similar quality, but that also shouts swear words at the programmer and drives the programmer's son to a suicide attempt.
> 
> If that is the case, perhaps we'll be better off just sticking with boring old human composers.


Compared to one or more largish rooms needed for a sort of contemporary 'mainframe,' human composers take up a lot less space, _and_ they can compose even when the power is out


----------



## millionrainbows (Jun 23, 2012)

ahammel said:


> *A sufficiently large *random sequence of words contains any arbitrary sequence.


That's true, literally, but that analogy e_xcludes all the other factors _which would go in to creating such a collection that it becomes essentially meaningless.

That analogy stresses pure quantity, regardless of whether such an extensive random collection could be produced.

Going back to your monkeys, they are limited creatures, and so they are unable to create a random set of the scope needed to eventually produce a coherent book of any kind.

So really, this monkey analogy is an idealized, Platonic idea which will never be realized in any form, regardless if it's done by monkeys.



> There's no such thing as a work of literature that is 'too structured' to be produced by random strings and, by extension, no such thing as a piece of music that is 'too non-random' to be produced by throwing notes together at random.


Conversely, there is no such thing as the random strings you speak of; there is no way such an idea could be brought into reality. So, that's like the pot calling the kettle black. This whole idea of random strings, so extensive that they could include everything, is likewise just a fantasy.



> You may be a incredulous as you like about this, but it's a part of the definition randomness.


Yes; it's just that; a definition.


----------



## millionrainbows (Jun 23, 2012)

Petwhac said:


> Not only is the monkey analogy correct, it is a statistical certainty. It hinges though on _enough_ time being given-many hundreds of times the age of the universe itself.
> These mind-boggling numbers are counterintuitive and that is why you don't 'buy' it.
> I have just been reading a book on probability and it shows quite clearly that our brains have evolved to equip us with the means to understand the world on the level that we need to. Huge numbers, probability and statistics are difficult for our brains to grasp.
> 
> ...


No, I disagree. I think physicists will discover that the universe is a particular manifestation, and is limited.


----------



## ahammel (Oct 10, 2012)

millionrainbows said:


> That's true, literally, but that analogy e_xcludes all the other factors _which would go in to creating such a collection that it becomes essentially meaningless.
> 
> That analogy stresses pure quantity, regardless of whether such an extensive random collection could be produced.
> 
> Going back to your monkeys, they are limited creatures, and so they are unable to create a random set of the scope needed to eventually produce a coherent book of any kind.


So your problem with the analogy is that monkeys are a poor source of random noise? Fair enough, I guess.



> Conversely, there is no such thing as the random strings you speak of; there is no way such an idea could be brought into reality. So, that's like the pot calling the kettle black. This whole idea of random strings, so extensive that they could include everything, is likewise just a fantasy.


Yeah, no kidding. I don't think anybody's suggesting that we actually do the monkey experiment.



millionrainbows said:


> No, I disagree. I think physicists will discover that the universe is a particular manifestation, and is limited.


Well, get back to us when they do.


----------



## millionrainbows (Jun 23, 2012)

ahammel said:


> So your problem with the analogy is that monkeys are a poor source of random noise? Fair enough, I guess.
> 
> Yeah, no kidding. I don't think anybody's suggesting that we actually do the monkey experiment.
> 
> Well, get back to us when they do.


Okay, and when you attain God-hood, make me rich.


----------



## tortkis (Jul 13, 2013)

*Composing Music With Recurrent Neural Networks*
hexahedria - Daniel Johnson's personal fragment of the web

The results are interesting. There is a feel of exploring or evolving. Even the part that gets stuck in a loop sounds as if the computer is hesitating to proceed, thinking about the next move, or just has decided to do a minimal thing.


----------

