Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
Björn Bents
Björn Bents le 17 Août 2021
Commenté : Justin le 29 Oct 2022
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])

Réponses (1)

jibrahim
jibrahim le 18 Août 2021
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 commentaire
Justin
Justin le 29 Oct 2022
hey was wondering, any idea how to obtain the L50 level from this data?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Measurements and Spatial Audio dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by