from 0..1 and back to 0

Hi, as a complete newbie trying to figure out how to do some basic things. am currently trying to get something to count from 0->1->0. have tried the wave operator and beat operator but can’t figure out how to do it with these.

Thanks, Lee

The Trigger CHOP is good for this, if you are looking for it to happen on an event. Or are you looking for it to loop from 0->1->0->1?

hi. i’m looking for it to loop from 0->1 and then back down to 0 again, i.e. no sharp drop from 1 back to 0, but a smooth transition. thnks

If you want a smooth advancing floating point number you could try speed with a loop limit of 0 to 1 or just pipe any growing number into a limit CHOP and do the same thing.

If you want a tick tock from 0 to 1 to 0 with nothing in between, you can do a count with a zigzag limit of 0 to 1.

actually a triangle would be a nice addition to the output choices for the beat CHOP.

rod.

i guess a triangle is what i’m looking for. there is one on the waves chop but it goes from -1 to 1 whereas I want from 0 to 1

You can use the offset and amplitude parameters in the Wave CHOP to change it to 0->1.
Another way is to use the Math CHOP, which has a From Range (set it to -1 to 1) and a To Range (set it to 0 to 1) to re-range the values.

another thing to bear in mind is that the Beat CHOP has a sine wave shape that you can offset to go between 0 and 1. the sine might give you a nicer ‘turnaround’ than a simple triangle wave.

rod.

filter CHOP (in box mode) seems to be the easiest way

cheers for the replies. will give them a go tonight

As usual, there are 100 ways to do things in TouchDesigner!

No one mentioned the Speed CHOP yet, so that’s another option if you want it to keep looping between 0-1-0 (like the Wave CHOP method). It also has zig-zag limit options similar to the Limit CHOP that archo-p mentioned.

Why not use an LFO CHOP, with a Math CHOP and set the range from -1 to 1, to 0 to 1.

1 Like

First: change the value range to -1 to 1(if it’s not already) with math chop
Then: plug into limit chop and choose “zig zag” and check ON “positive only”

This is how I got it to work after much frustration myself!