Setting the domain with a dial
I'm trying to alter the domain X axis of a function object with two dials. My domain is currently set to 0 - 127, but I want to be able trim the top and bottom end of the X axis. For example, trim crop the domain from 15-100. I've tried "setDomain" as I want all the data points to move when trimmed, but I can't get it to function.
I'm confused. The X axis is left-right. You say you want to trim the top and bottom of the X axis, do you mean the Y axis? If so, that's the range message to the function object.
Yes, sorry I got a bit confused. The Y axis is from 0-127 and I want to be able to set a low and high threshold with the dials. So where do the two dials plug into on the range message object?
Is this what you are trying to do?
Thanks, its close. My X-axis (domain) is 0-127, and my Y-axis is the same (0-127). I have a bell shape curve I have drawn in with about 4 data points that starts at 0 and ends about 50 (domain). I would like to slide all of the data points up and down the X-axis with a dial without losing the shape of my curve. Your patch did something similar, but it was moving the points up and down the Y-axis.
Ah, I see. Unfortunately, range doesn't move the breakpoints, it moves the "view" of the breakpoints. If you want to move the breakpoints, you will need to send messages to each of them to change their Y values without changing the X values. Take a look at the function help file to see how to do that.
Many thanks, will do.