MATLAB: Musical Note Filter & Fundamental Frequency

fftfilterfourier transformfundamental frequencyMATLABmusic notesignal processing

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!!

Best 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.)