amplitude of a pink noise wave file

조회 수: 2 (최근 30일)
tony karamp
tony karamp 2013년 5월 1일
Hello all,
I created a pink noise wavfile using Adobe Audition. the wavfile has length of 50 seconds, two channels (I named them Left - Right) and went through a band pass filter of 50-2000Hz (those are the frequencies allowed to pass).
I want to find the amplitude of that signal and then find the corresponding dB level.
What I did so far:
x = abs(Left); %take the absolute values
Ampl_Abs = mean(x); %that should give mean ampl of the signal
find_dB_level = 20*log10(Ampl_Abs); %that should give me the dB level
I wasn't sure that that was the correct approach, so later I tried FFTing the signal and then retrieve all the info, but that gave me different numbers:
NFFT = 2^nextpow2(length(Left));
x = fft(Left,NFFT)/length(Left);
f = fs/2*linspace(0,1,NFFT/2+1);
plot(f,2*abs(Left(1:NFFT/2+1)))
title('Single-Sided Amplitude Spectrum of Left')
xlabel('Frequency (Hz)')
ylabel('|Y(f)|')
Is there a way to get all that info from Audition straight out? if yes, how?
Which is the best way to find the mean amplitude and the corresponding dB level?
Thank you in advance!

답변 (2개)

Daniel Shub
Daniel Shub 2013년 5월 1일
You probably do not want the mean unsigned amplitude, but rather the root mean square amplitude. Talking about an unreferenced decibel level is a little strange.

tony karamp
tony karamp 2013년 5월 1일
편집: tony karamp 2013년 5월 1일
First of all, thank you for taking the time to reply!
second, I did do that, I am sorry I forgot to mention it. In fact here is the code:
%finds the amplitude
testdB = sqrt(Left.^2);
findAmpl = mean(testdB(1:t5));
%finds the corresponding dB level
findDB = 20*log10(findAmpl);
Is that correct?
  댓글 수: 2
Daniel Shub
Daniel Shub 2013년 5월 1일
The interface on answers is a bit tricky, but this should have been a comment to my answer (see the blue Comment on this Answer link), and not an answer (i.e., the big box).
Your method is incorrect.
testdB = sqrt(Left.^2);
is the same as
testdB = abs(Left);
you want to average the squared values:
findAmpl = sqrt(mean(Left(1:t5).^2));
tony karamp
tony karamp 2013년 5월 1일
yes, I see what you mean...
My answer should also be a comment. Oh, well!
Thank you once again.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Get Started with Signal Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by