AI Music Maker

It was time to make proposals for our Intelligent Systems final project. I immediately started looking for ways I could create an intelligent music generator agent. The first task to address was what environment an agent could create music in. After a quick google, I found an online music sequencer that would work perfectly. The agent could create its music internally, and then print out a text file that could be loaded into the sequencer, allowing us humans to listen to it.

Many of my classmates were interested in this project, so a team of 3 peers and I approched this project from many different angles. Programming in Java, we begun with an agent inteface:

public interface AgentIF {
    //make music generates the music, and then returns toString()
    String makeMusic(int number_of_bars) throws Exception;
}

With this interface, we could implement our agent in many different ways, each producing a correctly formatted output. To get started, we all created our own random agents. Here is a musical sample that my random agent produced:

The Random Agent:

Pretty terrible, right? Let's see how a more intelligent agent compares. This basic agent has an understanding of chords, keys and rhythm. Check it out!

The Basic Agent:

Not bad eh? The basic agent can generate music that is rhythmic and diatonic. It is pleasing to the ears, but could fall into the genre of "elevator music". We wanted to go one step further. For our advanced agent, we implemented an understanding of syncopation. Check out this music sample it produced:

The Advanced Agent:

While I am happy with the output of these agents, it has only opened my eyes to the endless possibilities. In the future, I would love to see an agent that can produce multiple musical sequences, and transition between them smoothly. Also, I would love to make an agent that can interpret an underlying chord progression, and intelligently "solo" over it. However, due to my own limited understanding of music theory, I am not sure how to approch this problem. Before I can teach an agent how to improvise, I ought to practice improvisation myself!

Check out the Github Repository to learn more and explore the many agents we created!