Frequency components analysis of piano and violin 4th octave notes for musical instrument detection
Abstract
We classify whether an input audio signal of notes from the 4th octave is that of a violin or a piano by comparing its frequency components to its nearest neighbours (kNN) in frequency space. We extract the frequency components using an implementation of the fast Fourier transform (FFT) and then use kNN (k = 5) to classify the signals based on the number of spectral peaks and the relative magnitude of each peak. We correctly classified 92% (11 out of 12) of our test samples.