## Scale-Invers mapping with Exponential

Sep 26, 2008 at 1:09pm

# Scale-Invers mapping with Exponential

Hello,

I am controlling Max with a bcf
I use scale with the fifth argument
because you manage in a better way
the volume with a ctlin
but when i send the value back to ctlout
(invers mapping)
my fith argument becomes wrong
could you help me ?
thanks

s.gaxie

– Pasted Max Patch, click to expand. –

#40014
Sep 26, 2008 at 2:08pm

thank you very much
but with your solution
we do not have the same result
on bith sliders…

#141229
Sep 26, 2008 at 5:09pm

Check out the Litter Pack:

http://www.bek.no/~pcastine/Litter/

The starter kit is free and has a better scaling object; lp.scampf. The arguments for the input would be:

lp.scampf map 0 127 -1. 1. pow 1

and for the output

lp.scampf map -1. 1. 127 0 pow -1

Notice the negative exponent on the output. The max scale object never seems to get the exponent thing quite right…or at least it never makes sense to me. I am enjoying some coffee as I type.

Lewis

Quote: s.gaxie wrote on Fri, 26 September 2008 06:09
—————————————————-
>
> Hello,
>
> I am controlling Max with a bcf
> I use scale with the fifth argument
> because you manage in a better way
> the volume with a ctlin
> but when i send the value back to ctlout
> (invers mapping)
> my fith argument becomes wrong
> could you help me ?
> thanks
>
> s.gaxie

#141231
Sep 26, 2008 at 7:53pm

This patch might help give some ideas or clear things up about the scale exponent, and could be useful in other situations too. Using other functions (like sine) to generate value curves can provide interesting data for parameters like volume, frequency, contrast, etc. Plus you can simply draw in the curve you want.

I like scale too, but I’ve also run into some weirdness with the exponent (though that definitely could be in my head). You can see some values in the table that aren’t quite what one might expect…

– Pasted Max Patch, click to expand. –

#141232
Sep 26, 2008 at 10:33pm

thanks both of you
it is late in Paris
and the Litter pack does not want to run for the instance
but it seems to be my solution
thanks seejames for your nice scaling patch
I will probably use it in special effects
but the topic is very interessant
I do not like this systematic way in max to scale values in a linear manner.
but it seems to be a bit heavy
when you have 60 ctlout…
I am sure we could use an other
fifth argument in scale to get
a good invers mapping…

cordialement like we say in french

s.gaxie

#141233
Sep 27, 2008 at 7:44am

s.gaxie schrieb:
> I use scale with the fifth argument
> because you manage in a better way
> the volume with a ctlin
> but when i send the value back to ctlout
> (invers mapping)
> my fith argument becomes wrong
> could you help me ?

I made some research on the fifth parameter of scale. My conclusion was
since then: don’t touch it, its worthless, even the original programmers
don’t know what rule it follows.

Instead, use dbtoa and atodb to create linear to exponential behaviour
for levels, if you want the zero to be at complete silence, use a sel 0
for this special case…

If you deal with pitches, there are mtof and ftom…

And of course Peters Litter package will have some options too…

– Pasted Max Patch, click to expand. –

Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#141234
Sep 27, 2008 at 9:57am

thanks Lewis
the solution with the Litter pack
seems to be the better one
if I send general parameters with
messages I can grab them on the
bcf with ctlout with the same value
in an exponantial mode
you have so more steps in little
values to choice your volume
thanks

s.gaxie

– Pasted Max Patch, click to expand. –

#141235
Sep 27, 2008 at 5:44pm

Quote: s.gaxie wrote on Sat, 27 September 2008 00:33
—————————————————-
> it is late in Paris
> and the Litter pack does not want to run for the instance
—————————————————-

Litter Power will run in Paris any time of day or night.

For that matter, it will run in any time zone at any time of day or night. N’importe ou, n’importe quand, n’importe quoi.

It seems from your follow-up message that you got it running, but if there are questions let me know.