[PD] range of numbers
gml at xs4all.nl
Sat Aug 21 00:53:03 CEST 2004
On Friday 20 August 2004 18:18, Lazzaro N. Ciccolella wrote:
> it is wery wery fast (sure faster than a lib)
> but how I can make it automaticaly ?
> how calculates the two numbers ?
> many thanks
You want to map a range of 0.5 length f.i. starting at 0.1 to another range
starting at 0 or any other number.
You do that by
subtract the smallest number (so that is mapped to zero)
multiply by the desired-range/input-range (i.e.) biggest number - smallest
3)if necessary add the new lower bound.
so 0.1-0.5 mapped to 20-500
goes like so:
* (480/0.4) = 1200
More information about the Pd-list