Who wrote that song?

Who wrote that song? is a Recurrent Neural Network (RNN) that has been trained to recognize the varying musical styles of classical composers by analyzing their sheet music.

How it works

A piano can play only 88 possible notes and within any given song, only a fraction of those notes are actually used. Yet somehow, composers are still able to express themselves with their own unique, recognizable style. Familiar listeners are even capable of recognizing their favorite composers upon hearing a new song for the first time. This means that there are common patterns inherent in every musician's work that we are able to pick out.

Who wrote that song? uses a long short term memory RNN to mimic this ability. LSTM RNNs are able to analyze patterns in a sequence of data, in this case the sequence of notes in a MIDI file. It was written in Python 3.6 using TensorFlow with Keras a wrapper. This web app is a demonstration of its capabilities.

Who wrote that song? has been trained to recognize 18 different composers and will display a list of probabilities that a song was written by one of the composers it recognizes. If the song was not written by one of the 18 composers, you can think of the probabilities as a similarity to that composer. It can easily be trained to recognize new artists (including ones outside of classical music) which I have plans for in the near future, so check back here often! If there are any artists you would like to see, contact me on GitHub or LinkedIn (links are in the top left or on the contact page.)

Try it!

Upload a MIDI file

Upload a MIDI file from your computer, and we will try to tell you who composed it. If the piece you upload wasn't actually written by one of the composers we can recognize, it will tell you which composers it is most similar to. Please note: this website was designed for 'Type 1' MIDI files. Results for 'Type 0' MIDI files will be unpredictable. If you are not sure what kind of MIDI file you have, you can use N-Audio's MIDI file converter.

Don't have any MIDI files?

There are many great resources on the web to download all sorts of MIDI files. You can find many classical pieces and almost every popular song from every other genre with a little bit of browsing. Check out these links to find a MIDI file to test out!

What is a MIDI file?

A MIDI file is essentially like sheet music for computers. When people transcribe sheet music on a computer, the software they use is able to export their work as a .mid file. To see it in action, all you have to do is upload one of these files below! There are links to web archives where you can download .mid files for free to test it out if you do not have any .mid files handy.