Repository with scripts to reproduce some results from my 2017 MIR course student blog: https://musicinformationretrieval.wordpress.com/category/audio-chord-detection/
To run most of the scripts you'll need:
- Linux-like or Mac OS X system with standard tools (shell, awk) and python 2.7.
- two directories which represents chord-annotated audio dataset:
- with 'wav' audio files (perhaps other formats (e.g. .flac) will work as well)
- MIREX-style 'lab' files with chord annotations. Every file in one directory should be matched to a file in another directory by name (e.g.: /chains.wav corresponds to /chains.lab)
- https://github.com/jpauwels/MusOOEvaluator compiled, with its' executable path added to the PATH environment variable.
- Essentia (http://essentia.upf.edu/documentation/)
- numpy python package (http://www.numpy.org)
- vamp python package (https://pypi.python.org/pypi/vamp/1.0.0)
Additional dependencies are listed for each section.
Dependencies:
- madmom python package (https://github.com/CPJKU/madmom)
- Essentia (http://essentia.upf.edu/documentation/)
- Chordino vamp plugin (http://www.isophonics.net/nnls-chroma)
How to run:
- Chordino algorithm evaluation e.g.: ./run_chordino.sh audio chordannotations
- Madmom algorithm evaluation e.g.: ./run_madmom.sh audio chordannotations
- Essentia ChordsDetection algorithm evaluation e.g.: ./run_essentia.sh audio chordannotations
- Essentia ChordsDetectionBeats algorithm evaluation e.g.: ./run_essentia_beats.sh audio chordannotations
II. Robustenss tests (https://musicinformationretrieval.wordpress.com/2017/03/21/robustness-tests-for-ace-algorithms/)
NOTE: scripts for this part have hardcoded file paths which must be manually edited.
Dependencies:
- Lame library for MP3 compression test (http://lame.sourceforge.net)
- ffmpeg library for downsampling test (http://lame.sourceforge.net)
- MATLAB and AudioDegradationToolbox for vynil effect test (https://code.soundsoftware.ac.uk/projects/audio-degradation-toolbox)
- Audacity for pitch sift test (http://www.audacityteam.org)
How to run:
- For MP3 and downsampling edit pathes and run degrader.py
- For vynil effect run vynil.m from MATLAB
- For pitch shift use Audacity GUI
- For evaluation use run_on_degraded.sh, run_on_vynil.sh, run_on_shifted.sh.
III. Chroma features evaluation (http://TODO)
Dependencies:
- for NNLS chroma: Chroma NNLS vamp plugin (http://www.isophonics.net/nnls-chroma)
- for librosa: librosa python package (https://github.com/librosa/librosa)
- for ChromaToolbox CLP and CRP features: MATLAB and Chroma Toolbox (http://resources.mpi-inf.mpg.de/MIR/chromatoolbox
How to run:
- run_essentia_beats.sh for HPCP chroma features
- run_nnls.sh for NNLS chroma
- for CLP and CRP:
- run extract_muller_features.m from MATLAB (manually edit hardcoded paths first).
- ./run_clp.sh specifying obtained chroma directory and extension (either .clp or .crp).
- for librosa: modify run_essentia_beats.sh (uncomment librosa related sections).
IV. Intermediate improvements (http://TODO)
Dependencies:
- for NNLS chroma: Chroma NNLS vamp plugin (http://www.isophonics.net/nnls-chroma)
- madmom python package (https://github.com/CPJKU/madmom)
- Essentia with patched ChordsDetectionBeats algorithm (57284ab08b1bd93b24ef6b56dc7ccef5c6259d3c) should be used for second and third improvements.
Improvements:
- NNLS chroma plugged instead of HPCP: run_nnls.sh
- Chroma smoothed (by convolution with hanning window), sampled on every beat: run_essentia_beats_hacked.sh
- BeatTrackerMultiFeature replaced with madmom's DBN beats: run_essentia_dbn_beats.sh
- Template mapping pseudoprobabilities plugged into HMM: run_improved.sh
V. Final Algorithm (http://TODO)
Dependencies:
- madmom python package (https://github.com/CPJKU/madmom)
- Chroma NNLS vamp plugin (http://www.isophonics.net/nnls-chroma)
How to run:
- Prepare directory with chroma and beat tracking data (in order to save time later on chord detection re-run with different parameter sets), e.g.: python prepare.py audio npz_dir
- Run the algorithm evaluation, e.g.: ./run_improved.sh npz_dir chordannotations
- find results in directory: IMPROVED_output_audio
Dependencies:
- matplotlib and seaborn python packages.