Page 1 of 3

Why use db for unit of audio volume?

PostPosted: Sun Mar 09, 2014 3:23 pm
by rexrainbow
I have a small question, why use db for unit of audio volume? instead of a linear number.

Re: Why use db for unit of audio volume?

PostPosted: Sun Mar 09, 2014 5:57 pm
by 7Soul
Agree'd
It's very hard making sound controls when you're dealing with db.
(hard as in; I don't know how)

Re: Why use db for unit of audio volume?

PostPosted: Sun Mar 09, 2014 6:01 pm
by sqiddster
It's not too hard to make a function to convert back and forth from db and a scale system (e.g. 0-100).

Scale = 100 * 10 ^ (dB / 33.2)
dB = -log10(100 / Scale) * 33.2

Re: Why use db for unit of audio volume?

PostPosted: Sun Mar 09, 2014 7:47 pm
by 7Soul
sqiddster wrote:It's not too hard to make a function to convert back and forth from db and a scale system (e.g. 0-100).

Scale = 100 * 10 ^ (dB / 33.2)
dB = -log10(100 / Scale) * 33.2


"Not too hard"
But hey, it works!

Re: Why use db for unit of audio volume?

PostPosted: Sun Mar 09, 2014 7:58 pm
by Juryiel
rexrainbow wrote:I have a small question, why use db for unit of audio volume? instead of a linear number.


It makes sense for some applications when dealing with signals that can take values over very large ranges, but for applications intended for PC or phone speakers I agree, it's not very useful.

Re: Why use db for unit of audio volume?

PostPosted: Sun Mar 09, 2014 8:21 pm
by sqiddster
@7Soul well it's not too hard once you know the formulas. I copied them off someone else in another thread :D

Re: Why use db for unit of audio volume?

PostPosted: Sun Mar 09, 2014 10:54 pm
by Aphrodite
sqiddster wrote:@7Soul well it's not too hard once you know the formulas. I copied them off someone else in another thread :D


I might add:
dB = -log10(100 / Scale) * 33.2 = log10(Scale/100)*33.2 I prefer the second one since you see directly that scale and dB have their increase and decrease related

also You forgot one thing.. 0, you have to take care of the 0%, since I think it is possible that C2 does a math error (log(0) does not exist)

EDIT: from where does that 33.2 comes from, I've always wondered?

Re: Why use db for unit of audio volume?

PostPosted: Sun Mar 09, 2014 11:44 pm
by rexrainbow
I had checked the audio plugin, it used linear number inside. So it might have some reasons that @Ashley decided to use db instead of linear number at the interface of audio plugin.

Re: Why use db for unit of audio volume?

PostPosted: Mon Mar 10, 2014 6:22 am
by jayderyu
because DB are tought in audio engineering school. Often because of the non linear interpolation and the common measurement use world wide.

this is much akin to why did ashley set the colouring system using 1-100 and not the 1-255 that's common around the internet. Ashley sure got a lot of flak for that decision. At least DB is the common system used by all tools.

Re: Why use db for unit of audio volume?

PostPosted: Mon Mar 10, 2014 6:40 am
by rexrainbow
@jayderyu

Not really all tools, the audio plugin will transfer db to linear number for internal function call.
And the players did not know the db, they might want to set the volume to 0.5 (linear number) directly.
So designer need to transfer the linear number to db at event sheet, then the audio plugin transfer db to linear number back.