Converting raw audio values to absolute pressure
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
