Controlling function breakpoints with external relative controls
Hello,
I am trying to use my MIDI controller (midi Fighter Twister) to edit one of the breakpoints on a curve in a function object. I have my controller setup to output 63 for down and 65 for up 1 unit increments. When I initially set this up, it seemed to work fine but after reopening the file and making an edit, the points snap to other locations and do not increment as expected.
I am unpacking the dump from function, extracting the x and y values for the 3rd point, adding or subtracting the value from the control, paking the list, then sending it back in to the function object. It seems like there is an issue with the loop and the unpack is always getting the zero values?
I added a trigger to address possible order of ops issues but that did not solve it. After reopening this the 3rd point will always go back to 26.578, 0. Any ideas?
* Also, in this file, I took out the controller connection and am using the 63 and 65 messages to increment.
Thanks!
-Thomas
The problem is probably that you set your [function] @mode to Curve (1), so listdump will output 3 numbers per point instead of 2, making your [unpack] wrong.
Set @mode back to Linear (0) and your patch works again.
Also, your [pak 2 f f] uselessly update the point position after listdump, so I would replace it with a [pack 2 f f] + [t b f], or [join] + [prepend 2] instead.