Understanding Audioread, 'native' and converting to pascal

Hello! I have struggled for a while with this problem and hopes that someone here can push me in the right direction!
I have a wavefile constisting of a recorded calibration signal, the signal is a recorded tone with a sound pressure level of 93.9 dB (~0.99 pascal) at 1000 Hz. The equipment I used to record the file "calibration.wav" has a sensitivity of around 43.9 mV/pascal.
When I use the command
[data, fs] = audioread('calibration.wav');
I get a vector - "data" - with the size 304000x1. Which spans from around -0.43 to +0.43.
This should somehow represent the amplitude of the signal in the time domain - E.g. the output from the microphone relative to the maximum value for the microphone, which in this case is 93.9 dB relative to 102.2 dB. (I could also use 'native' to define "data", but does it matter?)
What I am wondering is, if it is possible to get my known value of ~0.99 pascal (or 93.9 dB) confirmed using the audioread vectors labeled "data" and "fs". I will use this when evaluating other, not known recordings.
How should I approach this problem? Please feel free to ask if there is something unclear.
Best regards
// Hannes

Answers (1)

I would suggest using the 'native' option in your situation: that should get you the values exactly as they were stored rather than normalized to -1 to +1.
If the readings you get are then in mV, multiply them by the 43.9 to get pascal.

4 Comments

Thank you for your help! For 'native' I get a data type of "int16" and a total data range of -32768 <= Y <= 32767. The numbers seems to be the same as when I don't use 'native' - only with another scale.
However, I found one way that worked. But I'm unsure if it's the correct way to go. Since I know my maximum value that can be registred by the microphone (102.2 dB), I can convert this value to pascal (which is on a linear scale) and set this maximum value to equal the 1 for the microphone output in Matlab.
E.g. I multiply my vector 'data' so that it's maximum output value (which in matlab is 1) will be equal to the microphones known maximum output value in pascal (~2.5 pa). Since both scales are linear the amplitudes registred by the microphone will now have the correct value in pascal.
Is this a plausible option, or is there some errors that I haven't thought of? The microphone is of high end and has a flat frequency response.
If the values range from -1 to +1 then what would the negative values represent if +1 means 2.5 pa ? You could get into negative dB I suppose, but that would seem likely to waste a lot of negative range due the difficulty of measuring quiet: the world record is -9.4 dBA background.
It is only the amplitude that is "negative", e.g. the distance from the median to the minimum value, when I do an FFT of the amplitude time signal 'data' to transfer it to the frequency domain (and also calculate SPL) the signal will be correct if I amplify the amplitude signal with a factor of 2.5.
Hopefully that is correct
That doesn't sound right. fft() coefficients can be negative as well, and energy can be encoded in the phase. Perhaps once you take abs() of the fft() ??

Sign in to comment.

Categories

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

Asked:

on 30 Jan 2014

Commented:

on 31 Jan 2014

Community Treasure Hunt

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

Start Hunting!