Musical Note Filter & Fundamental Frequency

Hi everyone,
I am trying to write a code on MATLAB 2019a. As an input, I have the recording of a musical note, in order to find its fundamental frequency. As far as my research has gone, the plan is, to pass the sound through a filter (don't really know which kind to use) and then with a series of DTFT, DFT and FFT (if all of these are needed), end up with a distinctive graph, to continue with the selection of the fundamental frequency. I have parts and bits of the code so far but nothing working all together. I know it's a lot to ask but feeling like I 've hit a dead end.
Thank you very much in advance!!

5 Comments

I would just use the fft and findpeaks functions.
Thank you very much for the fast response Star! The fft would be enough for the noise as well, or a filter is needed?
It depends on the nature of the noise. A filter will not eliminate broadband noise, nor noise that is in the region of the signals you are interested in, without significantly decreasing those signals as well. I would use the fft to determine the nature of the noise. If all or most of it is band-limited, and outisde the frequencies of your signal, a filter would work.
Great! You 've been really helpful, thank you for your time! If you have any examples in mind to point me out to, I would be extremely grateful.

Sign in to comment.

 Accepted Answer

If you want examples of filtering, I’ve posted several over the years. One recent example is I need help building bandstop filter to filter noise from my wav file. (link). This shows how to build a filter using various MATLAB functions. You can also use the lowpass (link) and similar functions to create filters and filter signals. (They were introduced in R23018a. If you use the second output, use it with the filtfilt function to filter other signals.)

More Answers (0)

Categories

Find more on Fourier Analysis and Filtering in Help Center and File Exchange

Products

Release

R2019a

Community Treasure Hunt

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

Start Hunting!