Guitar Chord Recognition Algorithm?
Asked Answered
V

5

44

Whats a good digital signal processing algorithm that is good on guitar chords? Since Fast Fourier Transform I think only is accurate on single notes played on the guitar but not notes that are played simultaenously (i.e. chords).

Thanks!

Vallecula answered 27/10, 2010 at 12:22 Comment(2)
Ask the guys from Melodyne: youtube.com/watch?v=jFCjv4_jqAYWongawonga
On what basis do you think the FFT is inacurrate in your case?Kosher
W
79

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.

Warnerwarning answered 14/12, 2010 at 0:47 Comment(2)
+1 for a good answer and for being able to reference your own thesis in the answer.Hypophyge
i'm having a difficulty about using LabROSA Chord Recognition, can you guide me how to use it ? i use the terminal command, extractFeaturesAndTrain_svm and doChordID_svm, but it is unrecognizedShrovetide
P
4

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.

Pasargadae answered 1/12, 2010 at 11:37 Comment(0)
D
3

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.

Deppy answered 5/11, 2010 at 17:34 Comment(1)
Hi! When using FFT, is it possible to use the intensities of the bins to try and determine the notes that comprise the chords? Because I think that they will have some type of correlation with each other.Vallecula
E
2

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.

Equivalent answered 24/2, 2015 at 14:59 Comment(2)
nope, that is not true, if you try to draw spectrum produced by FFT, for example, for C5 note played on a violin you'll see that C5 has lower amplitude than C6.Othella
@YuriyKravets I think he means you can find the root note as it will be the one with the greatest 'power' as he puts itCavallaro
F
1

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.

Forwarder answered 14/9, 2012 at 15:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.