Forums > MaxMSP

How to use intervals of values and their references

Feb 04 2012 | 6:14 pm

Hi guys,

I have some values that always refer to other values like in the following example:

277.2 refers to -40
263.6 refers to -39
0.0619 refers to 200

My intention is to also use the interval values (e.g. the values from 277.2 to 263.6 that would refer to values from -40 to -39).

Unfortunately there are about 240 values that refer to other 240 values and they don’t follow a specific path so I can use an object like [scale].

Any ideas?

Thank you so much,

Feb 04 2012 | 7:09 pm

[function] is quite good at that; you can give it a whole stack of numbers, and then interpolate through them. I have never seen a "max number of indices" mentioned in the documentation, though?

Feb 04 2012 | 7:37 pm

Hey, thank you, Wetterberg. Nice object but I don’t think it helps with my problem.

What I would need is a [scale] object that would work in between each value.

Feb 05 2012 | 9:59 am

What is the relationship between the two groups of numbers? Are they related by percentage (i.e. for every ~5% decrease on the left side, there is a one-unit decrease on the right side) or exponentially? Or something else?

If you have an equation which expresses the relationship between the two groups of numbers, you can simply use [expr] with float arguments ( $f ) to cover all the intermediate values.

You can use [scale] only if you know the exponential base, and the relationship between the numbers follows the equation in [scale]’s reference page.

Feb 05 2012 | 10:08 am

>What I would need is a [scale] object that would work in between each value.
yes, and function does this. You can send it a floating point value and get the interpolated output from between two values you’ve input.

have you tried it? It works.

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

Forums > MaxMSP