The scale object

Nov 18, 2008 at 4:33pm

The scale object

Hi all, I’m (very) new to the world of Max, and have been going through the tutorials slowly but surely. Mildly embarassed at having to ask this as it seems like it should be so straight forward, but what exactly does the scale object do?
I’ve just encountered it in tutorial no.11 (and 12), and try as I might I can’t get what exactly is does. So if anyone could explain it’s function to me in the simplest possible language I’d appreciate it!

Thanks,

Rich

#40909
Nov 18, 2008 at 4:55pm

scale is an object that, in my mind, represents the core of max’s
importance as a remapping tool.

scale, and zmap, work this way: you have an incoming range of
numbers, from a low to a high- like 0. to 1. those are the first two
arguments and are superseded by the second and third inputs. the
numbers are mapped- or scaled- or stretched- to an outgoing range,
like, say -5. to 5. those are the third and fourth arguments, and are
superseded by the fourth and fifth inputs. so, if a .5 comes in, it
is scaled to the middle of the outgoing range- 0.

does that help?

(there’s a fifth argument and sixth inlet to scale, which can and
should be safely ignored by everyone who started patching after 1995.)

On Nov 18, 2008, at 11:33 AM, keyworth wrote:

>
> Hi all, I’m (very) new to the world of Max, and have been going
> through the tutorials slowly but surely. Mildly embarassed at having
> to ask this as it seems like it should be so straight forward, but
> what exactly does the scale object do?
> I’ve just encountered it in tutorial no.11 (and 12), and try as I
> might I can’t get what exactly is does. So if anyone could explain
> it’s function to me in the simplest possible language I’d appreciate
> it!
>
> Thanks,
>
> Rich

#145186
Nov 18, 2008 at 4:58pm

The first two arguments set the range of the input, the next two set the range of the output. So if you had [scale 0. 2. 0 127] it would scale the floats from 0 to 2 to the integers 0 to 127. If you send 0.5 to the inlet you’d get “31″ at the output (a quarter of the way between 0 and 127. These arguments can be set using the second to fifth inlets too. I’d advise you to steer clear of the fifth argument (sixth inlet) which sets the scaling from linear to exponential, there are much better ways to do exponential scaling, like using the [expr] object.

lh

#145187
Nov 18, 2008 at 5:01pm

well f.i. [scale 0 127 0. 1.] would scale input int values to a range of 0-127 and output a float between 0.-1. respectively, just liek tutorial explains.
[scale 0 8000 8000 0] would convert 0 to 8000, 100 to 7900 etc.

more clear now? very handy object…

jrp

#145188
Nov 18, 2008 at 5:13pm

Be careful, scale and zmap are different when the incoming data
reaches the limits.
– ‘scale’ continues the ratio outside the limits.
– ‘zmap’ stops at the limits; it limits.

The fifth argument of scale is useful for non linear interpolation
but it is hard to control. I use it but you’d better use expr or
table or what so ever.

#145189
Nov 18, 2008 at 5:27pm

A lightbulb just appeared above my head…thanks a lot guys!

#145190
Nov 18, 2008 at 6:50pm

Another difference between scale and zmap is that scale can also
invert the input/output direction: scale 0 127 127 0 will inverse the
values for instance.

As you said that you were new to Max , more importanly than knowing
every details about object is to know how to find the answers IMHO.
The forum is one, but if you look at the Help menu after selecting the
scale object, you will see something like open scale help file and
reference. This is definitely 2 places to look for.

Happy patching.
ej

On 18 nov. 08, at 17:27, keyworth
wrote:

>
> A lightbulb just appeared above my head…thanks a lot guys!

#145191
Nov 19, 2008 at 1:40am

WHAT!?!?! theres a whole object for that?

damn… and this whole time ive just been doing the math with an expr…

i dont even want to think of how many other objects i could be using to save time/space… back to the tutorials for me

#145192
Nov 19, 2008 at 12:48pm

Chris schrieb:
> i dont even want to think of how many other objects i could be using
> to save time/space… back to the tutorials for me — innovate
> instead of demonstrate

After almost 20 years of maxin’ I still come across standard objects I
either forgot about or never heard of.
One way to learn is also to browse help files. You start with a random
one, then go to the see also section and look what’s coming up there
which might be interesting.

You can patch this advice of course as well, save as “Oblique Help”

– Pasted Max Patch, click to expand. –


Les Ondes Memorielles—-x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()———-TJ Shredder

#145193
Nov 19, 2008 at 9:03pm

Quote: joshua goldberg wrote on Tue, 18 November 2008 17:55
—————————————————-

> (there’s a fifth argument and sixth inlet to scale, which can and
> should be safely ignored by everyone who started patching after 1995.)

—————————————————-

Are you saying they should be ignored because lp.scampi & lp.scampf implement non-linear scaling… somehow…

…better?…

than scale?-)

But then the cutoff year would be 2001 (when Litter Power was first released).

I don’t want to put words in your mouth, and I don’t want to come over as saying that one object is ‘better’ than another. But the non-linear scaling functions in lp.scampi are extremely useful, work as advertised, and the .maxhelp file makes the functionality clear.-

Lp.scampi and lp.scampf are part of the Litter Starter Pack (currently Max 4 only) as well as being in the Litter Pro Bundle (Max 5, Max 4, and probably Max 3…)

#145194

You must be logged in to reply to this topic.