Wave files; Input signal in Pascals?

Hi
I am trying to analyze a couple of psychoacoustic metrics such as loudness, sharpness, roughness and I found a code that supposedly does that:
Within this code there is a thirdparty folder called roughness and within that a function called fastannoyance.m
This code looks like this:
function res = fastAnnoyance(x,Fs,print)
% reports Zwicker's Psychoacoustic Annoyance metric - a combination of
% Loudness, Sharpness, Roughness and Fluctuation Strength.
%
%
% Input signals have samples in Pascals.
%
% Argument list
% x - Input signal in Pascals
% Fs - Sample rate
% print - bool - true to print answers to screen
%
if ~(Fs == 44100 || Fs == 40960 || Fs == 48000)
error(['Incorrect sample rate for this roughness algorithm. Please ' ...
're-sample original file to be Fs=44100,40960 or 48000 ' ...
'Hz']);
(....)
Well, this is part of the code at least. The whole code is a bit too long I think to insert here :) But anyway... The code runs fine but the values I get are a bit odd and I am guessing it has to do with the x argument.
I figured I can use
[x Fs]=Audioread('xxxx')
where x would be the soundfile. However the program asks for input signal in Pascals, which I believe the wav file does not give. Is there a way to convert my audiofile to pascal and then insert it as the x value?
Sorry if I am abit unclear!

 Accepted Answer

However, for sound files, this does not apply, as you rarely know the calibration factor for them -- you rarely have enough information about original loudness, or distance to source, or microphone sensitivity, to be able to calculate the calibration factor. Sometimes you do have that information, if careful deliberate tests are being done, but not often.

1 Comment

Ok thanks. I will see how much information I can gather from the recorder I used. Maybe that can help me.

Sign in to comment.

More Answers (1)

jing jing
jing jing on 22 Jul 2020
Hello, I am a psychoacoustic researcher. I am currently studying in the second year of graduate school. I would like to ask if your code is public?

7 Comments

My e-Mail :jypsghr@163.com .Thank you very much!
Hey. It was public, but for some reason the person who submitted the code has removed it from mathworks. I have no idea why.
Thank you very much for your reply! I will continue to study Sharpness, Roughness, Fluctuation Strength and Annoyance.
jing jing or Walter Roberson hello! can you give me your code for calculate roughness of an acustic signal please? May I write you an email? Thank you so much. My email is tatianaberkuta@yahoo.it
Hello everybody, who can share the roughness and Fluctuation Strength calculation code? Thank you!
zdedong1993@163.com

Sign in to comment.

Categories

Find more on Measurements and Spatial Audio in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!