Friday 12 August 2016

audio - Find similar Music using FFT Spectrums


I have been experimenting some weeks to find a way to match/find similar Songs in a Library containing different Genres of Music.


My first try was to Detect Features like Tempo or how much Bass there is in Songs to form groups, but I didnt get far with this approach (Volume Changes Based Beat Detection) since on about 20% of the Songs Beat dont have to be counted always, sometimes 1/2 or 1/3 of them and I couldnt implement that.


After some weeks of failed trying I got a new idea which is described later in this Post. Simply put it works by taking Spectrum Samples of Files, making something like an "Average Spectrum" of Files to compare them. The Idea behind was that for example Hardstyle has a lot more Bass than average Rock Music, I also verified this by looking at some Spectrums in Audacity.




  • File 1: Take full File FFT Spectrums (2048 Sample Size atm,Amplitudes Log. scaled)

  • Sum all Spectrum Arrays, take Averages of each Bin

  • Do the same some other Files, store all Results

  • Make List of FFT Values Differencies between File 1 and other Files

  • Make Average of Differencies between File 1 and File X

  • Sort Ascending by these Averages

  • Songs with the Lowest "Difference Value" are considered to be Similar.


Can some of you who have good knowledge tell me if this would be the right/good way to implement my Idea?




No comments:

Post a Comment

readings - Appending 内 to a company name is read ない or うち?

For example, if I say マイクロソフト内のパートナーシップは強いです, is the 内 here read as うち or ない? Answer 「内」 in the form: 「Proper Noun + 内」 is always read 「ない...