orchidas / Chord-Recognition

Automatic chord recognition with PCP (Pitch Class Profile)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chord-Recognition

Automatic chord recognition in Python

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:

  1. 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.
  2. 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.

Usage

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

About

Automatic chord recognition with PCP (Pitch Class Profile)


Languages

Language:Python 100.0%