# Audio Volume Question

Discussion and feedback on Construct 2

### » Mon Mar 04, 2013 8:14 am

If 0 dB is system volume, and -10 dB is perceptively half that, I'm assuming -20 dB would be half again, thus it would take negative infinity to actually reach "silent".

I understand perceptible "silence" is actually around 30 dB.

How should I set my scale for a volume slider if I don't know what the system volume is? Ideally I would want to have volume at 0% = 30dB and 100% = system volume dB. (under 0% I would use mute)

If I use flat numbers for a decibel scale, it doesn't take into account the target systems volume. For example, if I set 0% volume to -100 dB and 100% to 0dB and have it scale linearly, the audio might already be silent at 90% volume if the system was outputting sound at 40 dB to begin with.

I found this example in the arcade.
Moving the music slider around the bottom 40% does pretty much nothing (-60 to -100 dB), the sound is already effectively silent at around -60dB. This is more pronounced when the system volume is lower, and probably varies across systems.

The opposite problem occurs when the scale is set too small. If my 0% volume is -40dB, this might still be quite loud if the system volume was really high to begin with.

Is there any way around this or is this a limitation of not knowing the volume of the target system?

For now I'm setting my lowest volume to -60 dB, but I hope there is a better way.
B
40
S
19
G
67
Posts: 1,049
Reputation: 38,502

### » Mon Mar 04, 2013 1:27 pm

0 dB is the volume of the system!

Generally dB is a much more useful unit of measure for volume, since if you try to treat it linearly (like a percentage) then you'll find it barely changes at all at the top of the slider, and changes really quickly at the bottom, due to the logarithmic nature of volume perception.
Scirra Founder
B
362
S
216
G
75
Posts: 23,120
Reputation: 180,504

### » Mon Mar 04, 2013 5:58 pm

I've lost the thread, but the other day @R0j0Hound showed an algorithm to convert the db scale to a linear scale, using log().
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,455

### » Mon Mar 04, 2013 8:15 pm

http://www.scirra.com/forum/sound-volume-only-negative_topic62992.html
B
111
S
37
G
39
Posts: 805
Reputation: 26,552

### » Mon Mar 04, 2013 8:36 pm

Understood! I'd like to stick with dB, for its properties, I just don't know how much to attenuate at the low side. -50 dB, -60 dB, -100dB?
B
40
S
19
G
67
Posts: 1,049
Reputation: 38,502

### » Mon Mar 04, 2013 9:03 pm

@andreyin, thanks! I'll have to bookmark it.

B
90
S
30
G
24
Posts: 3,189
Reputation: 32,455