Scale-Invers mapping with Exponential

s.gaxie's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

Gregory Taylor's icon

If I were going to do some scaling and
wanted to invert the outputs (high to low),
I'd use the zmap object.

Max Patch
Copy patch and select New From Clipboard in Max.

s.gaxie's icon

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

Gregory Taylor's icon

That's because I looked at this before my
morning coffee. Sorry.

Lewis Keller's icon

Check out the Litter Pack:

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

seejayjames's icon

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...

Max Patch
Copy patch and select New From Clipboard in Max.

s.gaxie's icon

thanks both of you
fot those answers
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

Stefan Tiedje's icon

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...

Max Patch
Copy patch and select New From Clipboard in Max.

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

s.gaxie's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

Peter Castine's icon

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.

I'm glad you've found lp.scampf helpful.

Best -- Peter