Music Genre Classification With Machine Learning- Week 2
Hello everyone. In this blog, we are going to continue our Machine Learning Course Project which is Music Genre Classification. Today’s topic is “Feature Extraction”.
Today we are talking about the features and how we extract them. We announced the dataset we will use in our blog last week. In order to classify the characteristics of the track we define some features. But first we need to extract features from the track. There are some predefined feature extraction methods. We are going to use Librosa¹. Librosa is a python package for music and audio analysis. It provides the building blocks necessary to create music information retrieval systems.
Amplitude of sound is the strength or level of sound pressure.
A spectrogram is a visual representation of the spectrum of frequencies of a signal as it varies with time. When applied to an audio signal, spectrograms are sometimes called sonographs, voiceprints, or voicegrams⁴.
Features:
Briefly our first extraction method is Zero Crossing Rate is the rate at which a signal changes from positive to zero to negative or from negative to zero to positive. This is one of the simplest approach for Pitch Detection Algorithm. But this does not give complicated waveforms. Second extraction is the Spectral Centroid is a measure used in digital signal processing to characterize a spectrum². Third is MFCC. Used in MIR(Music information retrieval application) to describe the characteristic of the human voice. Next is Chroma Frequencies is also called pitch class profiles and it is a very powerful tool for analyzing music pitches³. And more on visit Librosa website.
These above feature extraction methods are for the spectral features we are planning to use other on that category. We can also extract the Rhythm features. More on will be published on following days.
References:
[1] McFee, Brian, Colin Raffel, Dawen Liang, Daniel PW Ellis, Matt McVicar, Eric Battenberg, and Oriol Nieto. “librosa: Audio and music signal analysis in python.” In Proceedings of the 14th python in science conference, pp. 18–25. 2015.
[2] Grey, J. M., Gordon, J. W., 1978. Perceptual effects of spectral modifications on musical timbres. Journal of the Acoustical Society of America 63 (5), 1493–1500
[3] M. Kattel, A. Nepal, A. Shah, and D. Shrestha, “Chroma feature extraction,” 01 2019.
[4] https://en.wikipedia.org/wiki/Spectrogram