Guitar Chord Recognition Algorithm?

て烟熏妆下的殇ゞ 提交于 2019-11-28 15:21:21
tias

The short answer is that you need much more than one algorithm. Good chord recognition methods could more aptly be described as "systems", but usually they are indeed based on an initial transform to the frequency domain (most often DFT).

If you want a chord representaton of the song similar to this

C G Am F7 F6 C ...

then this is actually a problem that is slightly removed from recognising the notes in a piece of audio. In fact, there are two problems (roughly speaking):

  1. finding which pitches are present at any time
  2. grouping these pitches over time so as to be able to assign a chord label to a time interval.

It turns out that the way you transform from the time domain (normal audio) to the frequency domain (spectral representation) is only of limited importance. It's very important what you do afterwards, and often sophisticated probabilistic models (similar to those in speech recognition: HMMs, DBNs, ...) are used to tackle this problem.

Try google scholar "chord transcription", or "chord detection", or "chord labelling" for advanced research in this area.

Most of these approaches use a discrete Fourier transform (DFT) to create the initial spectrogram. During further processing, too, they tend to differ only slightly, though different time-series smoothing techniques have been used: hidden Markov models, dynamic Bayesian networks, support vector machines (SVMstruct), and conditional random fields -- among others. The most advanced transcribers use automatic tuning, key information, bass note information, and information of the metric position to improve the results. My thesis (Chapter 2) gives a nice overview.

Open source chord detection algorithms:

Hope this helps.

Well, you can try another set of algorithms for frequency-domain, like wavelets. But I am not sure if that will do for your accuracy issue. Actually, I didn’t understand in what way you are having trouble with the FFT. It will always be an approximation of the chord, there is no perfect way to retrieve that kind of information on sound.

So, it depends on the analysis you do on that spectrum, with single notes, there is actually a lot of better algorithms than the FFT, but with chords you will very likely have to work with FFT.

The problem you will have to deal is split the fundamental harmonics from the upper harmonics, one thing that may help is only consider frequencies that are on the guitar range. If you only have to work with guitar sounds, you should give some time to study the normal frequency-domain graph of the guitar and try to use that to improve you accuracy.

The FFT can and will give you all the single tones if you set the software up properly. The whole point of the FFT is to discriminate tones, or if you're an astrophysicist, you want to know the individual elements (sulpher, hydrogen...) that is in the light coming off the star.

Harmonics are not a problem because they have less 'power' than the fundamental frequencey, for example, C=440hz, but C=880hz as well, but 880 will be the smaller spike in the FFT results.

Matthias

There are some reasonably successful tools that use the DFT (FFT), but they do lots of processing after calculating the DFT.

Try this link for a summary the current state of the art, or google "Chordino" or "Chordata" for open source chord extraction algorithms.

There is a contest between scientist where people try to analyze different parameters of music. One of section of this contest is chord recognition. This contest is public so anyone can participate in it and show the results in this sphere. The results of the 2011 year is published here.

A friend of mine has achieved good results in this sphere (and in this contest too). You can read about his approach on his webpage.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!