It's possible to use Machine Learning techniques to cluster songs into musical-scale groups? I mean: "this song was written in C"... or "this song was written in Am" etc. I made a fast search about the subject and I found no software that can do this. If you know some software, or research (academic papers), related to that subject, could you link it here for me? I'm very interested in that subject but I'm not sure from where I can begin. I have a little experience with Random Forests and Neural Networks, maybe I can accomplish the classification task with one of those algorithms, but, again, I'm not sure which kinda of features I should pass to the algorithm. Thanks in advance.
-
$\begingroup$ Looks like an interesting area to research on.. All the best.. have a look into the algorithm behind SoundCloud and other popular music classification apps that sorts the music based on their genre / tone etc.. $\endgroup$– Asif Neyaz AzeezOct 19, 2015 at 12:22
-
$\begingroup$ What data are you starting with? If you've got sheet music, this is going to be a lot easier than starting from audio, etc $\endgroup$– Philip KendallOct 19, 2015 at 16:53
-
$\begingroup$ Hi @PhilipKendall , the data I expect to be the input is an music file (a .wav for example). $\endgroup$– chr0xOct 19, 2015 at 16:55
-
$\begingroup$ Look harder. e.g. libXtract. People have tried that, but it is kot half as easy as you think it is... it's not really that well defined, either, unless you have the original score (then it may be clear what the author meant, or not). And of course, some change tonality, too. $\endgroup$– Has QUIT--Anony-MousseOct 19, 2015 at 22:06
3 Answers
From a very high level -- You can convert the song to a spectrogram, there are a large number of implementations to do this. From there you can analyze the sound waves. In the case of the key, for instance, the note A is equal to 440 hz. Look into FFT as well. Hope this helps get you started. I know spotify trains neural networks on spectrograms of songs to find similar songs based on "sound".
-
$\begingroup$ Thank you very much sir! I'm taking a look in Fast Fourier Transform right now. $\endgroup$– chr0xOct 19, 2015 at 19:07
You can take a look at Music Information Retrieval Evaluation eXchange (MIREX). An annual competition with number of different tasks from MIR. The most relevant to your question being Audio Key Detection. Explanation papers for the used approaches can be found here.
In terms of library for extracting knowledge from audio signal I'd recommend Essentia. There are numerous features you can compute over time window in a track including tonal descriptors (key and scale).
Once you've built discriminative representation of a track for your task you can use any supervised classification model fed with labeled data. There are several musical datasets on the web labeled with track information. Take a look at GTZAN, each track has genre, tempo and key as meta.
-
$\begingroup$ Thank you @ov32m1nd . Essentia is exactly what I was searching for. Seems like a great place to start. I'm taking a read on its paper right now (ps: sadly I don't have sufficient reputation to positive your answer :/ ). $\endgroup$– chr0xOct 20, 2015 at 15:17
I kept searching and I recently found this and this articles that seems to be very promissory. I think that if I can identify a good number of notes from a music, I will be able to identify the music scale itself.
If you guys have more material to suggest on this subject I'll be very grateful.