## ratios for gain between decibels and absolute values

Feb 21, 2006 at 5:34pm

# ratios for gain between decibels and absolute values

I have a value (it’s an audio signal) between 0 and 1 that I can multiply a signal in decibels by to get the amplitude I want.

I want to use this number to change the ampitude of a signal however that signal is an absolute value. Is there a way I can do a calculation on the ratio signalso that I can multiply it with a signal using absolute values and get the correct reduction in audio? I want to keep all signals as audio signals too.

Does that make sense? Possibly not.

Cheers.

#24539
Feb 21, 2006 at 8:50pm

Alistair wrote:
> I have a value (it’s an audio signal) between 0 and 1 that I can
> multiply a signal in decibels by to get the amplitude I want.
>
> I want to use this number to change the ampitude of a signal however
> that signal is an absolute value. Is there a way I can do a
> calculation on the ratio signalso that I can multiply it with a
> signal using absolute values and get the correct reduction in audio?
> I want to keep all signals as audio signals too.
>
> Does that make sense? Possibly not.

dbtoa~ or atodb~?

[][] [][][] [][] [][][]
[][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—-
–_____———–|———–
–(_|_ —-|—–|—–()—-
– _|_)—-|—–()———–
———-()————x—–

14, Av. Pr. Franklin Roosevelt,
94320 Thiais, France
Phone at CCMIX +33-1-49 77 51 72

#71106
Feb 21, 2006 at 9:03pm

No, doesn’t seem to work.

How about this, if I have the gain reduction in dB how can I effect an absolute value with the correct gain reduction?

#71107
Feb 21, 2006 at 10:38pm

Quote: Al wrote on Tue, 21 February 2006 13:03
—————————————————-
> No, doesn’t seem to work.
>
> How about this, if I have the gain reduction in dB how can I effect an absolute value with the correct gain reduction?
—————————————————-

What do you mean “doesn’t seem to work”? It works the way I expect it to. If I want to go from 0db to -6db, I would change my amplitude from 1.0 to 0.5. And that’s what dbtoa (and dbtoa~) do for me.

Still not convinced? See:

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

http://www.muzique.com/schem/decibel.htm

mzed

#71108
Feb 21, 2006 at 10:45pm

I don’t understand why it woulden’t work ? it’s no matter if the signal is absolute value or not, in multiplication ?

is this what u ment ?

#P user scope~ 35 51 165 181 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0;
#P user scope~ 35 321 165 451 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 194 192 27 196617 *~;
#P newex 194 26 49 196617 cycle~ 1;
#P newex 194 137 31 196617 abs~;
#P user scope~ 35 186 165 316 256 3 128 -1. 1. 0 0. 0 0. 102 255 51 135 135 135 0;
#P number 262 119 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 262 143 38 196617 sig~ 0;
#P newex 262 174 40 196617 dbtoa~;
#P comment 262 103 26 196617 dB;
#P fasten 6 0 9 0 199 45 40 45;
#P connect 6 0 5 0;
#P fasten 5 0 4 0 199 182 40 182;
#P connect 5 0 7 0;
#P fasten 7 0 8 0 199 318 40 318;
#P connect 1 0 7 1;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P window clipboard copycount 10;

#71109
Feb 21, 2006 at 10:52pm

No, I’m trying to apply that reduction in gain to another signal which is an absolute value. I need to know how the ratios would work in relation to each other. For instance I have a number between 0 and 1 that I can multiply the dB by to create a new amplitude, what calculation would I need to do to correct that ratio to work with an absolute signal?

It’s quite possible that I’m missing something obvious or I’m doing something totally wrong but it seems to me there should be some logical relationship between the two ratios.

#71110
Feb 21, 2006 at 10:57pm

Hold on, I think I may have missed something. Just trying soemthing out.

#71111
Feb 22, 2006 at 12:28am

I’ve cracked it, sorry for talking nonsense there.

#71112
Feb 22, 2006 at 2:00pm

Hi,

I’m not fully sure of what you are aiming at, but if you want to use
the loudness of one signal to control loudness of another signal, you
could check out tl.balance~ from tl.objects: