Winter Week 4 - Starting in C
- Ashish Sareen
- Jan 28, 2020
- 1 min read
This week, my partner and I finished prototyping chroma feature generation in Python and began porting the code over to the LCDK. Since the LCDK is programmed in the C language, we had to recreate the functionality of the Python library in C. My partner finished the port process, while I prepared the data for testing.
I had previously collected a large data set which contained audio files for 10 of the major chords used in popular guitar music. I spent some time assembling audio files for 14 additional chords, in order to be able to test and implement the chord recognition algorithm for all 24 chords in the chromatic scale (12 major, and 12 minor). The final step was to convert the audio files to a raw format (such as wav) that can be interpreted as a C array data type. Luckily, there are several programs and libraries available in C that can do this. Next week, we will be able to generate chroma features from our test data.
Lastly, we decided to begin chord recognition by using the simplest algorithm possible: the template method. A template, which is a bit vector that identifies the notes of a chord in a chroma vector, is multiplied with the chroma vector to give the inner product. This inner product is a measure of similarity to a chord, which can easily be used to match the chroma to a chord. If this doesn't cut it, then we will begin work on the more complex methods mentioned previously.
Ok, good.