Here's a new scalenum abstraction, based on Josh's abstraction and Martin's comment. I added inlets to change the input and output boundaries. It doesn't use "expr", but only "native" objects. When the boundaries are set, it works with one addition, one multiplication, and one substraction. I though about adding a min-max filter, but it would involve more calculation, so I'll leave that part as an exercise. :-)
Ben bogart wrote:
I think a handly abstraction would be one that scales the incoming range to a specified range automatically... has 4 args, the min and max of the input and the desired min and max.
Josh Steiner wrote:
i made one called [scalenum] that i use all the time.
Martin Peach wrote:
It will run faster if you work out 720/127 yourself at the beginning instead of forcing pd to compute it every time:
...
I am NaN (I am a free man!)
Marc