Chords are identified automatically from monophonic/polyphonic audio. The feature extracted is called the Pitch Class Profile, which is obtained by computing the Constant Q Transform. Two methods are used for classification:
- Template matching - The pitch profile class is correlated with 24 major and minor chords, and the chord with highest correlation is identified. Details given in the paper Automatic Chord Recognition from Audio Using Enhanced Pitch Class Profile - Kyogu Lee in Proc. of ICMC, 2006.
- Hidden Markov Model - HMM is trained based on music theory according to the paper A Robust Mid-level Representation for Harmonic Content in Music Signals - Juan P. Bello, Proc. of ISMIR, 2005. Viterbi decoding is used to estimate chord sequence in multi-timral, polyphonic music.
Run main.py with an input file name from data/test_chords/ with flag -m set to the method you want to use for detection, and -p for plotting the result. The default method is template matching. Example:
python3 main.py -i 'Grand Piano - Fazioli - major E middle.wav' -m hmm -p True
For help, run python3 main.py -h