cbodapati
Dec 12 2003, 13:32
hello Iam new to audio programming.
Iam in search of a method, how to measure(in dB) the audio which is recorded through the microphone and display the details of the signal.
best regards
srikanth
hhmmm, just a thought...
could it be possible to measure the perceived volume with wavegain, with just calculate option? you will find wavegain at rarewares.
http://rarewares.hydrogenaudio.org/files/wavegain.zipcheers,
Digga
edit: url
cabbagerat
Dec 13 2003, 13:20
Ok, assuming that with your microphone and 16bit ADC a 0dB sound will output a 0 sample and a 96.3dB sample will output a 0xff sample, then the loudness of any sample is:
log(sample^2) Bels where log is the base 10 logarithm
20*log(sample) is the answer in decibels.
When playing back a digital signal, the highest bit (MSB) will be 20*log(2^(number of bits)) louder than the lowest bit (LSB).
Which is all good and fine if you just want to measure the loudness of a digital signal, but if you want to use your microphone as an instrument to measure the spl, then you will need to calibrate it and the ADC so (a) it has a linear response to volume (which is hard with microphones) and (b) it maps the range you want to measure onto it's full digital range. Not an easy problem.