Is there any program that will help me compute the LAFmax and LAeq of a wave file?
|
|
0
|
|
|
|
Reply
|
Krithika
|
5/4/2010 8:04:04 PM |
|
"Krithika " <venkatkv@ymail.com> wrote in message <hrpujk$kj$1@fred.mathworks.com>...
> Is there any program that will help me compute the LAFmax and LAeq of a wave file?
Hi, You can do that but you would need to know a few things in order to relate the output of the microphone to sound pressure. For example,
1.) you would need to know your microphone's sensitivity. Contact the manufacturer if that information is not readily available in your literature. You should get some value in terms of millivolt output per Pascal. Obviously any amplification you might be doing would also be important.
2.) You'll also need to know the information about your A/D converter. How many bits and what the voltage range is.
Finally,
3.) I think you will need to read the .wav file using the 'native' option, otherwise you'll likely import it into MATLAB normalized between [-1,1] and you won't be able to relate those values to sound level.
Wayne
|
|
0
|
|
|
|
Reply
|
Wayne
|
5/4/2010 11:01:06 PM
|
|
Wayne King wrote:
> "Krithika " <venkatkv@ymail.com> wrote in message
> <hrpujk$kj$1@fred.mathworks.com>...
>> Is there any program that will help me compute the LAFmax and LAeq of
>> a wave file?
>
> Hi, You can do that but you would need to know a few things in order to
> relate the output of the microphone to sound pressure. For example,
> 1.) you would need to know your microphone's sensitivity. Contact the
> manufacturer if that information is not readily available in your
> literature. You should get some value in terms of millivolt output per
> Pascal. Obviously any amplification you might be doing would also be
> important.
> 2.) You'll also need to know the information about your A/D converter.
> How many bits and what the voltage range is.
> Finally,
> 3.) I think you will need to read the .wav file using the 'native'
> option, otherwise you'll likely import it into MATLAB normalized between
> [-1,1] and you won't be able to relate those values to sound level.
'native' would not be needed if you knew the conversion from the integral
values to normalized values. Unfortunately, I've never managed to figure that
out. Every other representation is equivalent to a semi-open interval,
trivially convertible to [0,1) and then * 2 - 1 to convert it to the semi-open
interval [-1, 1) . The 32 bit float representation, though, and the default
output of wavread() if 'native' is not used, are *closed* intervals, [-1,1]
and I cannot figure out which value is being mapped to become _exactly_ +1 .
Suppose the wav file happens to be uint8; that is the discretized mapping of
[0,256) -- uint8(0) covers the whole semi-open interval [0,1), uint8(1) covers
the whole semi-open interval [1, 2), and so on up to uint8(255) logically
covering the whole semi-open interval [255,256) . If you convert these values
into [-1,1] by using (double(X)/255. * 2.0 - 1.0) then you have not allocated
equal virtual interval space in [-1,1] to the values that started out "255 or
more but less than 256". And, of course, you miss out on the exact conversions
of data that can be used if you transform uint8 values as logical fractions of
256: N/256 is exactly representable in floating point for all integral N from
0 to 255, but N/255 is exactly representable in floating point for that range
only for the values 0 and 255. Converting an integral data type representation
into a *closed interval* [-1,1] is meshuga!
And *that's* why you need 'native' on the wavread(), because the conversion to
[-1,1] has got to be wrong! If it converted to [-1,1) then it would be very
easy to map the [-1,1) values into specific voltages given the A/D specifications.
|
|
0
|
|
|
|
Reply
|
Walter
|
5/5/2010 1:06:37 AM
|
|
I think I should explain my test set up better so that you can assist me with this.
My speaker is playing a 1kHz monotone at 94 dB SPL. The Device under test is a microphone. (I do not know the manufacturer so I cannot figure out the sensitivity). So to get the baseline measurements, I record the 94dB SPL tone to use for reference. I need to figure out the LAFmax and LAeq for the next set of recordings I take (with the speaker at different volume settings, ranging from 85 - 0 dB spl).
I already know the MATLAB program to apply A-weighting on the sound file. I have a basic understanding that LF is fast time weighting ( 125 ms). But I do not know how to apply them.
Does anybody have a good suggestion?
Walter Roberson <roberson@hushmail.com> wrote in message <hrqgb5$8ko$1@canopus.cc.umanitoba.ca>...
> Wayne King wrote:
> > "Krithika " <venkatkv@ymail.com> wrote in message
> > <hrpujk$kj$1@fred.mathworks.com>...
> >> Is there any program that will help me compute the LAFmax and LAeq of
> >> a wave file?
> >
> > Hi, You can do that but you would need to know a few things in order to
> > relate the output of the microphone to sound pressure. For example,
> > 1.) you would need to know your microphone's sensitivity. Contact the
> > manufacturer if that information is not readily available in your
> > literature. You should get some value in terms of millivolt output per
> > Pascal. Obviously any amplification you might be doing would also be
> > important.
> > 2.) You'll also need to know the information about your A/D converter.
> > How many bits and what the voltage range is.
> > Finally,
> > 3.) I think you will need to read the .wav file using the 'native'
> > option, otherwise you'll likely import it into MATLAB normalized between
> > [-1,1] and you won't be able to relate those values to sound level.
>
> 'native' would not be needed if you knew the conversion from the integral
> values to normalized values. Unfortunately, I've never managed to figure that
> out. Every other representation is equivalent to a semi-open interval,
> trivially convertible to [0,1) and then * 2 - 1 to convert it to the semi-open
> interval [-1, 1) . The 32 bit float representation, though, and the default
> output of wavread() if 'native' is not used, are *closed* intervals, [-1,1]
> and I cannot figure out which value is being mapped to become _exactly_ +1 .
>
> Suppose the wav file happens to be uint8; that is the discretized mapping of
> [0,256) -- uint8(0) covers the whole semi-open interval [0,1), uint8(1) covers
> the whole semi-open interval [1, 2), and so on up to uint8(255) logically
> covering the whole semi-open interval [255,256) . If you convert these values
> into [-1,1] by using (double(X)/255. * 2.0 - 1.0) then you have not allocated
> equal virtual interval space in [-1,1] to the values that started out "255 or
> more but less than 256". And, of course, you miss out on the exact conversions
> of data that can be used if you transform uint8 values as logical fractions of
> 256: N/256 is exactly representable in floating point for all integral N from
> 0 to 255, but N/255 is exactly representable in floating point for that range
> only for the values 0 and 255. Converting an integral data type representation
> into a *closed interval* [-1,1] is meshuga!
>
> And *that's* why you need 'native' on the wavread(), because the conversion to
> [-1,1] has got to be wrong! If it converted to [-1,1) then it would be very
> easy to map the [-1,1) values into specific voltages given the A/D specifications.
|
|
0
|
|
|
|
Reply
|
Krithika
|
5/5/2010 6:50:19 PM
|
|
Krithika wrote:
> I think I should explain my test set up better so that you can assist me
> with this.
>
> My speaker is playing a 1kHz monotone at 94 dB SPL. The Device under
> test is a microphone. (I do not know the manufacturer so I cannot figure
> out the sensitivity). So to get the baseline measurements, I record the
> 94dB SPL tone to use for reference.
Yikes! Isn't that like using a microphone to record a jet engine?? What
kind of speakers and amp do you have that can play that loudly without
distortion? And how did you calibrate them?
|
|
0
|
|
|
|
Reply
|
Walter
|
5/6/2010 11:48:31 PM
|
|
|
4 Replies
372 Views
(page loaded in 1.094 seconds)
Similiar Articles:7/17/2012 8:59:18 AM
|