Forums > MaxMSP

### ratios for gain between decibels and absolute values

Feb 21 2006 | 5:34 pm

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.

Feb 21 2006 | 8:50 pm

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

Feb 21 2006 | 9:03 pm

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?

Feb 21 2006 | 10:38 pm

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

Feb 21 2006 | 10:45 pm

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;

Feb 21 2006 | 10:52 pm

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.

Feb 21 2006 | 10:57 pm

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

Feb 22 2006 | 12:28 am

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

Feb 22 2006 | 2:00 pm

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:

Best,
Trond

Viewing 9 posts - 1 through 9 (of 9 total)

Forums > MaxMSP