Setting the domain with a dial

    Mar 28 2014 | 5:21 pm
    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.

    • Mar 28 2014 | 6:26 pm
      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.
    • Mar 28 2014 | 6:29 pm
      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?
    • Mar 28 2014 | 6:36 pm
      Is this what you are trying to do?
    • Mar 28 2014 | 6:54 pm
      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.
    • Mar 28 2014 | 7:59 pm
      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.
    • Mar 29 2014 | 7:49 pm
      Many thanks, will do.