Yo, I don't know of an object out there that does this specifically, but there might be one. But you could make a simple subpatch that does this. I'm assuming you want a linear mapping of input to output... the general equation is (I think!):
((outMax-outMin)/(inMax-inMin))*(input-inMin)+outMin
This will work for inputs in the range you specify, and give funkiness for number out of that range. I attached a pd implementation. Hope this helps!
Chadwick
-----Original Message----- From: pd-list-admin@iem.kug.ac.at [mailto:pd-list-admin@iem.kug.ac.at]On Behalf Of Hans-Christoph Steiner Sent: Tuesday, March 18, 2003 11:03 AM To: pd-list@iem.kug.ac.at Subject: [PD] Range object
I am looking for an object to change the range of numbers. Specially, I am working with mice and joysticks, which output numbers in a specific range (screen resolution for mice; 0-65535 for usb joysticks). I would like an object like this [ranger inMin inMax outMin outMax].
Anyone seen something like this? I couldn't find anything in pdb.
.hc
zen
\[D[D[D[D
PD-list mailing list PD-list@iem.kug.ac.at http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list