Wave files; Input signal in Pascals?
Show older comments
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
More Answers (1)
jing jing
on 22 Jul 2020
0 votes
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
jing jing
on 22 Jul 2020
My e-Mail :jypsghr@163.com .Thank you very much!
Punto
on 22 Jul 2020
Walter Roberson
on 22 Jul 2020
jing jing
on 23 Jul 2020
Thank you very much for your reply! I will continue to study Sharpness, Roughness, Fluctuation Strength and Annoyance.
Tatiana Berkuta
on 25 Oct 2020
Edited: Tatiana Berkuta
on 25 Oct 2020
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
dedong zhang
on 16 Dec 2020
Hello everybody, who can share the roughness and Fluctuation Strength calculation code? Thank you!
zdedong1993@163.com
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!