Please download the following song, and run the above code in the same folder as the song. Feel free to run this against any song of your choosing. For the updated MFCC interface function version of this song, please see below MATLAB Code.
Here is a standalone script that demonstrates the FFT Method of the Key Signature Detection:
The results of this method on the files shown can be seen in this pdf file produced using MATLAB's Publish functionality:
Here are the clips of known key used to test the key signature detection functions:
75 songs were downloaded from the Free Music Archive: https://www.freemusicarchive.org/search
Credit to artists:
Kai Engel
Yakov Goldman
David Hilowitz
Alex Mason
Chad Crouch
sawsquarenoise
Podington Bear
Guifrog
Jason Shaw
Andy G Cohen
Jahzzar
Cellophane Sam
Josh Woodward
David Szesztay
Gillicuddy
Mid-Air Machine
******* United
The Dubbstyle
Sro
Soft and Furious
Six Umbrellas
Shaolin Dub
Room of Wires
Rolemusic
RoccoW
Richie Daggers
Re-Arbeiten
Organism
OKAM
Nuan
Nctrnm
Eye of Elephant
Drake Stafford
Bill Vortex
Gargoyles
Hadokowa
Lately Kind of Yeah
E. Sheirer, “Tempo and beat analysis of acoustic musical signals,” The Journal of the Acoustical Society of America, 1998.
https://www.clear.rice.edu/elec301/Projects01/beat_sync/references.html
Z. Qin, W. Liu, and T. Wan, “A Bag-of-Tones Model with MFCC Features for Musical Genre Classification,” Advanced Data Mining and Applications Lecture Notes in Computer Science, pp. 564–575, 2013.
Auditory Toolbox. https://engineering.purdue.edu/~malcolm/interval/1998-010/AuditoryToolboxTechReport.pdf
Wavelet Denoising Overview:
http://klapetek.cz/wdenoise.html
Comparing Wavelet Types:
https://www.mathworks.com/help/wavelet/ug/wavelet-families-additional-discussion.html
https://www.researchgate.net/post/Can_anybody_compare_Haar_Daubechies_coiflet_and_symlet_wavelets
Matlab Webinars:
Matlab Wavelet Toolbox:
https://www.mathworks.com/help/wavelet/ref/wavedec.html
https://www.mathworks.com/help/wavelet/ref/wdenoise.html