100 Days Of ML Code — Day 036

100 Days Of ML Code — Day 036

Recap From Day 035

In day 035, we looked at working with audio input: Common audio features. We saw that Constant Q transform gives us a nice, general-purpose feature vector in the middle ground between peak frequency and Spectral Centroid. Like the FFT, Constant Q gives us information about the strengths of the different frequencies present in our analysis window.

Today, we’ll continue from where we left off in day 035

Working With Audio Input: Common Audio Features Continued

Chromagram

In the music context, the term chromagram closely relates to the twelve different pitch classes. Chroma-based features, which are also referred to pitch class profiles, are a powerful tool for analyzing music whose pitches can be meaningfully categorized (often into twelve categories) and whose tuning approximates to the equal-tempered scale.

One main property of chroma features is that they capture harmonic and melodic characteristics of music, while being robust to changes in timbre and instrumentation.

[Source](http://By Meinard.mueller - Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=47816462)Source

If we do compute one Constant Q value per note on the piano, we could also do something like sum together all of the bins that correspond to the note C in any octave, giving us one feature that relates to how much C is in the sound. We could do the same thing for C-sharp, and D, and so on. This type of feature is called a chromagram and it’s another very good, general-purpose feature for music analysis.

In music, since notes exactly one octave apart are perceived as particularly similar, knowing the distribution of chroma even without the absolute frequency (i.e. the original octave) can give useful musical information about the audio — and may even reveal perceived musical similarity that is not apparent in the original spectra.

It’s good to know that you’re still here. We’ve come to the end of day 036. I hope you found this informative. Thank you for taking time out of your schedule and allowing me to be your guide on this journey. And until next time, remain legendary.

Reference

*https://www.kadenze.com/courses/machine-learning-for-musicians-and-artists-v/sessions/sensors-and-features-generating-useful-inputs-for-machine-learning*

*https://en.wikipedia.org/wiki/Chroma_feature*

*https://labrosa.ee.columbia.edu/matlab/chroma-ansyn/*