getTunerVolume values

Hi all,
is there anyone playing with the Tuner volume function ?

I’m noticing that the function returns values between 0.0013 and 0.0018 for a machine without any line-in or microphone installed - must be some kind of “minimum noise level”.

Although when testing on iPhone, values do not get past 0.5 (i.e. < 0.6), without using any conversion, even by yelling into the mike.

By using the log scale conversion (which is 10*math.log10() rather than 10*math.log()), I notice that values do not get past -2.8. Since the conversion should give me decibels, I’m not sure how yelling into the mike or exposing the phone to loud speakers directly could not get past -2.8 decibels.

Any findings or explanation from anyone ? [import]uid: 5750 topic_id: 4034 reply_id: 304034[/import]

maybe it’s limited at -3db

i know when i work in Cubase for instance it’s best to limit all signals to about -6db to prevent distortion. (-3db is ok but -6db gives more headroom)

plus I doubt even by screaming that’s the maximum possible noise ever… try sticking your iphone in front of a lawnmower or jet engine… (but wear ear protectors!)

[import]uid: 6645 topic_id: 4034 reply_id: 12416[/import]

My concern is over the current docs, stating that getTunerVolume returns a value between -1 and +1. While, without any input attached, the simulator doesn’t ever go below 0.
First weird fact.
Secondly, human voice at 3 inches distance is between 40dB and 70dB. If the minimum converted value was -12, (10*log10()) I should have noticed a peak of +20, +30 … or at the very least a positive value.

I’m beginning to wonder whether there should be a recording volume control (sensitivity), which isn’t available right now. (?!) [import]uid: 5750 topic_id: 4034 reply_id: 12436[/import]

doesnt it say getTunerVolume returns the square value where the *input* was between -1 and 1… that’s not the same as what you said.

a square value will never be negative

[text]
Returns:

v
The mean squared value of the samples in the
current audio buffer using sample values scaled
to be in the range [-1…1].
[/text] [import]uid: 6645 topic_id: 4034 reply_id: 12439[/import]

You’re right, I’ve misread that piece in the docs.
Now then, we’ve got a maximum of 1.0 as output value. The log of a number < 1 is always negative.

Which means we can never get values in dB that are > 0 (?!). That doesn’t make much sense.
Unless I’m missing something else of course.

According to this:
http://www.animations.physics.unsw.edu.au/jw/dB.htm

…we should also get a 0 dB reference level, within the scale used by the SDK. (?!) [import]uid: 5750 topic_id: 4034 reply_id: 12443[/import]

dB can be a bit confusing. but over 0dB is in the red (distortion) it doesn’t make sense to distort a recording signal for our purposes


[import]uid: 6645 topic_id: 4034 reply_id: 12444[/import]

That’s not dB… that’s a VU. Different measurement (peak) and different scale.
What really bugs me is that, measuring Volume with the iphone, there isn’t much difference in scale between background noise (PC noise etc.) and yelling in the mike. Delta is always very small - like +1.0 - when sometimes the same peak is reached by some additional background noise.

In the end, it seems like the mike saturates very easily (it’s very sensitive)…and there is no control for recording volume. [import]uid: 5750 topic_id: 4034 reply_id: 12470[/import]

it still shows dB i think doesnt it? … -20 to +3

[import]uid: 6645 topic_id: 4034 reply_id: 12475[/import]

I don’t know, I’m not an “audio” guy. Since I’m trying to measure the original source power (in dB), based on recorded “volume”, I don’t think I can use a VU-meter instrument. :slight_smile:

The scales and “meaning” of the quantities are fundamentally different:

http://en.wikipedia.org/wiki/VU_meter
http://en.wikipedia.org/wiki/Decibel

[import]uid: 5750 topic_id: 4034 reply_id: 12484[/import]

this might help
http://stackoverflow.com/questions/2167513
[import]uid: 6645 topic_id: 4034 reply_id: 12486[/import]

Thanks for the link!
Ok, that gave me a few relevant hints.

  1. I was kinda right in the first place… there’s a need for a reference 0dB value.
  2. It’s 20* rather than 10*… and log10 instead of log, as suspected initially. ANSCA please correct the example! :wink:
  3. The 0dB reference point should most probably be given by the system, but I will try to define a base value that works in my situation. (like “typical low noise base volume”)

Will post results. [import]uid: 5750 topic_id: 4034 reply_id: 12514[/import]

Hi erpy,

May I ask if you had any success for measuring the sound volume?

I did another post in the forum regarding this topic:
http://developer.anscamobile.com/forum/2010/12/27/detect-microphone-volume-blowing-microphone

Thanks,
Thomas [import]uid: 8111 topic_id: 4034 reply_id: 14989[/import]

Hi teichmann,
I resorted to read plain values returned by getTunerVolume, which was enough for my needs.

I think there’s the need for a function that reads “peak volume” for each frame, rather than an average, as it is now.
That way one can easily create its own volume reading function.

As of now it doesn’t look like you can “saturate” the mike by yelling into it, for instance, i.e. you don’t get 1.0 as an “instant peak value” - something you can easily expect to happen instead.

So, generally, I think it’s still not working “nicely”. [import]uid: 5750 topic_id: 4034 reply_id: 14998[/import]