A friend once mentioned to us that it took him ten years of experience playing jazz music to acquire the instincts necessary to improvise good songs. This comment inspired us to develop a tool that would help computers learn the rules of producing pleasant-sounding tunes.

What it does

CrowdTunes generates random sequences of tunes and asks users to rank the quality of the song on a scale from 0 to 5. After gathering sufficient votes on each song sequence, it is capable of composing longer songs by combining the highest-rated note sequences. The application also records each note sequence produced and the associated votes, producing training data that could help machine learning algorithms learn the techniques for automatically producing beautiful music.

How we built it

The bulk of the application was written in python, using the Django Framework to handle back-end processing and database storage. We used the pydub python library to generate random tune and song sequences. Users can interact with the application from a web browser, with a frontend that was built in HTML, CSS, Javascript, and Bootstrap. We deployed our application on a Platform-as-a-Service cloud called Heroku.

Challenges we ran into

One of our challenges was to make our songs database match up with our song's file storage system. We also had problems with downloading the same things to run our code with - some of us had Linux and some of us had Windows, but that's good, because that means that we know our website will work with both now.

On a higher level, the team was not very familiar with the languages and frameworks being deployed, particularly with django. As a result, debugging was rather chaotic, with frenzied research, educated guessing and sometimes random guessing. Our website's model - how it was going to display and organize the music, how the votes would be used, how the songs would be combined, etc. - evolved constantly throughout the process as we learned more about the code's abilities and limitations.

On a lower level, some of the more persistent issues we encountered dealt with the misalignment between the songs in the database and the songs in the file storage system, avoiding duplicates while generating filenames, and integrating html with python code.

As a whole, these obstacles mostly stemmed from our naivety about the relevant technologies. In overcoming them we greatly expanded our knowledge base.

Accomplishments that we're proud of

The first time our random song successfully blasted out of the speakers was a great moment for us. It felt great just to be able to create something as artistic through music via seemingly cold and indifferent software.

It's also interesting to be able to work with and analyze data. Here, we not only collect information but also use it to improve our software continuously.

We're very happy that we were able to learn such a dense package of technologies in a short time frame, and had fun while doing it.

What we learned

On a technical level, we learned a tremendous amount about the workings of github, django, html and a variety of other technologies. But perhaps the most illuminating part of our project was just how many consecutive hours we were willing to work on it - hours that few of us would put into our homework assignments. It seems to say something about what motivates people, if something independent of our academic record could inspire such work ethic. It's easy to put your effort into a project if you're working on something cool and meaningful, and are surrounded by equally exciting people.

What's next for crowdtunes

We want to apply machine learning to the random song generation by analyzing which kinds of note and tempo arrangements receive the most up-votes and weighting our probability distribution accordingly. This information can be stored uniquely for each visitor via a log-in system, and could be plotted via interactive data visualizations. We can also add more criteria for the music such as a wider pitch range, chords, other instruments and a greater tempo variation. To pull all of these elements together, we could work on boosting the website's popular appeal through better graphics and a robust incentives structure.

Share this project: