# Computer Tries to Learn to Make Baroque Music



## UnauthorizedRosin

I watched this video on YouTube, as I was watching videos about computer programming. In this video, the person attempts to use LSTM to program a computer to compose baroque music. While I acknowledge that it was not very good, what do you think about the concept in general? What do you think could be done in the coding to allow for better compositions? Do you think that good computer-generated music is possible?


----------



## Woodduck

I suspect that a computer could be taught to compose baroque music about as well as the average contemporary composer could compose baroque music.


----------



## JAS

There is this: https://en.wikipedia.org/wiki/Musikalisches_Würfelspiel

One entry in the Phillips Complete Mozart set involves composing this way.


----------



## musicrom

Yes, the study of machine learning has been making significant progress over the past few years, and I'm sure with a dedicated set of computers and allowing the program to train for a longer time, one could get computers to emulate Baroque music pretty well. The biggest difficulty is generally finding the best representation of the problem, but certainly you could find ways to improve the algorithm.


----------



## Taggart

See http://theconversation.com/machine-folk-music-composed-by-ai-shows-technologys-creative-side-74708 on Irish music.

As @musicrom says it down to the "representation of the problem". Folk music was easier because of the existence of abc notation to provide a simple description of the melodic line. The basic format of a folk tune is simpler - two eight bar phrases which complement each other. Given these, the computer could find patterns and then predict what would work.

An interesting first step would be an attempt to realise figured bass and see how it compares with human examples. Not exactly composition but at least the basics of harmony.


----------



## JAS

Of course, it should perhaps be admitted that, much like the dice game noted above, an algorithm that might produce passable baroque sounding music would only create an extended series of the most generic exemplars of that style. (The dice game itself is even more limited as it is based on a fixed, because printed, set of base material. A computer could at least have a large set of base material, and that base could itself be modified as long as it fit within the overall rules.) Whether or not the results are worth the effort would be a matter for the person who chose to do it.


----------



## Dr Johnson

I thought the computer was producing some (quite) interesting jazzy stuff after 37 minutes of learning.

Priceless: "some of these websites are so old they're older than me."


----------



## mtmailey

A computer is not a human therefore it cannot make music like that.Even if you program it still can not make music that well.


----------



## Dr Johnson

mtmailey said:


> A computer is not a human therefore it cannot make music like that.Even if you program it still can not make music that well.


I suspect it is a case of something that is not done well, but one is surprised to find it done at all.


----------



## Alexanbar

UnauthorizedRosin said:


> While I acknowledge that it was not very good, what do you think about the concept in general? What do you think could be done in the coding to allow for better compositions? Do you think that good computer-generated music is possible?


My first think is for what?

There are many composers with different qualification. Any of them can write a thing more better than a computer.

And many of them does not find conditions for applying of their аbilities.

There are no needs for such mass producing of music by artificial intelligence. All of real needs can be covered by using of human composers.


----------



## Vox Gabrieli

This case was first brought to the mainstream by Iannis Xenakis, in his article "musiques formelles". The fourth chapter is strongly linked to the creation of music with computers by a form of stochastic processing. Substitled_ Un Cas d'utilisation de l'ordinateur 7090 IBM en composition musicale_ ( Quite a mouthful )!

*
Here you can see the complete pdf of Musique Formelles. It is a merged version of the single chapters already published here dedicated to Iannis Xenakis.*

I hope this adds something to the discussion.


----------



## Manxfeeder

UnauthorizedRosin said:


> I watched this video on YouTube, as I was watching videos about computer programming. In this video, the person attempts to use LSTM to program a computer to compose baroque music.


At the beginning, it sounds like Nancarrow on a bad day.


----------



## topo morto

It's been going on for many years....

https://en.wikipedia.org/wiki/Computer_music#Computer-generated_music

The difficulty in computer composition lies in getting a system of simple rules to generate a wide range of output. Getting a computer to produce a _single _specific style is pretty easy - I'm sure I've read plenty of times of experiments that have been done where people have been unable to tell computer-generated music from human-composed music in blind tests.



Alexanbar said:


> My first think is for what?


If you're interested in music theory, one reason to compose music with rules is because doing so is a test of validity of those rules.

Another reason is if, as a composer, you find it fun to do so!


----------



## johnfkingmatrix

-Take 3 voices - in the middle voice the computer makes 4 bar cantus firmus adhering to rules of counterpoint (start/end on octave, no consecutive intervals, no leaps further than a sith etc), it will be random but musical. 

-Next four bars the higher voice repeats the first 4 bars back while the middle voice generates a new cantus firmis with the rule that if two notes played at the same time would create a dissonant tone the higher voice should be raised to the next non dissonant tone. 

-do this again by adding the bass, then after a few series of this have them all simultaneously play the opening 4 bars while the drums do a sweet solo as the music fades out

I got my computer taken away for bad behavior, but im sure i could program something like that in a day


