File Exchange

image thumbnail

Sound Analysis with Matlab Implementation

version 1.3 (338 KB) by

Time and frequency analysis, measurement of the crest factor, the dynamic range, etc.



View License

The present code is a Matlab program for signal analysis of a given sound file. The analysis includes:
1) Plotting of the:
- signal in the time domain;
- signal in the frequency domain (spectrum);
- signal in the time-frequency domain (spectrogram);
- amplitude probability distribution of the signal;
- autocorrelation function of the signal.
2) Displaying of the:
- minimum and maximum value of the signal;
- standard deviation (RMS-value);
- mean value (DC-value);
- crest-factor Q;
- dynamic range D;
- autocorrelation time.
The code is based on the theory described in:

[1] D. Manolakis, V. Ingle. Applied Digital Signal Processing. Cambridge, Cambridge University Press, 2011.

[2] G. Heinzel, A. Rudiger, R. Schilling. Spectrum and spectral density estimation by the Discrete Fourier transform (DFT), including a comprehensive list of window functions and some new flat-top windows. Germany, Hannover, Max-Planck-Institut für Gravitationsphysik, 2002.

[3] I. Tashev, A. Acero. Statistical Modeling of the Speech Signal. IWAENC 2010, August 30 - September 2 2010, Tel Aviv, Israel.

[4] M. Mijic, D. Masovic, D. Pavlovic, M. Petrovic. Statistical properties of music signals. 126th AES Convention, May 7 – May 10, Munich, Germany. Proceedings of papers, p. 7702, 2009.

[5] Хр. Живомиров, Д. Пламенова. Изследване някои параметри на аудио сигналите. Национална конференция с м.у. „Акустика 2012”, 12 Октомври 2012, Варна / Списание Акустика, ISSN: 1312-4897, год. XIV, бр. 14, стр. 89-95, 2012.

Comments and Ratings (11)

Just what I needed, thank you!

vahid fooladi

Sean Jungst

Thanks a lot! This code helped me create a very interesting GUI project for my Matlab class.

Very nice..
Question) How can i interpret from the autocorrelation graph & value ?

what is the autocorrelation of the music signal?

Hristo Zhivomirov

Hi, Nguyen! The basic reason for a minus sign in front of some dB value is because the logarithm of a number 0<x<1 is negative.

Why dB have "-"?

Thank you very much!



helal (view profile)



A new version of the code has been uploaded.


A new version of the code has been uploaded.


Calculation of the autocorrelation function of the signal is added.

MATLAB Release
MATLAB 8.4 (R2014b)

Inspired: plotpsd

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today