/Music-notes-detection

This python code will detect the musical note present in a given instrument's audio file, Using Fast Fourier Transformation method

Primary LanguagePython

Music-notes-detection

This python code will detect the musical note present in a given instrument's audio file

Here I have used the fast Fourier transformation method to convert time frames to frequency frames. now the musical note frequency is found at the first peak of frequency-amplitude plot.

A fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT). Fourier analysis converts a signal from its original domain (often time or space) to a representation in the frequency domain and vice versa. (wikipedia)

Note that: This program can only be used for detecting a single note from a given wav file.


Raw Music file(Piano C4):

alt img

After Applying Normalisation:

alt img

  • Applying Fast Fourier transformation on Note C4:

alt img

  • Applying Fast Fourier transformation on Note C2:

alt img

  • Applying Fast Fourier transformation on Note C6:

alt img

Run Code:

$ python music_notes_detection.py