• ### Rescaling Exponential Math

I want to create an exponential slider where the output will always be from 1-100 (well actually -100 - 100, but that's the next stage). I would like the exponential 'curve' to vary in steepness. I understand that the larger the number of exponent the steeper the curve.

My problem is as the exponent changes, I need to rescale the values so that the output is always from 1 - 100. I know that I have to change the constant in relation to the exponent, but my math is not up to working out how to do it.

I've attached the patch I'm working on. Thank you for any help.

http://www.pdpatchrepo.info/hurleur/Exponential_Scale.pd

• Posts 6 | Views 5299
• Make the input range for the base of the exponent zero to one. This way the output will always be zero to one, but the curve will vary with the exponent. Then just rescale zero to one to whatever you need it to be.

• Here's a quick mod of your patch that shows what I mean.

http://www.pdpatchrepo.info/hurleur/Exponential_Scale.pd

• Hi,

I did that for fun, a mapping expression that applies input values in [0 127] to output values in [1 100], using an "y=a^(x/b)" equation.

But while writing this message I wonder if you thought rather to a "y=x^a"equation...

Nau

http://www.pdpatchrepo.info/hurleur/expo_slider_hurleur.pd

• Thanks Psyko Logic, that helped a lot.

I have attached what I ended up with, which deals with negative values as well. I'm not sure it's the best approach.

@ Nau, interesting code, and thanks for posting. It's a bit beyond my level of maths, but fun to look into.

http://www.pdpatchrepo.info/hurleur/Exponential_Scale.pd

• You can use [moses] instead of the 2 [spigot]s. Like so.

http://www.pdpatchrepo.info/hurleur/Expo.pd

Posts 6 | Views 5299
Internal error.

Oops! Looks like something went wrong!