File Exchange

image thumbnail

Sound Level Meter

version 1.0.0.0 (1.84 MB) by Douglas Lanman
Implements real-time spectrum analyzer and displays decibel level.

15 Downloads

Updated 13 Jan 2006

View License

This tutorial/demo presents the design of a sound level meter in Matlab. The Data Acquisition Toolbox is used to implement a real-time spectrum analyzer. The decibel meter is implemented in the frequency domain using Parseval's relation.

Documentation is provided in the included PDF.

Further information is available at: http://mesh.brown.edu/dlanman.

Cite As

Douglas Lanman (2020). Sound Level Meter (https://www.mathworks.com/matlabcentral/fileexchange/9603-sound-level-meter), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (22)

xuguang sun

You are right,please ignore the last comment。

xuguang sun

There is a small error in code of estimateLevel.m, X = A'.*X should be modified to X = sqrt(A').*X.

ycxiong

Lance Lot

i don't understand this part.

% Apply A-weighting filter.
A = filterA(f);
X = A'.*X;

% Estimate dBA value using Parseval's relation.
totalEnergy = sum(X.^2)/length(X);
meanEnergy = totalEnergy/((1/Fs)*length(x));
dBA = 10*log10(meanEnergy)+C;

% Estimate decibel level (for visualization).
X = 20*log10(X);

what is type of X? an array or a number?

micpro

Hi,
When I import another wav file, I did not get dBA result. Can anyone help me please?

anuj

i am unable to run the file. I am getting errors like not enough input arguments

ngan

Chi

how to run the file ?

Joachim

sourabh

when i run the SLM following errors come plz someone help me to remove them i am new to matlab
??? Invalid handle object.

Error in ==> updateDisplay at 23
set(figData.samplePlot,'YData',x);

Error in TimerFcn: '@updateDisplay'.
Invalid handle object.>>

umut arioz

Those codes were helped me in my works. But I want to use them in simulink. But of course, some functions dont work with embeddeb functions in simulink. for example "find". did you do before to carry this program to simulink or Can you offer me some way instead of using "find" ? thanks

Brian

Cheers, great help as tutorial on real-time data aqusuisition

It is a nice model of Sound Level Meter. My observation is: In the code, A-weighting is performed in frequency domain (i.e. multiplication in frequency domain). I feel like, if the A-weighting is in time domain (filtering, of input signal which is sampled at variable sampling frequency), the computation of fft can be saved.

nguyen quy

I want to see the source coding

Shufang Dong

Generally ok, but with miscellaneous errors need to be correct such as the A-weighting filter should be applied to pressure square rather than pressure, and the last formula of RMS of filtered pressure should not be divided by delta t.

smekfm gtlo

i am to try this software

Steven Kolak

.
MATLAB supports audio acquisition using the Data Acquisition Toolbox.

View the MATLAB sound resource page for additional demos, downloadable code examples, and user stories:
http://www.mathworks.com/sound

kesho hassan

it is goog

radwa magdy

Piyorot Khongchuay

cool

Rupesh Sancheti

the information given about the products using matlab is excellent

MATLAB Release Compatibility
Created with R14SP3
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Real time octave analysis