{"id":13680181,"url":"https://github.com/sevagh/chord-detection","last_synced_at":"2025-04-13T12:34:20.173Z","repository":{"id":82225395,"uuid":"197102115","full_name":"sevagh/chord-detection","owner":"sevagh","description":"DSP algorithms for chord detection + key estimation","archived":false,"fork":false,"pushed_at":"2023-07-14T02:09:53.000Z","size":3938,"stargazers_count":126,"open_issues_count":1,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T01:01:52.574Z","etag":null,"topics":["autocorrelation","chords","chromagram","dsp","polyphonic","signal-processing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sevagh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-07-16T02:00:05.000Z","updated_at":"2025-03-20T21:51:35.000Z","dependencies_parsed_at":"2024-01-07T21:53:00.834Z","dependency_job_id":"7a834eb2-51b3-4d25-af59-218ef0409d9a","html_url":"https://github.com/sevagh/chord-detection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sevagh%2Fchord-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sevagh%2Fchord-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sevagh%2Fchord-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sevagh%2Fchord-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sevagh","download_url":"https://codeload.github.com/sevagh/chord-detection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248714614,"owners_count":21149926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autocorrelation","chords","chromagram","dsp","polyphonic","signal-processing"],"created_at":"2024-08-02T13:01:13.969Z","updated_at":"2025-04-13T12:34:20.147Z","avatar_url":"https://github.com/sevagh.png","language":"Python","funding_links":[],"categories":["Python","Audio Related Packages"],"sub_categories":[],"readme":"# chord-detection\n\nThis repository is an MIT-licensed collection of multipitch/polyphonic instrument chord and key detection methods, implemented from academic papers using Python.\n\n## Usage\n\nPip install it from the git url: \n```\n$ pip install git+https://github.com/sevagh/chord-detection.git\n```\n\nThis installs the library `chord_detection` and the command-line tool `chord-detect`:\n```\n$ chord-detect\nusage: chord-detection [-h] [--key] [--displayplots DISPLAYPLOTS] [--method METHOD] input_path\nchord-detection: error: the following arguments are required: input_path\n```\n\nRun tests:\n```\n$ python ./tests/gen_test_clips.py\n$ python -m unittest\n```\n\n## Methods\n\nThe results displayed come from a wav clip of a piano C major chord. The outputs are the summed chromagrams across all the frames, normalized to 9 (the biggest single-digit number), in a 12-digit chroma vector string.\n\nThe expected notes of a C major chord are C E G, so the expected answer should resemble `C000E00G0000`, where `C \u003e E, C \u003e G`. The values of C, E, G are specific to the method being used, but it's some representation of the energy of the detected pitch, e.g. spectral energy, summed FFT.\n\n### ESACF (Tolonen, Karjalainen)\n\n```\nreference: C000E00G0000\ncomputed:  900003001000, key: Cmaj\n```\n\n![esacf](.github/piano_c_1.png)\n\n_T. Tolonen and M. Karjalainen, \"A computationally efficient multipitch analysis model,\" in IEEE Transactions on Speech and Audio Processing, vol. 8, no. 6, pp. 708-716, Nov. 2000._\n\n_V. Zenz and A. Rauber, \"Automatic Chord Detection Incorporating Beat and Key Detection,\" 2007 IEEE International Conference on Signal Processing and Communications, Dubai, 2007, pp. 1175-1178._\n\n### Harmonic Energy (Stark, Plumbley)\n\n```\nreference: C000E00G0000\ncomputed:  921111111111, key: Cmin\n```\n\n![harmeng](.github/piano_c_2.png)\n\n_M Stark, Adam and Plumbley, Mark., \"Real-Time Chord Recognition for Live Performance,\" in Proceedings of the 2009 International Computer Music Conference (ICMC 2009), Montreal, Canada, 16-21 August 2009._\n\n### Iterative F0 (Klapuri, Anssi)\n\n```\nreference: C000E00G0000\ncomputed:  900301000000, key: Cmin\n```\n\n![iterativef0](.github/piano_c_3.png)\n\n_Klapuri, Anssi, \"Multipitch Analysis of Polyphonic Music and Speech Signals Using an Auditory Model,\" IEEE TRANSACTIONS ON AUDIO, SPEECH, AND LANGUAGE PROCESSING, VOL. 16, NO. 2, FEBRUARY 2008 255._\n\n_Klapuri, Anssi. \"Multiple Fundamental Frequency Estimation by Summing Harmonic Amplitudes.\" ISMIR (2006)._\n\n### Prime-multiF0 (Camacho, Kaver-Oreamuno)\n\n```\nreference: C000E00G0000\ncomputed:  951000000002, key: Cmin\n```\n\n![primemultif0](.github/piano_c_4.png)\n\n_Camacho, A, Oreamuno, I, \"A multipitch estimation algorithm based on fundamental frequencies and prime harmonics,\" Sound and Music Computing Conference 2013._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsevagh%2Fchord-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsevagh%2Fchord-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsevagh%2Fchord-detection/lists"}