Is there a possibility to scale the x-axis of the splMeter Window?

4 ビュー (過去 30 日間)
Björn Bents
Björn Bents 2021 年 8 月 17 日
コメント済み: Justin 2022 年 10 月 29 日
Hey guys,
for a scintific thesis, I work on a project to analyse acoustic signals. I calculate much acoustic parameters and know i try to calculate the SPL from a .wav Data. I record it with a sample rate of 44.1kHz and i used the splMeter function to get a view on the SPL. My problem is the scale of the SPLWindow. I cant set it to x=0. Now the smallest x-value is about 28,8sec. So i miss the shape of 24 seconds from the SPL.
The yellow graph show the Lt- time weighted sound level (dB). The other graphs a not that important.
I also tried to search on MathWorks for other solutions but I cant find any. You can find the code i used below. The .wav data is also in the attachments to see.
Another short question: Is there another option to calculate the SPL from a .wav data?
Thanks for your help!<3
audFileName = '252_222oS.wav';
scope = timescope('SampleRate',44100,...
'TimeSpanSource','property',...
'YLimits',[20 110], 'AxesScaling','auto',...
'ChannelNames',...
{'LAF', 'LAeq', 'LApeak', 'LAmax'});
SPL = splMeter('TimeWeighting', 'Fast',...
'FrequencyWeighting', 'A-weighting',...
'SampleRate', 44100, ...
'TimeInterval',2,...
'CalibrationFactor',1);
x = audioread(audFileName);
[LAF,LAeq,LApeak,LAmax] = sm(x(:,1));
scope([LAF,LAeq,LApeak,LAmax])

回答 (1 件)

jibrahim
jibrahim 2021 年 8 月 18 日
Hi Bjorn,
I noticed that you set TimeSpanSource to true on the scope, but did not change the actual time span value. Maybe that's the issue?
audFileName = '252_222oS.wav';
[x,fs] = audioread(audFileName);
SPL = splMeter('TimeWeighting', 'Fast',...
'FrequencyWeighting', 'A-weighting',...
'SampleRate', fs, ...
'TimeInterval',2,...
'CalibrationFactor',1);
scope = timescope('SampleRate',fs,...
'TimeSpanSource','property',...
'TimeSpan',size(x,1)/fs,...
'YLimits',[20 110], 'AxesScaling','auto',...
'BufferLength',size(x,1)*4,...
'ChannelNames',...
{'LAF', 'LAeq', 'LApeak', 'LAmax'});
[LAF,LAeq,LApeak,LAmax] = SPL(x(:,1));
scope([LAF,LAeq,LApeak,LAmax])
  1 件のコメント
Justin
Justin 2022 年 10 月 29 日
hey was wondering, any idea how to obtain the L50 level from this data?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMeasurements and Spatial Audio についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by