Is there any software out there that does this?

Community Forums/General Help/Is there any software out there that does this?

SculptureOfSoul(Posted 2009) [#1]
What I'm looking for is the ability to analyze a song - would be fine if it only worked with midi files - and see what intervals appear and with what frequency (not as in musical frequency but in number of occurrences) they appear. It would be great if the software could make an educated guess as to what key the music is in based on the notes appearing in the song, although having to manually enter the key would be fine, as well.

I've tried various wordings of the basic search "frequency of intervals in music" and have turned up no useful results. I just want to know how often each interval appears, in general - so that I can rank them from most common to least common intervals. I'm sure that the root is going to be the most common, and the 3rd, 5th, m3, 4 will all be quite common, too.

I am aware that eastern music would likely turn up different results than western music. Ideally I'd analyze thousands of music files - primarily western although inclusive of all styles - and get the results that way. (the thing I'm working on will mostly apply to western music so it's ok if there is a western music bias in the results).

The results of this are rather important to a strange project i'm working on. It wouldn't be the end of the world if I got the order of the frequency of intervals slightly wrong, but the whole thing would work more smoothly if the order was correct.

So, is there any current music software that anyone knows of that can analyze files in such a way? Or perhaps someone else can have better luck than I searching the internet for it? Basically, I just want a list of information like one can find regarding the frequency of letters appearing in english text, but with musical intervals.

I know it's a weird request. Thanks for looking and thanks in advance for any help.

Alternatively, if I have to write the program myself, how hard is it to get at midi note data with BMax? I admit I haven't looked into that at all yet as I was hoping there was already something out there that could do this.


ziggy(Posted 2009) [#2]
You can not determine a song style based on the note's interval. You could determnine the key or modality (doric, Jonic, Aeloc, etc). but nothing else. In fact, the same song (with the same intervals) can be covered on different styles! The "May Way" song of sinatra has the same mellody than the Syd Vicious version...


SculptureOfSoul(Posted 2009) [#3]
Well, all i'd really need to do is determine the key of the song. In regards to the style - and I was keeping it very broad by saying "eastern and western music" - I was merely mentioning how choosing to analyze strictly say, indian music, would likely lead to a different breakdown in the frequency of particular intervals showing up in music, not to mention their use of microtones.

Ultimately what I'm looking for would be a stastitical breakdown something like this

Songs Analyzed: 5,325

Interval Frequency:

Root (23.57%)
Fifth (16.85%)
Third (15.02%)
Fourth (10.52%)
Seventh (8.62%)
Minor Third (7.32%)

etc


ziggy(Posted 2009) [#4]
I'm a professional musitian, and I can tell you this does not serve any purpose, becouse if you make a minor third next to a major third you have a minor feeling (E/G/B) but a major third and then also a minor one, gives a major feeling (C / E / G). Both have a major and a minor but sound different. Not to mention that a 4th plus a major thrid can be a inversion of a regular major (G / C / E) and does not sound like a 4th interval to the ears, etc etc etc...
Anyway, if it is out of curiosity, then it may be very straight fordward to do with a MIDI analizer. Indian music with quarters of tone can't be represented on MIDI, so no worries :D

An to the "Extract the key" that's completelly impossible unless you make a complex analyzed that understands also modal music and middle transportation. I mean, what about C major, D Doric, E Frigi, F Lydi, G mixoLidy, A Minor and B Locrium? All of them use the same # and b, have the same notes, but sound different and are different keys!


SculptureOfSoul(Posted 2009) [#5]
It does serve a purpose for something I'm working on - it's something not directly musical but related to music. :p

I do understand the difficulties of determining the key, which is why it would almost be necessary to make it such that you manually enter the key(s) of a song prior to analysis to get the most accurate results. One could try to infer specific modes by looking at the chords playing underneath (D dorian would likely be playing over a D minor chord, with the possible addition of 9th/11th/13th) but this isn't always accurate.

I'm going to have to assume there isn't any software out there that has this capability as - to be honest - outside of what I'm using it for I don't know where it would serve any other purpose. :P

And I'm talking about all intervals as they relate to the root. I understand E-G-B is a minor triad, but assuming you were in the key of E.. G is serving as a minor third and B a fifth. If that same chord was played in they key of C, G would be serving as the 5th and B the 7th. I'm only interested in the intervals as they relate to the tonic of the key, not how the intervals relate to any other notes.


SculptureOfSoul(Posted 2009) [#6]
Well, I found a program that converts midi files to text. I'm currently writing a program that will then analyze these text files.

I'm going to analyze both files of which I know the key, and files where I attempt to programatically determine the key, and keep the results separate, comparing them after some time to see what kind and what degree of discrepancy exist.

I can definitely trust the results of a song where the key is known. The problem is going to be the time involved in tracking down midis for songs with a known key signature, entering it manually, etc - especially as I'd like to analyze 1,000 songs at the minimum.


_PJ_(Posted 2009) [#7]
I'm not sure what your after, and whether you NEED to use existing songs, but as an alternative, couldn't you compose your own? There's hundreds of simple midi utilities to do so (even on mobile phones)

Then you'd have more control over what's in the files and an ability to identify more off what the files are saying when converted ???


SculptureOfSoul(Posted 2009) [#8]
Really all I am trying to get at is the most commonly occuring scale degrees within music. Just as how english has been analyzed and you can find information for the most common letters, most common starting letter, most common words, etc, I am really only looking for the most common scale degree. Unfortunately the key of the song is needed to extract this information, and programatically determining the key is quite complicated.


SculptureOfSoul(Posted 2009) [#9]
Well, I found someone's Master's Thesis work which included this information as part of their attempts to understand and quantify tonality within music. Their breakdown and analysis is far more indepth than I would have been able to do with my limited time frame (I would hope so, it was their thesis paper :P) and so this program is dead in its tracks.

I wasn't looking forward to finishing it, so, no disappointment here!