----------



## Petwhac

I've absolutely no doubt that in the future A.I. will be able to compose music in any style that is indistinguishable from that created by humans.


----------



## Vox Gabrieli

To once again express my contempt for this topic: music should be celebrated as a rejoice for mankind. 

One could argue that it is mankind who programmed this music making a computer in the first place, but I must stress that we do not look at this in that way. I would also note that a computer will always be confined in the restrictions of its creator, as well as the mathematical guidelines it follows.


----------



## Petwhac

Gabriel Ortiz said:


> To once again express my contempt for this topic: music should be celebrated as a rejoice for mankind.
> 
> One could argue that it is mankind who programmed this music making a computer in the first place, but I must stress that we do not look at this in that way. I would also note that a computer will always be confined in the restrictions of its creator, as well as the mathematical guidelines it follows.


I'm afraid, like it or not Artificial Intelligence is going to replace humans in many if not all spheres of activity. Not next year, maybe not for several decades but one day.

A.I. will be able to learn from experience and improve it's own understanding and capabilities. It will be able to read and memorise every score ever written without a human having to enter the data manually. It will be able to invent new combinations according to a learned aesthetic.

We like to think of ourselves as more than just a collection of neural networks and algorithms, perhaps we are, perhaps not. There is no evidence for a 'soul' or a 'spirit' and even if such things exist who's to say it is not a by-product of millions of firing synapses.

As for what 'music should be'? That's a matter of opinion. I'd day it should be enjoyed.


----------



## Vox Gabrieli

Petwhac said:


> I'm afraid, like it or not Artificial Intelligence is going to replace humans in many if not all spheres of activity. Not next year, maybe not for several decades but one day.
> 
> A.I. will be able to learn from experience and improve its own understanding and capabilities. It will be able to read and memorize every score ever written without a human having to enter the data manually. It will be able to invent new combinations according to a learned aesthetic.


This is why I will reiterate my point not only as a message to current members of the music community but also for the future members.

I have to disagree with the concept of A.I reaching that prestige, because music is sacred to me, and I do not want to live in a world where an inanimate object could someday surpass a humans lifetime of work. Call it ignorance, but your post brings me genuine anger when I read it, and I cannot say I will get along well with somebody who thinks in your moral and philsophicol opinions.


----------



## Petwhac

Gabriel Ortiz said:


> This is why I will reiterate my point not only as a message to current members of the music community but also for the future members.
> 
> I have to disagree with the concept of A.I reaching that prestige, because music is sacred to me, and I do not want to live in a world where an inanimate object could someday surpass a humans lifetime of work. Call it ignorance, but your post brings me genuine anger when I read it, and I cannot say I will get along well with somebody who thinks in your moral and philsophicol opinions.


I didn't offer any moral or philosophical opinion. I'm just stating what the leading thinkers in the field claim and I've no reason to disbelieve them given the incredible speed with which computers and A.I. is already developing.

'Sacred' is just a word that signifies how important music is to you. I can assure you, music is just as important to me but it's just a thing I love. I don't pretend there's some divine message in it.

What would you have us do? Ban computers? Ban people from listening to music made by computers?

You may continue to listen only to music you know was written by 100% human beings. It's your choice.


----------



## JAS

I am considerably more concerned with computers replacing all decently paying jobs. Not many Baroque composers are in need of work these days.


----------



## Petwhac

JAS said:


> I am considerably more concerned with computers replacing all decently paying jobs. Not many Baroque composers are in need of work these days.


And there are plenty who'll say all the best music has already been written! Sorry A.I. you're too late!

We humans may very well soon find ourselves with nothing to do but debate on internet forums!


----------



## JAS

Petwhac said:


> We humans may very well soon find ourselves with nothing to do but debate on internet forums!


I assume computers will do that better too.


----------



## BabyGiraffe

Petwhac said:


> And there are plenty who'll say all the best music has already been written! Sorry A.I. you're too late!
> 
> We humans may very well soon find ourselves with nothing to do but debate on internet forums!


It's pretty naive to think that the best music is already written. 




We wil need thousands of years with the aid of computers generating the material to exhaust the 12et system.
If we start considering non-western musical systems like the 17 and 24 arabic scale, 41 or 79 Turkish gamuts and so on, the number is limitless.


----------



## Petwhac

BabyGiraffe said:


> It's pretty naive to think that the best music is already written.
> 
> 
> 
> 
> We wil need thousands of years with the aid of computers generating the material to exhaust the 12et system.
> If we start considering non-western musical systems like the 17 and 24 arabic scale, 41 or 79 Turkish gamuts and so on, the number is limitless.


 I never said that *all *the music had been written only that possibly the *best* music had already been written. Since that is a qualitative and not a quantitative judgement it can't be proved or disproved.

Also, changing a single bit or even numerous bits in an audio file will not make any difference to the musical content or even the sound of it.


----------

