Skip to main content
Participant
June 1, 2018
Answered

Converting raw audio values to absolute pressure

  • June 1, 2018
  • 3 replies
  • 3303 views

Hello,

I've never understood how to convert the raw audio values found in a WAV file to absolute pressure values, and also how to interpret the waveforms

displayed in Audition in concrete physical terms (i.e. in units of Pascals)

For instance, assume I have WAV file, and I parse it to determine which format the data is stored in, and also extract the raw numerical data for one channel, with no conversion from the natural representation used by the format (i.e. ints stay as ints, floats are floats, etc).  Now assume that some "oracle" tells me that a numeric value of x (e.g. x= 0.8) in the file represents an excess pressure (over ambient air pressure) of 2x10-3 Pa at my ear drum.

Question:  Given this calibration point, what formula do I use to then calculate the sound pressure (in Pa) associated with a numeric value of y (e.g. y = -0.3)?

(I understand that this could depend on the format that the data is stored in -- so, what are the formats that are commonly used, and how would it work for each format)

Now in audition:

Suppose I start Audition with factory default settings and view an audio waveform.  Ignoring any markings on the y-axis, I see that the waveform is centered around the  y=500 pixel of my monitor (i.e. the pressure at pixel y=500 is 0 Pa.  Again, an oracle helps me out, and tells me the at pixel 900, the pressure is 2x10-3 Pa, now how do I calculate the pressure at any other y value?

(What I am trying to understand with this variant is if there is some natural transform that is applied to audio data for the purposes of clarifying visual presentation, I guess somewhat similar to the notion of applying  gamma value when displaying video.)

I guess the final question is something more vague: which is what is the "natural scale" (absolute  pressure varies linearly with numeric values or  pressure varies logarithmically, etc)  in which to be doing audio processing...? i.e suppose I am trying to design a discrete filter meant to model the acoustics of a room derived from measuring the impulse response of the room as WAV file -- the filter will work by convolving this impulse with the sound it is transforming -- but shouldn't this convolution be done in a space where absolute pressure varies linearly with all numeric values? But is this what is actually done in practice? 

Hope these questions are not too simplistic, or unclear....

thanks!

cheers, nehal

This topic has been closed for replies.
Correct answer SteveG_AudioMasters_

I'm afraid that you simply can't do this at all unless you have recorded an SPL calibration from a known pressure source applied directly to the microphone when you made the recording. That is the only way you can achieve this. And it has to be made at the same time you make the recording, and no alterations at all to the input gain are allowable.

This is why SPL meters tend to come with very expensive mics, guaranteed to be flat within specified limits, and you can only use them for any absolute measurements after you've calibrated the entire chain. There is no relationship at all between absolute values of sound pressure (or intensity), and any waveform recorded in Audition or any other software.

3 replies

Participant
February 22, 2023

Im sorry.  We calibrate a speaker to X dBSPL noise or step response, say 200mPascals.  When I save a wave file, in sound check, I have the option to save relative to 1, or peak (200mPascal) or anything I want.  Assume I say 1.The sound comes into the mems mic in my device, it does to the DSP chain then spits out .wave file. Assume I have an amplifier in the DSP chain and my output is now 0.8.  My peak is 1, thus I would interpret this to be 800mPascals, becuase its relative to my peak.  If I chose my reference to be the PEAK of my input, 200mPa, then my signal output would CLIP and THEN i would have no idea what my pacals are.  If I say my reference is 50 Pascals then my 200mn relative to 50 pascals would look like 200mP/500 on a -1 to 1 scale,  at the wav file, my output is now 800mPa/50 Pas on the same scale, but knowing that 1=50Pascals I can trace my pressure back, BECAUSE I told SOUNDCHECK that my peak value will be 50Pascal and to make that my 1 and everything else is relative.....HOW do I do this in Audition? 

SteveG_AudioMasters_
Community Expert
Community Expert
February 22, 2023

All the answers are already in this thread. Basically, you can't do it because Audition doesn't allow you to store reference values. Fundamentally, Audition is an audio editor, not an absolute measurement tool, and you should not attempt to use it as such.

SteveG_AudioMasters_
Community Expert
SteveG_AudioMasters_Community ExpertCorrect answer
Community Expert
June 1, 2018

I'm afraid that you simply can't do this at all unless you have recorded an SPL calibration from a known pressure source applied directly to the microphone when you made the recording. That is the only way you can achieve this. And it has to be made at the same time you make the recording, and no alterations at all to the input gain are allowable.

This is why SPL meters tend to come with very expensive mics, guaranteed to be flat within specified limits, and you can only use them for any absolute measurements after you've calibrated the entire chain. There is no relationship at all between absolute values of sound pressure (or intensity), and any waveform recorded in Audition or any other software.

ryclark
Participating Frequently
June 1, 2018

Snap.

ryclark
Participating Frequently
June 1, 2018

Steve G will be the best person to fully answer this question. However I must point out that there is absolutely no direct relationship between the sample level in an audio file and sound pressure level in air except that the higher the audio signal the higher the pressure was at recording and on playback. That is why audio is usually measured in dB of one sort or another, which are logarithmic, but have to be specified as whether they are referred to voltage levels (dBu, dBv), sound pressure levels dBSPL, absolute digital level (dBFS)  etc.

And then that all depends on the transducers needed to convert SPL into electrical signals ie. microphone and all sorts of other factors like gain applied to the electrical signal after the sound has entered the microphone. And then, of course, going the other way the SPL will depend on the sensitivity of the transducer (loudspeaker) and the audio signal feeding it via an amplifier. Unless I have misunderstood your question.