[function] - loops : changing values in same time when reading

Padrut Tacchella's icon

Hello,

Can someone help me :

situation : with [function] I change positions of a stepper motor. X120(sec), Y 40000(positions of motor). Works well. loops of 2 minutes.

what I want : with slider (simulating a joystick) I want to change the dots of the curve simultaneously while reading the loop. In the end, I should not even look at the screen, but continuously adapt the curve with the joystick until the motor is moving conveniently. The correction is of course always executed for the next turn of the loop, that's ok for me. After a few turns, the motor follows my requested move ... and I can do the same game on the next of the 20 motors.

my problem : the correction does not erase the previous dots but adds the new ones keeping the old ones. How can I kick off the not wanted dot-value of the curve (but not CLEAR the whole curve) ?

If anyone has a solution, I'd be very happy, many thanks in advance, pad

mizu's icon

Hi padrut

fast answer/ideas:

imho an external logic, 2 steps :recording many points is not a problem with function, than edit and simplify with your rules : values or time regularity ?

dump and erase points within a minimum delta, or

dump to a coll with a counter index, and treat the data, i.e. if you need points at regular timing, or

more complex, scale your values and dump to a buffer~, use the tools of buffer~/waveform to edit your datas, and peek~ the values to your function, or

dump to a multislider, so you can edit by hand

surely other solutions, scaling to MIDI, seq etc.

hth

michel

TFL's icon

Here's my take with [multislider] instead of [function]:

Max Patch
Copy patch and select New From Clipboard in Max.

You can invert the connections after the [t i i] to make your changes being read only when the next cycle starts

mizu's icon

interested question for me: ( never used stepper motor ) : X 120'000 msec for Y 40'000 : is a time of 3 msec regular ? Are the datas only + 1, 0, -1 ? Multislider can accept 32'767 sliders ( fun!)

joystick : like the latch or relative function, mixing in an audio sequencer ? With a mid-neutral position ?

sorry if OT, oups

michel