# how to process audio files in Matlab

I have project in which I'll work on audio files using Matlab, I'll be listing to different machine and should get thei rotational speeds, which is kind of periodic, my question how should I analyse this should I work with the spectrum and its magnitude using the fft or should I use the PSD , which is the result of pwelch. I'm not asking for code! thanks for your help

## 1 Answer

Spectrum, FFT magnitude, and pwelch are pretty much the same thing, i.e. a metric of energy density as a function of frequency. They all can be configured in different ways: window length, window shape, overlap, FFT size, lin/log representation, smoothing, different averaging methods, etc. All these parameters need to be chosen carefully depending on the requirements of your application: how fast do you need to track, what frequency resolution do you need, what's the noise spectrum look like etc. Choosing the parameters properly is actually more important than the core algorithm (which is more or less the same anyway).