### gain~&linedrive~ equation

Hi all,

does anybody know what exactly is the equation used in the linedrive~ and gain~ objects? (See the reference manual) I think it is not clearly stated.

Is it y = b*e – a*log(c)*e*x*log(c)

or y = b*exp{-a*log(c)}*e{x*log(c)}

or what?

I want to know what exactly is the output of my gain~ object is, so I need to know this detail.

Thank you,

FunnyZen

On 30 Sep 2007, at 18:28, FunnyZen wrote:

>

> Hi all,

>

> does anybody know what exactly is the equation used in the

> linedrive~ and gain~ objects? I think it is not clearly stated.

>

> Is it y = b*e – a*log(c)*e*x*log(c)

>

> or y = b*exp{-a*log(c)}*e{x*log(c)}

>

> or what?

i would say the latter is the right direction. i believe it’s quite

clearly stated in the reference manual.

vb

#P window setfont "Sans Serif" 9.;

#P flonum 196 206 65 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P flonum 70 206 65 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P window linecount 1;

#P newex 196 179 260 196617 expr 1. * exp(-127.*log(1.06)) * exp

($f1*log(1.06));

#P number 70 133 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;

#P user hslider 70 108 18 128 128 1 0 0;

#P newex 70 181 120 196617 linedrive 127 1. 1.06 30;

#B color 5;

#P connect 1 0 2 0;

#P connect 2 0 0 0;

#P connect 0 0 4 0;

#P connect 2 0 3 0;

#P connect 3 0 5 0;

#P window clipboard copycount 6;

I think you’re right. But where did you get this line

#P newex 196 179 260 196617 expr 1. * exp(-127.*log(1.06)) * exp

($f1*log(1.06));

Here yes, it is clearly stated. But in the msp reference manual the given equation is

y = b e-a log c ex log c

which is certainly a wrong way to give an equation and certainly not clear, it could match to many different equations. Perfectly clear is something like this

y = b * exp{-a*log(c)} * exp{x*log(c)}

Anyway thanks for your help,

Dimitris

On 05 Oct 2007, at 19:38, FunnyZen wrote:

>

> I think you’re right. But where did you get this line

>

> #P newex 196 179 260 196617 expr 1. * exp(-127.*log(1.06)) * exp

> ($f1*log(1.06));

>

> Here yes, it is clearly stated. But in the msp reference manual the

> given equation is

>

> y = b e-a log c ex log c

you are right. in the msp reference of [gain~] the math font got lost

somehow.

it’s correct in the Max reference of [linedrive], and that’s where i

got it from.

vb

Forums > MaxMSP