Copy link to clipboard
Copied
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
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
...Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Snap.
Copy link to clipboard
Copied
Hi -- thanks for speedy responses!
Let me try to clarify:
In my mind, using the term "oracle" is a shorthand for saying I have "recorded an SPL calibration from a known pressure source".
However, my question is not in the mechanics of how this is done (what quality mics are needed etc) but how to apply that calibration to the raw values stored in an audio file. If my calibration tells me that a value of 0.8 in the WAV file is equivalent to 2x10-3Pa, how many Pa is a value -0.3 taken from the same WAV file?
Another way to get at the heart of my question while avoiding the issues of oracles or SPL calibration is as follows:
Suppose I record a flute with a "spot mic" (I sorry, I don't know the official term) in a room with no reflections and I generate a WAV file. Then I used the EXACT same equipment (no adjustment of any gains) and measure an impulse response of a sharp impulse at specific location in a room with echos.
Now I want to simulate what that flute would sound like if played in that room. I have two wav files, i.e. two streams of raw numbers, and ultimately, I know that I will have to perform a convolution, but it seems the full procedure should be:
a) transform the numbers in both WAV files so that now pressure varies linearly with the numeric value
b) convolve the results
c) apply the inverse transform used in step a) and save these numbers into a new WAV file
I'm pretty sure that the convolution in step b) should only be done in a space where pressure varies linearly with the numeric values being used. What is not clear is what transform should be used in step a): f(x) = x or f(x) = sgn(x)*exp(abs(x)) or f(x) = sgn(x)*x^2, etc
If all of this is still too obtuse and not clear, then another way of getting at the same issue is: assume that I do have the proper calibration equipment -- what are the mechanics (i.e. step a), step b), etc) of actually using it e.g. in away in which I can demonstrate in a court of law that my neighbor is generating noise at certain dbSpl -- assuming the only software I have available is Audition (and not some magic sound meter software that takes care of all the gory details for me)
Thanks again!
Copy link to clipboard
Copied
Working in Pascals for audio is a royal pain, and we don't do it. And Audition (for reasons that we've already alluded to) doesn't have any provision for applying a calibration value to a recorded waveform. You need to convert your Pascal value to something we recognise, and is logarithmically scale-able against a reference - and that would be dBs. The conversion is relatively straightforward - see here, for instance: https://blogs.msdn.microsoft.com/matthew_van_eerde/2014/01/14/why-is-1-pascal-equal-to-94-db-sound-p...
But:
If all of this is still too obtuse and not clear, then another way of getting at the same issue is: assume that I do have the proper calibration equipment -- what are the mechanics (i.e. step a), step b), etc) of actually using it e.g. in away in which I can demonstrate in a court of law that my neighbor is generating noise at certain dbSpl -- assuming the only software I have available is Audition (and not some magic sound meter software that takes care of all the gory details for me)
You have to take so much more into consideration than just a measurement, that unless you can demonstrate that you're professionally qualified, I don't think that any court would listen to you, I'm afraid. You have to take into account a large number of other factors, and do multiple measurements - and these aren't straightforward dB measurements either - you need weighted Leq values (exposure over time), plus a log of the ambient weather and other conditions. And even with a calibrated recording, you need to determine and record a lot more information about your facade measurements, and apply the appropriate compensation values, which are inevitably location-dependent.
If you think I'm trying to put you off, you're dead right. I'm qualified to do this stuff, and as an expert witness, but even I hate doing it, because it's almost always contested. It's perfectly possible for somebody else to come along and make another set of measurements that will contradict yours completely - and they do. And it's expensive; just keeping your calibration system referenced to a national standard (the court would require this, incidentally) costs a lot to do. None of this is anything you should undertake lightly.
Copy link to clipboard
Copied
Hi, trying again... Are the values in a WAV file linearly proportional to the excess pressure at the microphone? (The microsoft link does not answer this question)
If so, then given the impulse response of a room e.g. Freesound - "Bourscheid Palacelarge.wav" by NoiseCollector
and a spot recording of a piano: Freesound - "69 - A4.aif" by beskhu​, I can convolve the raw numbers in these two files together to get an idea of how the piano would sound in the palace. If the numbers are not proportional to pressure, then I need to make an adjustment before doing the convolution.
thanks
Copy link to clipboard
Copied
nehalp15309342 wrote
Hi, trying again... Are the values in a WAV file linearly proportional to the excess pressure at the microphone? (The microsoft link does not answer this question)
No they aren't, and yes it does - it has the word 'log' all over it - isn't that just a bit of a clue?
Copy link to clipboard
Copied
I love it when he (SteveG) talks like that 😉
Copy link to clipboard
Copied
If you've really got a problem with noisy neighbours, in most civilised countries it's the local authorities who have the responsibility for dealing with the issue. So how do you convince them to? Strangely, one of the easiest ways is not to try and measure anything, as such - just set up a portable recorder in the middle of the room with the interference going on, get a couple of feet away from it and record yourself having a conversation with the interference in the background, and play it to them. Generally they'll take it from there...
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now