To test the chord identification, we used the Database of Piano chords consisting of 16GB worth of chord wav files. Additionally, we manually recorded individual chords to get recordings from different pianos. This would give us a full range to test the KNN chord classifier.
Furthermore, we concatenated specific audio files from the Database of Piano Chords and recorded our own chord progressions to test the modified Krumhansl-Schmuckler algorithm as well as the final generated Roman numerals.
The Harmonic Product Spectrum algorithm seems to have mixed results. The goal of it was to minimize overtones to a value close to 0 and keep the primary tones close to 1. However, what ended up happening is that the overtones got close to 0, but the primary tones were left in between 0 and 1 and depended on the loudness of each pitch which affected chord identification. Onset detection also occasionally split chords into two sometimes affecting the chord ID.
Chord identification had mostly good results identifying 41/50 correct chords with an accuracy score of 82%. The program excelled at determining the names of triads. However, when we tested it with seventh chords, it sometimes had a little trouble as not all of the pitches in the chord could be heard often times. This is apparent in Demo 3 below, where the second seventh chord was misidentified as a V instead of a V7 because the program only heard three out of the four pitches. However, the chord that was identified instead was either the triad without the root, or the triad without the seventh so the chord label was actually not far off at all. Finally, an important note is that the program has no way of dealing with implied harmony (chords with missing pitches). However, this is a challenging task for musicians, and could be developed in the future.
All of the testing with the key-finding algorithm has been 100% accurate. At first, the base algorithm had a little trouble identifying the key of shorter chord progressions with chords mixed from different keys. However, after implementing a scoring system based on music theory concepts like cadences and the appearences of certain chords. After this implementation, the program has yet to be incorrect in identifying the key. Something to note, however, is that when testing with key modulations such as in Demo 2 below, the program chose the closest match rather than returning multiple keys as this is not implemented.
For testing the Roman numeral output, we had to assume that the input chord labels and key were correct. The final output has been 100% accurate in returning the proper Roman numerals as it is based on simple distance calculations and dictionary mapping.
C Major: I-IV-V-I
C Major: I-ii-V-i
D Major: I-IV-V-V-I-V7/IV-I