Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chord recognizer v.1.0

This is a chord recognizer for natural chords (maj, min). The recognition proccess uses a CNN for the chord classification and a HMM for time of onset and offset detection of each chord. The project have a interactive GUI for youtube songs classification.

Demo of chord-recognizer is here


Steps of use (using the terminal):

  • You can follow this video or you can use the following guide for the installation. (deprecated use the guide)

For Ubuntu-linux

  • YOU NEED FIRST A VERSION OF PYTHON 3.8 (you can use this commands to install it)

    sudo add-apt-repository ppa:deadsnakes/ppa 
    sudo apt-get update  
    sudo apt install python3.8 
  • You have to make a folder and open it in the terminal

    mkdir chord_recognizer
    cd chord_recognizer
  • clone the respository inside your folder with the following line

    git clone https://github.com/santiagomd11/chord-recognizer.git .
    
  • Download Here here the models for the project. Then copy the Models folder and place it in the same folder where you cloned the repo.

  • Install required packages for Cpython and madmom and also tkinter and ffmpeg for linux, with the following commands:

    sudo apt install python3.8-distutils
    sudo apt-get install python3.8-dev
    sudo apt install python3.8-tk
    sudo apt install ffmpeg
  • Create a virtual enviroment for install dependecies without modifying your computer packages

    if you don't have vitualenv package installed run this command line:

    pip install virtualenv

    or

    pip3 install virtualenv

    Then in the folder where you cloned the repo run this command line to create the virtualenv:

    virtualenv --python python3.8 venv
  • Run the program

    First activate your virtual env

    source venv/bin/activate

    Then install this packages first to avoid errors in the installation

    python -m pip install Cython==0.29.14
    python -m pip install numpy==1.19.5

    Then install the requirements of the project:

    python -m pip install -r requirements.txt

    Finally run the program

    cd "Scripts/recorded_files"
    chmod +x gui.py recorded_files.py
    python3 gui.py

For windows

Download ffmpeg for windows from this link and place it in a local disk of your computer (i place it in the C disk) and then follow the next steps for setting ffmpeg for windows:

  • With the ffmpeg_windows file placed, go to the Edit the sytem enviroment variables and open it

  • Go to advanced system properties and click on eviroment variables

  • Choose the path option on user vairbales and system variables and then click on edit

  • Click on new

  • And finally paste on the new entry the path in where you placed the ffmpeg_widows file

You have to make a folder(i made it in the C disk)and open it in the terminal (using cd command), then you have to follow the next steps

  • clone the repository in your folder with the following line

    git clone https://github.com/santiagomd11/chord-recognizer.git .
  • Download Here here the models for the project. Then copy the Models folder and place it in the same folder where you cloned the repo.

  • install microsoft build tools because madmom use Cython, run this command for the installation:

    vs_buildtools.exe --norestart --passive --downloadThenInstall --includeRecommended --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.MSBuildTools
  • Create a virtual enviroment for install dependecies without modifying your computer packages

    if you don't have vitualenv package installed run this command line:

    pip install virtualenv

    Then in the folder where you cloned the repo run this command line to create the virtualenv:

    python -m virtualenv --python python3.8.10 venv
  • Run the program

    First activate your virtual env

    venv\Scripts\activate.bat

    Then install this packages first to avoid errors in the installation

    python -m pip install Cython==0.29.14
    python -m pip install numpy==1.19.5

    Then install the requirements of the project:

    python -m pip install -r requirements.txt

    Finally run the program

    cd "Scripts\recorded_files"
    python gui.py

GUI:

Gui chord recognizer v.1.0

  • You have to insert a youtube link and then press enter (like the demo)
  • You have play, stop, return buttons and a slider to move along the song.

Datasets

The annotations for each audio have the following structure:

The annotations were gotten from five sources, and the audios were gotten manually, because they were not given for copyright reasons. The number of pairs of audios and annotations for each dataset is showed as follow:

The dataset were organized in the McGill Billboard format, and were splitted in train and test sets, the number of pairs of audios and annotations for each set is showed as follow:

  • train: 438

  • test: 123

The full dataset with the annotations and the audios is available Here. If you use it give credits to the author with the link of the repository or with the following cite "Santiago Montaño Diaz. (2022). Identificación automática de acordes musicales utilizando Machine learning. Universidad de los andes, Bogotá, Colombia." because get the audio for each annotation and organize the data required a hard work from the author.


Contact: santiagoe4333@gmail.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages