detect loudness of sound

All your problems with Audio, Video and Images.

detect loudness of sound

Postby sukumori » Thu Apr 15, 2010 10:29 pm

Hello,

i want to detect input from microphone in my application.

I only found tutorials on how to record and save audio from the microphone, but i don't need to save it. I just need to track the loudness of the audio.
Well, the concept is to do different stuffs on the basis of different loudness of the recorded sound.

desperately , Hoping to get some quick and helpful helps. :roll:
Any kind of help is apppreciated,
Thankyou so much:)
sukumori
Freshman
Freshman
 
Posts: 7
Joined: Thu Apr 08, 2010 10:33 pm

Top

Postby BobGardner » Fri Apr 16, 2010 4:31 am

Loudness has to do with power, so you need to do an RMS over the samples in the interval of interest... maybe last 100ms? At 8000 samples per sec or 8 samples per ms, thats about 800 samples. Square them, add em all up, divide by 800 to get the mean, sqrt that to get the rms. The peak to rms ratio is the crest factor. I have found experimentally that the rms rides about 3db above the average for music, so maybe the avg is good enough. Then you decide whether to display it linear or log (log is better, but it looks 'hotter'). Can also plot the peak value in that record, which should ride a couple db above the avg.
BobGardner
Junior Developer
Junior Developer
 
Posts: 11
Joined: Sun Apr 11, 2010 11:34 pm
Location: Orlando

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 18 guests