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?
----------begin_max5_patcher---------- 509.3ocyTssbaBCD8Y3qPil7HkQhKBnu0uiNYxHCxNJEDLBQpayj+8JsBarS bZodRu7f03c2CZO6Y2UOEFf2zuWLhQeD8YTPvSgAAfKmifY6.bGeecKeDfga j7VbjOfZpqexzJLPH5r2Ato9doZ2cZQswe0EzXRDhV3NyHGNQ2N+ExF3p627 vGX3i2hl2ILB8cBEeSqvgfrjWo5ko0yDy2FD9bh211ys4+VW3mCCcGQ+IKRZ 9ZKx7+KJRk3qVxbfJFwdnNrb5KHBhbkkeYo6LGJ+jSK+s8Jyn76.uoIwjWqJ Y3Sfpr5BD4S5y6EKZRxaoIWmbzIFG46DuROzb0NA5FJ5ljqcjHEF+K7Fk+Vh R5+VQY6jp1H6UWtxy90KC49AAXdfRNcf.zUOXO1jhKusPeu2Vhrpw7uMVRfO lTdSyPuTYlePjxxhKqRYzhY1Egby1rz3xjphRq2jx3hRFiU.QJxyiSoUzrpH TEMNKy58LUGRDtUpd4Stf.57edqXreRWef6yuNhVznFwnQp3P+YAicMBQOh4 dYSiPcpR0IOqHKIw4VpCMHK+m++RNjiNoF5FjKN.sVtmuRtS9Ib+8iMYqfMo +0XS5JXC8JYieniOL7nPONek.Qra5OzqclrHvTp7lv5CVKdTd.uG.Wa2xM1U 7Is+Yn8rLbnKOOG9CzqajuM -----------end_max5_patcher-----------
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.
Forums > MaxMSP