Program that recognize musical notes (1 notenot chords) and give their frequencies

Hi !
I'm currently working on a program able to recognize musical notes. The idea is that you put a ".wav" file with several notes in it that are played at different times. Then the program analyze the file and for each notes displays it's frequency.
I first tried to work with the FFT function but I can't figure out how to extract the fundamental frequency.
I hope you can help me ! Thanks.

댓글 수: 3

You need to break the sound up into intervals of individual notes. The typical way to do that is to not use fft() and to instead use a short time dft such as spectrogram()
If you do use fft() then I recommend reading the examples to see how they create the labels for the graphs, as that shows you how to convert from position in the fft result over to frequency.
Thank you.
Once I've broke the sound to isolate each note is the spectrogram function useful to get the fundamental frequency of a note ?
You do not need to break the sounds up if you use spectogram, as spectogram automatically breaks it up into windows and calculates the frequency information over time.
Look at https://www.mathworks.com/help/signal/ref/spectrogram.html#bupm9cj and see how they put frequency along x and time along y. For any given time (that is, row), the fundamental frequency should be the one for which the x value is greatest.

댓글을 달려면 로그인하십시오.

답변 (1개)

Long Nguyen
Long Nguyen 2019년 7월 26일
편집: Long Nguyen 2019년 7월 27일
Hi there,
I'm quite new to MatLab and currently trying to make something out this idea.
I would like to ask if you were still interested in this and please to help, I have troubles interpreting the recommended ideas into coding, to be more clearly, by which command can I get data of the frequency in hertz in the workspace?
Could you please give me some code of using spectrogram to extract the fundamental frequency?
Thanks for !

카테고리

도움말 센터File Exchange에서 Get Started with Signal Processing Toolbox에 대해 자세히 알아보기

질문:

2018년 3월 4일

댓글:

2019년 7월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by