Create a smooth loop from 0 to 1 to 0.

DaSheng Hen's icon

I have implemented this functionality (with a small bug at the beginning), but my implementation is quite complex.

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

I'm sure there's a simpler and clearer way to achieve this.

Thank you very much for your help!

double_UG's icon

look at line help > multi segment

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

..................................................

DaSheng Hen's icon

Thank you very much for your help!

I’ve checked the line help, but I didn’t think of applying it this way. I appreciate your inspiration. Based on that, I’ve added a switch, and I hope anyone with questions about this can find the answer here.

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

jg's icon

Here's a different way to do it FYI.

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

Wil's icon

And here is a another approach

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

TFL's icon

If it is for animating something that is part of a [jit.world], I would use [jit.time.tri] for that, or any object from the (builtin) jit.mo package, as it gives you one value per frame, no more, no less.

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