11 - Working with CHOPs (Updated 2026) - TouchDesigner Tutorial: Beginner Crash Course — Transcript
Full transcript
- 0:00The next operator family we're going to
- 0:02look at are chops. And chops are
- 0:04extremely useful because they're going
- 0:06to be how we control the networks we're
- 0:09making. As you saw in the last example,
- 0:11tops are our 2D textures, but without
- 0:14any kind of chops to actually control
- 0:16them and make them dynamic, things can
- 0:18get really boring really quickly. So, we
- 0:19want to make something that's not
- 0:20boring,
- 0:22so we need chops, plain and simple.
- 0:24So, in this example that we're going to
- 0:25make, we're going to use just a really
- 0:27simple top network, which is going to do
- 0:29a little bit of compositing of a circle
- 0:31on top of a bigger background. And then
- 0:34we're going to use chops to get some
- 0:36information from the mouse,
- 0:38process that information a little bit,
- 0:39and use it to dynamically move that kind
- 0:42of circle that we're drawing on the
- 0:43background, and affect it in different
- 0:45ways.
- 0:46So, let's get started. The first thing
- 0:47we're going to do
- 0:49is I'm going to go to the tops. I'm
- 0:50going to make a circle top.
- 0:54And then, similarly to what we did
- 0:56before, I'm going to make a constant
- 0:58top, which is going to serve as our
- 0:59background.
- 1:00And I'll do what I did previously, which
- 1:02was zero out
- 1:04all the channels,
- 1:06and then set the alpha to zero as well,
- 1:07so it's just black.
- 1:09And then I'll go to the common page, and
- 1:12I'll set this to 1920
- 1:14by 1080.
- 1:17And then I'm just going to do a simple
- 1:18over,
- 1:20just like we did before.
- 1:22The background is going to go to the
- 1:23second input.
- 1:25Circle's going to go to the first input.
- 1:28And then I'm going to change the prefit
- 1:30overlay to be native res.
- 1:34I'm going to put a null after this.
- 1:39And then I'll just draw the null in the
- 1:40background using the display flag we
- 1:42talked about.
- 1:44And then the one final thing I'm going
- 1:46to add to this is in between my circle
- 1:48and my over, I'm actually going to add a
- 1:50level top so I can control a little bit
- 1:52of the processing of the circle, maybe
- 1:53dim the opacity whenever we click the
- 1:55mouse. And like we said, a quick and
- 1:57easy way to do that is to right-click on
- 1:59the wire when it's selected.
- 2:01Click insert.
- 2:03In this case, we'll grab a level top and
- 2:05drop it in the middle.
- 2:07And then I'll just clean up this network
- 2:08a little bit so it looks a little more
- 2:10neat.
- 2:12Great. So now we're ready to start
- 2:13digging into chops. And like we said
- 2:15before, chops are all kinds of control
- 2:18data, whether we're talking about OSC,
- 2:20whether we're talking about Art-Net or
- 2:21DMX, or whether we're talking about uh
- 2:24inputs like, you know, whether Kinect
- 2:26cameras, uh the mouse, joysticks,
- 2:29tablets. All these things create chop
- 2:32data for us.
- 2:33So let's get started with the with
- 2:34something really easy. Let's go to the
- 2:36chop family here at the top. And we'll
- 2:38get started with a mouse in chop.
- 2:41And the mouse in chop basically gives us
- 2:44data about the position of the mouse,
- 2:45and we can get some other data like the
- 2:47left, right, and middle buttons, as well
- 2:49as the wheel.
- 2:50For our simple example, what we're going
- 2:52to do is we're going to start with the
- 2:53TX and TY position. And we're going to
- 2:56add the left mouse button. So what I
- 2:58have to do is, you can see TX and TY are
- 3:00already written in the position X and
- 3:02position Y parameters.
- 3:04To unmask and basically activate any one
- 3:06of these other channels, we just have to
- 3:07give it a name.
- 3:09So for my left button, what I can do is
- 3:10click in that parameter,
- 3:12type click,
- 3:14and now you can see I have my TX, which
- 3:16decreases and goes to -1 when I'm on the
- 3:19left edge of the screen,
- 3:20+1 on the right side.
- 3:22TY similar is going to actually be
- 3:25negative or positive 0.5 when I go
- 3:28upwards and negative 0.5 at the bottom.
- 3:32What I'm going to do is change my output
- 3:33coordinates because I want those two to
- 3:35be the same. I don't like them to be
- 3:36normalized by aspect ratio. It makes
- 3:37scaling them a little bit more
- 3:39uh labor-intensive cuz we have to scale
- 3:41them differently. I'm going to switch
- 3:43the output coordinates to normalized.
- 3:44And this way, when I take my mouse to
- 3:46the top of the screen, it's at one,
- 3:49bottom is -1,
- 3:51left side is -1, right side is +1.
- 3:54And then you can see we have a click
- 3:55channel. So, if I click
- 3:57that becomes one. And as I'm holding
- 3:59down still, it's still a one. And when I
- 4:01release, it goes back to zero.
- 4:03So, this will give us enough data to
- 4:05start playing around with chops. And
- 4:07importantly, more importantly I should
- 4:09say, is we're going to start doing
- 4:11something called referencing channels to
- 4:13kind of control parameters.
- 4:15So, let's start with the basic. Let's
- 4:17Let's take our TX and TY position. And
- 4:20we want to separate it from our click
- 4:21because we're going to process these two
- 4:23different data points differently.
- 4:25So, what I'm going to do is use
- 4:26something called a select chop.
- 4:29And select chop is very useful because
- 4:31what it does is it allows you to take a
- 4:34subset of information from a chop that
- 4:36maybe has a lot of channels and then
- 4:37basically just process them however you
- 4:39want separately. So, in this case I want
- 4:41to take my TX and TY and ignore my click
- 4:43channel for now.
- 4:44So, I can go to the channel names
- 4:45parameter. Right now you see it's set to
- 4:47star, which is a wild card that means
- 4:49giving me all the channels. And there's
- 4:51two ways you could select channels. What
- 4:52I could do is I could click in here,
- 4:55delete the star,
- 4:57type TX space TY,
- 5:00and then I would have those two
- 5:02channels. You can see we lost the click
- 5:03channel from here.
- 5:05Another option I could do is let me set
- 5:07it back to what it was, which is the
- 5:08star.
- 5:09I could use this little drop down here
- 5:11on the right side, which when I click on
- 5:13it, you'll see it it shows me all the
- 5:15channels available in a little drop
- 5:16down. And clicking on each one will
- 5:19automatically write its name into that
- 5:21channel name parameter, and that
- 5:23effectively gives us the same end
- 5:24result, but depending on, you know,
- 5:26maybe if you have a ton of channels you
- 5:27don't know exactly which ones you want,
- 5:29you can click the drop down and kind of
- 5:30just look through all the channels.
- 5:32So, we'll do the same thing. We'll make
- 5:34another select chop to isolate our click
- 5:36channel.
- 5:39So, I'll go to the channel names,
- 5:42click the drop down, click click.
- 5:44So, now I have my click separated and my
- 5:46position separated.
- 5:49So,
- 5:50before we do any more processing, let's
- 5:52find out where these values need to go.
- 5:54So, what I'm going to do is inside of
- 5:56this over
- 5:58this over top, we talked about using the
- 5:59translates. We used them a little bit in
- 6:00the last example.
- 6:02Essentially, what I can do is find a way
- 6:03to get that X position translate to be
- 6:06controlling this X position translate.
- 6:09We want the Y position of the mouse to
- 6:11control this Y position translate.
- 6:14And then for our click, what we're going
- 6:16to do is go to our level top, and level
- 6:19top has many different pages, but what a
- 6:21lot of people use level for is just
- 6:23simple opacity, which you'll find on the
- 6:24post page parameter.
- 6:26And then we're just going to turn this
- 6:28opacity on and off every time it clicks.
- 6:30So, if you click, it'll pulse it and
- 6:32we'll make a nice little ADSR, which is
- 6:35basically like an envelope or a shape to
- 6:36the click, so it's not just a straight
- 6:38on off on off. It'll have a little bit
- 6:39of shape to it. And we'll assign that
- 6:42click channel to this opacity.
- 6:44So, first let's just start with our
- 6:46position. So, what I'm going to do is
- 6:47I'm just going to select all of my chops
- 6:50by right clicking and dragging. I'm just
- 6:51going to move them over a little bit to
- 6:52the left, so I have some room to work.
- 6:55I'm going to set up a null.
- 6:58And like we said before, null chops are
- 7:00extremely important, and we'll see
- 7:02exactly why in this case. Because let's
- 7:05pretend we're in a situation, and it's
- 7:07not really even pretend because in my
- 7:09mind, I don't know what value ranges I
- 7:11need for these. I don't know if they
- 7:13need to be smooth. I don't really know,
- 7:14but I want to start just getting the
- 7:16network working so that I can start
- 7:18getting feedback from the actual
- 7:19network, and then I can adjust the
- 7:21network as needed. Now, like I said
- 7:23before, if we did something like
- 7:25reference our channels from here, and
- 7:27then we add something after, we have to
- 7:28redo the references, and then if we
- 7:30added another operator after, we have to
- 7:31redo them again.
- 7:32But we want to just save ourselves all
- 7:34that trouble, and we know the checkpoint
- 7:37of this little chain of operators here
- 7:39is going to be a fully processed TX and
- 7:42TY position that are going to be ready
- 7:44to reference in that parameter. So, for
- 7:46that reason I'm going to even make my
- 7:47null chop right now before I even get to
- 7:49the end of the programming.
- 7:51And then what I can do is even set up
- 7:54the reference now and just see what
- 7:55happens. See what it looks like.
- 7:57>> Let's talk next about making a chop
- 8:00reference.
- 8:02Chop references are one of the most
- 8:04fundamental techniques to working in
- 8:06TouchDesigner. It's something you're
- 8:08going to revisit over and over again.
- 8:11And as a beginner to working in
- 8:14TouchDesigner is probably the easiest
- 8:16way to set up and add interactivity to
- 8:21your projects. To set ourselves up for a
- 8:24chop reference, first we need to select
- 8:26the operator whose parameter we want to
- 8:29control.
- 8:30So, in our case, we want to take the
- 8:33channel from this mouse in chop and have
- 8:37it control the translate parameter of
- 8:41this over top.
- 8:42So, I'm going to click on the over top
- 8:44to make sure that the parameters are
- 8:47visible over here on the right. So, with
- 8:50the over top selected and the parameters
- 8:52visible,
- 8:53let's come back to our null chop.
- 8:56We're going to start off by making a
- 8:57chop reference from the TX channel to
- 9:01the translate X parameter. I now need to
- 9:03activate the viewer of this null chop to
- 9:07make the reference. And so, I'll click
- 9:08this little viewer active switch in the
- 9:10bottom right, which looks like a little
- 9:12four-pointed star shape. When I do that,
- 9:15it will make the viewer active and allow
- 9:16me to interact with the chop channels
- 9:19contained within it.
- 9:21And so, I'll want to mouse over the
- 9:24particular channel that I want to use
- 9:26for this reference. So, again, TX is
- 9:29what I want for this situation, so I'll
- 9:31mouse over TX. And then I'm going to
- 9:34click with the left mouse button and
- 9:36hold. I'll continue holding as I drag my
- 9:40cursor over to the right. Keep on
- 9:43holding that left mouse button until
- 9:45you've moved the cursor over top of the
- 9:48parameter that you want to make the
- 9:50connection or the chop reference to.
- 9:53So, I found my translate X parameter. I
- 9:55can now finally let go of my mouse
- 9:58button and we'll be greeted with this
- 10:00little dialogue. 95% of the time we're
- 10:03going to want to choose chop reference
- 10:07when we see this dialogue. There are a
- 10:09few special case scenarios where you may
- 10:12want to use the export chop option, but
- 10:15we'd recommend checking out our
- 10:17optimizations reference to learn more
- 10:19about that.
- 10:21So, again, at this point in your
- 10:22TouchDesigner journey, we're just going
- 10:24to focus on the chop reference option.
- 10:26We'll choose that and immediately you'll
- 10:28notice that the parameter has changed
- 10:31from
- 10:33what it looked like previously to now
- 10:35having a light blue color and a value
- 10:39that changes as you move your mouse left
- 10:42and right. If we move the mouse far
- 10:44enough to the left, we should see our
- 10:47circle reappear and follow our mouse at
- 10:52least in the horizontal direction across
- 10:54the display.
- 10:56We'll also notice that we have this
- 10:58little dotted line and moving arrow,
- 11:00which is showing that we have a
- 11:02connection made from this null two
- 11:05operator to the over top. Now, let's
- 11:09practice making a chop reference a
- 11:10second time so that we can get the
- 11:13vertical positioning of the circle
- 11:15connected as well.
- 11:17So, we've already got our over top
- 11:20selected
- 11:21and the parameter's visible on the
- 11:23right. Now, we want to grab the TY chop
- 11:27channel and apply that to our translate
- 11:30Y parameter. I've made sure, of course
- 11:32first, that my null to viewer is active
- 11:36via my little icon in the bottom right.
- 11:39I will then mouse over the channel that
- 11:41I want, which is TY, left click and
- 11:45hold, and keep on holding as I drag the
- 11:48mouse all the way over to the right. Let
- 11:50go only once I reach the translate Y
- 11:53parameter.
- 11:54And then in the little dialogue that
- 11:55pops up, I want chop reference.
- 11:59With those two connections made, we can
- 12:02see that now not only does the circle
- 12:05follow the horizontal uh
- 12:08movement of the cursor, it also moves in
- 12:12the vertical direction as well.
- 12:15So, that is amazing. We've just made our
- 12:17very first chop reference and officially
- 12:20have a
- 12:22a texture here that is interactive based
- 12:24on our mouse control. Now, let's look
- 12:26how we can work to further refine this
- 12:31connection and control that we've set
- 12:33up.
- 12:34We'll notice that as I move my mouse
- 12:36from left to right, at a certain point,
- 12:38roughly in on the right quadrant, or I
- 12:42guess uh right half of the display,
- 12:45you'll notice right around 75% of the
- 12:49width of the display, the circle
- 12:51disappears and there's this kind of dead
- 12:52zone where we can no longer see the
- 12:54circle even though we're moving our
- 12:57mouse
- 12:58uh quite a bit. And likewise, if we move
- 13:00to the left, roughly a quarter, a third
- 13:05uh of the display's width from the left
- 13:07edge, the circle disappears and again,
- 13:09we have this kind of dead zone. So, this
- 13:11provides us with a great opportunity to
- 13:13look at one of the most common
- 13:17methods for manipulating chop channels,
- 13:19which is to change their output range.
- 13:23We're going to use this in this scenario
- 13:25to set up sort of a boundary so that our
- 13:28circle never disappears, but at the same
- 13:29time we're also changing the output
- 13:31range of that data as well.
- 13:34And the way that we do this is to use a
- 13:37math chop.
- 13:39So, I'm going to go ahead and move my
- 13:41mouse up to the connecting cable between
- 13:44the select one chop and the null on the
- 13:47right and right click on this cable and
- 13:50choose insert operator.
- 13:52I'm then going to choose the math chop
- 13:54from the list and place that in between.
- 13:58So, the math chop is a super useful
- 14:00operator that you'll no doubt revisit
- 14:02time and time again. It contains a wide
- 14:05variety of you guessed it math related
- 14:08operations. But specifically for this
- 14:11example, it has this very useful page
- 14:14called range, which includes two
- 14:17different parameters for setting an
- 14:19input range and an output range. These
- 14:22are called from range and two range. So,
- 14:25for the from range parameter, we need to
- 14:27set this to match the range of the data
- 14:30that is coming into the math chop
- 14:33in order for us to correctly remap it
- 14:37and rearrange that data to the new
- 14:41desired range, which is the two range.
- 14:43This This is our output range that we
- 14:45want the data to fall within.
- 14:49So, let's have a quick look before we
- 14:51make any changes here at what the data
- 14:53currently looks like.
- 14:55So, as I move my mouse to the left and
- 14:58finally reach the left edge of my
- 15:00display, we'll see that the the values
- 15:03coming out of the mouse in chop
- 15:05directly, visible well, really in all
- 15:08three of these operators,
- 15:10will hit a value of -1 in the x-axis on
- 15:15this left edge of the display. So,
- 15:16that's our that's our minimum or our
- 15:19lower limit of this data.
- 15:22And then on the right edge of the
- 15:23screen, we should see that the value
- 15:26hits just about one. The value range
- 15:29that we're going to use here, this input
- 15:31range for our from range parameter is -1
- 15:34to +1. That is the minimum and maximum
- 15:38values that we'll be seeing in that
- 15:41incoming data. In terms of our output
- 15:44range, we need to think about where we
- 15:46want our circle to end up when we hit,
- 15:53let's say, the left edge or the right
- 15:54edge of the screen. So, the overtop
- 15:56bases its positioning of the circle on
- 15:59the center point of that shape. So, when
- 16:02the center point hits an x coordinate of
- 16:05-0.5,
- 16:08that will correspond to the circle being
- 16:11aligned on the center point with the
- 16:15left edge of the display. And likewise,
- 16:17when I move my mouse to the right, when
- 16:20the x coordinate is +0.5,
- 16:24the center point of the circle, again,
- 16:26will fall on the right edge of the uh
- 16:30the texture that is in the background.
- 16:33So, I can use that -0.5
- 16:36to +0.5
- 16:38range as my new to range output, and
- 16:42that will cause the, again, the the
- 16:45positioning of this circle,
- 16:47at least in terms of the center point,
- 16:49to never leave the boundaries of this uh
- 16:53texture that we've set up. So, let's
- 16:56let's go ahead and practice doing that.
- 16:57So, I'm going to change the from range
- 16:59of this math chop to read -1
- 17:02for this lower limit to +1, and then I
- 17:06want the new output range to fall
- 17:08between -0.5
- 17:10and +0.5.
- 17:13Once I hit enter, we should see that
- 17:15now, when I hit the right edge of or the
- 17:18left edge, excuse me, of my display,
- 17:21the circle is bounded as well and does
- 17:24not disappear. It now
- 17:27uh is more closely kind of following the
- 17:29behavior of my mouse. And likewise, on
- 17:32the right side of the screen, when my
- 17:35mouse hits the right edge of my display,
- 17:37the center point of the circle hits that
- 17:40edge of the texture as well. Another
- 17:42thing that we can do is to work
- 17:44creatively to fine-tune the range of
- 17:47that data to impact the behavior of the
- 17:51circle even more. So, let's say, for
- 17:52example, I don't want the circle to have
- 17:56this basically half of it cut off as the
- 17:59center point reaches the left edge of
- 18:02the texture or maybe the right edge as
- 18:04well. I can bring up
- 18:07reduce, rather, this like overall output
- 18:10range just slightly to make sure that my
- 18:13circle is always fully visible and
- 18:15doesn't get cut off as it moves maybe a
- 18:17little bit too far to the left or right.
- 18:19And I can do that by changing slightly
- 18:22the lower and upper boundaries of this
- 18:25output. So, let's say, for example, I
- 18:27set this to
- 18:28um -0.442.
- 18:32And then for the upper limit,
- 18:34+0.442.
- 18:37What will happen now is as I move
- 18:39towards the left edge of my display,
- 18:41my circle stops just short of that edge.
- 18:45And likewise, as I move to the right, it
- 18:47stops just short of that edge, as well.
- 18:51So, you can really work with this
- 18:52two-range parameter to, again, create
- 18:56this sort of boundary and and limiting
- 18:58based on the type of look or behavior
- 19:01that you want to create. I'm going to
- 19:03set those back to -0.5
- 19:07and +0.5
- 19:09before I move on. Next up, we're going
- 19:12to have a look at using the output of
- 19:14our left mouse button, which is the
- 19:17click chop channel that we've set up.
- 19:20And we're going to use that to control
- 19:23the level top that we set up previously,
- 19:26specifically the opacity value, so that
- 19:29we can create a sort of animation when
- 19:31we click the button down, we can have
- 19:34this opacity value go from zero to one,
- 19:37and likewise, when we let go of it, have
- 19:40it reduce back to zero. So, again,
- 19:42another way of adding some interactive
- 19:44control over our setup.
- 19:48The first thing that I want to do, as we
- 19:50talked about in the earlier portion of
- 19:53this video,
- 19:54is to add a null chop.
- 19:57And this is a a best practice you're
- 20:00going to use constantly as you develop
- 20:03projects in TouchDesigner.
- 20:05We want to ensure that we have this null
- 20:07chop, so we don't have to keep
- 20:09recreating chop references as we add
- 20:11additional operators to our network.
- 20:14So, I've added this null chop, and we
- 20:17can now create a chop reference for this
- 20:21alpha, or excuse me, opacity parameter
- 20:24in my level top. So, again, I'm going to
- 20:28click on the level top to select it, and
- 20:32have the parameters appear over here on
- 20:34the right.
- 20:35The opacity parameter is on the post
- 20:37page. So, if you're not there already,
- 20:39make sure you've got that page selected,
- 20:41and you'll see it as the second option.
- 20:44Then, I'm going to come over to my null
- 20:46three operator, and like I did before,
- 20:50I'll click the viewer active little star
- 20:52icon in the bottom right, and then I'll
- 20:54mouse over the click channel,
- 20:57left click, and hold, and drag all the
- 21:00way over to the opacity parameter,
- 21:03then let go, and choose chop reference.
- 21:06Now, what will happen, as we can see, is
- 21:09that when I click the button down in the
- 21:12channel changes from a value of zero to
- 21:15one,
- 21:16the circle will appear, and then as soon
- 21:19as I let go of that button, it will
- 21:21disappear as it becomes transparent once
- 21:24again. So, this is pretty cool, but
- 21:26there's more that we could do to finesse
- 21:28and kind of push this further and create
- 21:30something a little bit more interesting.
- 21:32We can actually modify the signal coming
- 21:35out of the click channel slightly so
- 21:39that it can kind of taper off rather
- 21:43than having our circle immediately
- 21:46disappear when we let go of the button.
- 21:49So, we can use another new operator to
- 21:51us called the lag chop to
- 21:54uh create this kind of behavior.
- 21:56So, I'm going to right-click on the
- 21:58cable connecting select two and null
- 22:00three
- 22:02and choose insert operator and then grab
- 22:05the lag chop.
- 22:08The lag chop, as you can see, as soon as
- 22:10we add it into our network, adds a
- 22:13little bit of smoothing to the data.
- 22:15It's a kind of filtering type effect
- 22:18that will smooth out the changes in data
- 22:22over time so that instead of having
- 22:25these harsh on and off binary type
- 22:29states in our click channel, we have
- 22:32this smooth transition from zero to one
- 22:35and then from one back to zero.
- 22:38A handy way to kind of wrap your head
- 22:41around what's happening in this chop
- 22:44channel over time is to use something
- 22:47called the trail chop, which we're going
- 22:49to put at the end of our network here.
- 22:52And this is just a utility operator that
- 22:55we're going to use as a sort of
- 22:57oscilloscope to look at how this channel
- 23:00changes over time.
- 23:02So, I'll grab the trail chop and put it
- 23:04at the end.
- 23:06And we'll see here
- 23:08that
- 23:09when we click
- 23:11again, we have that kind of smooth curve
- 23:13going from zero to one, and when we let
- 23:15go
- 23:16again, we have a smoothing applied as we
- 23:20go from this peak of one back to zero.
- 23:24What's cool about the trail chop is
- 23:26besides showing us the changes
- 23:29in a graph format, which is basically
- 23:32showing us the last 4 seconds of data
- 23:34that is coming out of our null
- 23:37we can also connect multiple operators
- 23:39to this. So, I could connect this this
- 23:42actually we don't want the lag, but we
- 23:44could connect the
- 23:45select chop before the lag
- 23:48to the second input
- 23:50and this gives us a comparison between
- 23:53those two
- 23:55chop channels of data. So, again, this
- 23:57one on the bottom
- 23:59is pre us applying lag, and the one on
- 24:02the top is post applying lag. So, you
- 24:04can see
- 24:06immediately the difference. We add a
- 24:07little bit of smoothing anytime the
- 24:10channel changes.
- 24:12Now, what's cool about the lag is that
- 24:14we don't have to apply this sort of
- 24:18smoothing effect uniformly. We can
- 24:20actually choose when the values in the
- 24:23chop channel are going from zero to one,
- 24:27that is they're moving in the positive
- 24:28direction, to apply a different amount
- 24:31of lag than when the values are moving
- 24:34in a negative direction. And we have
- 24:36these two lag parameters
- 24:39in our parameter window for this lag
- 24:40chop that let us decide how much lag we
- 24:43want to apply in that upward direction,
- 24:45in the positive direction, versus in the
- 24:47negative direction. So, for example, if
- 24:49I want to apply no lag when the values
- 24:53are moving in a positive direction I
- 24:55simply can put a value of zero in for
- 24:58this first lag value. I can increase the
- 25:01value in the second lag parameter to add
- 25:06more smoothing, more filtering when
- 25:08those values start to move in a negative
- 25:11direction. So, I could put, for example,
- 25:13a value of one here, and then we'll
- 25:15notice what happens is, especially if
- 25:18you look at the um trail chop here,
- 25:22when we let go of the mouse, when the
- 25:25the value moves from that value of one
- 25:28from the mouse being held down, and then
- 25:31goes back to zero, this larger lag value
- 25:34gives us a much longer kind of sloping
- 25:37decay. What is cool, though, is that the
- 25:39lag value of zero when the values go
- 25:42upwards, because it has no lag applied,
- 25:45we're still getting that really sharp
- 25:47attack as soon as we click the mouse
- 25:49button down. So, that allows for this
- 25:52circle to immediately appear as soon as
- 25:55we click the button down, but take a
- 25:57longer time to fade out. So, the lag
- 26:00chop in that way is really cool and
- 26:03useful for processing the data that
- 26:06you're getting out of the mouse or any
- 26:08other kind of interactive device you
- 26:10might have access to. Now, for the next
- 26:12step here, we're going to look at adding
- 26:15some additional processing with the math
- 26:18chop again. So, we're going to be using
- 26:20the math chop in a creative way once
- 26:22again to showcase how you can start to
- 26:25implement that in your project as well.
- 26:27So, I'm going to get rid of the trail
- 26:28chop for now, but feel free to add it
- 26:30back at any point to get a a sense for
- 26:32how your channels are changing.
- 26:35I'm going to add, after the lag and
- 26:38before the null three, by right clicking
- 26:41on this cable and choosing insert
- 26:43operator,
- 26:44the math chop. And this time, I want to
- 26:48reverse the range of the data that I've
- 26:51got coming out of my lag. So, what this
- 26:54means is I'm going to be taking the
- 26:56input range of data and basically
- 26:59inverting it or flipping it. So, where
- 27:02we had a value of one previously, I want
- 27:04that to now
- 27:06output a value of zero, and where we had
- 27:08a value of zero, I want that to output a
- 27:11value of one.
- 27:12What this all means in terms of the
- 27:15change in the behavior of this chop
- 27:18network that we're creating is that now,
- 27:21when I have not clicked down my mouse
- 27:24button, we'll see the circle, and when I
- 27:27click the mouse button down, it will
- 27:29disappear and then fade back in. So, to
- 27:32do this, just like in our previous
- 27:34example, we're going to head to the
- 27:35range page,
- 27:36and here, we basically are just again
- 27:40flipping the from range and the two
- 27:43range so that they're sort of the
- 27:44opposite of one another. We know already
- 27:48that the mouse button here is only going
- 27:50to ever output data between zero when
- 27:54it's not clicked down and one when it is
- 27:57clicked down, and that's true even with
- 27:58this lag function applied to it. So,
- 28:01that means my from range is okay.
- 28:04But, my two range now I want to reverse,
- 28:06so I can set the lower boundary now to
- 28:09one and the upper boundary to zero to
- 28:12again reverse the range of that data.
- 28:16And we'll see, now, when we had a value
- 28:19of zero coming out of the lag,
- 28:21we now output a value of one.
- 28:23And when I click down my mouse and we've
- 28:26got that value of one coming out of the
- 28:27lag, we can see out of the math comes a
- 28:31value of zero.
- 28:33Then, when I let go of my mouse, the
- 28:35circle will slowly fade back in. So, the
- 28:39point here is just to showcase that, you
- 28:41know, the math might be seen as a kind
- 28:43of simple utility function for just
- 28:46matching the range of the data or
- 28:48applying simple
- 28:50mathematical functions to it, but you
- 28:51can work with it creatively to in this
- 28:54case adjust the output range and
- 28:56basically reverse the way the animation
- 28:59to the the opacity is being applied or
- 29:02as in our previous example create more
- 29:04of a tight boundary of movement for the
- 29:09circle so that it doesn't ever disappear
- 29:11off the edge of the display. For our
- 29:14final example, I want to point out that
- 29:16we don't have to use our chop channels
- 29:20in such a one-to-one way as we've done
- 29:23so far. Meaning we don't have to do
- 29:25something as maybe obvious as using the
- 29:30X position of our mouse to control the X
- 29:33position of this circle. We can take
- 29:36these chop channels and apply them to
- 29:38anything that we want at all in the
- 29:40program and create new forms of
- 29:42interactivity.
- 29:44So, what we're going to do in this case
- 29:45is actually to take the same X chop
- 29:48channel
- 29:50uh TX that is chop channel from the
- 29:52mouse and use that instead to control
- 29:54the speed of playback for a movie file.
- 29:58So, in this case I'm going to turn the
- 29:59little display flag off for the circle
- 30:02example that we've been looking at so we
- 30:04don't see it in the background anymore.
- 30:06And then I'm going to add in the area
- 30:10above our network a movie file in top
- 30:13and place that roughly up here. Now, I
- 30:16want to load in a different movie file
- 30:19than what I've got here. So, I'm going
- 30:20to choose the little plus sign next to
- 30:22the file parameter
- 30:23and in the samples folder I want the one
- 30:26called count.mov.
- 30:29And once we do that, we'll see this nice
- 30:31little counting animation appear.
- 30:34Now, I want to basically follow the
- 30:37technique that I had worked through
- 30:39initially to select the chop channels I
- 30:43want to use,
- 30:44adjust their range via a math chop, and
- 30:47then use a null chop to actually create
- 30:50the chop reference
- 30:52um to the speed parameter of this movie
- 30:54file.
- 30:56Now, just to give us an idea of where
- 30:58we're headed,
- 30:59let's have a look at the speed
- 31:00parameter. When the speed parameter is
- 31:02set to a value of one, that will play
- 31:04the the video back at full speed.
- 31:08But, when we decrease this
- 31:10to something like 0.5,
- 31:13that's going to play back the video at
- 31:1550% speed.
- 31:17And likewise, if I keep reducing that,
- 31:19we're now at 23.1%.
- 31:21We can go all the way to zero if we want
- 31:24and basically pause the playback of the
- 31:27video.
- 31:28So, what that tells me is that a an
- 31:31output range of something like zero to
- 31:33one might be a good option because that
- 31:37will,
- 31:38you know, allow us to go full speed or
- 31:40go all the way essentially to pausing
- 31:43the playback of the video if we wanted
- 31:45to. We could also think about increasing
- 31:47the range, so maybe we go beyond one and
- 31:51we can move that up to like two and play
- 31:53the video at double speed.
- 31:56Um we have lots of options with the math
- 31:58chop, so feel free to play around with
- 32:01that however you'd like. But, what we
- 32:04can do to make this really simple for
- 32:07ourselves is to box select by right
- 32:10clicking and dragging all three of the
- 32:14select one, the math one, and the null
- 32:17two chops because we're going to reuse
- 32:20each one of these chops for our new
- 32:23network up top.
- 32:25This is a another handy method you'll be
- 32:27using a lot,
- 32:29especially when you know you need the
- 32:30exact same operators. So, I I went ahead
- 32:32and hit control C and then control V to
- 32:36paste. That would be command C or
- 32:38command V on Mac. And then with those
- 32:43still selected, I left clicked and
- 32:45dragged to move them up as a group.
- 32:48And now I've got again a second copy of
- 32:51my select with those same channels, a
- 32:54math chop to manipulate the range of the
- 32:57output, and a new null to make my chop
- 33:00reference from.
- 33:02So, in the math chop,
- 33:04I know that my input range is already
- 33:08correct because we're going to be using
- 33:10the TX channel once again. We know that
- 33:13the left edge of the display corresponds
- 33:16to -1 and likewise the right edge will
- 33:20give us a value of positive one.
- 33:23All this to say that the input range is
- 33:26fine for this application and so we're
- 33:29going to leave that. But the output
- 33:31range now needs to change.
- 33:34So, we can set the two range
- 33:37minimum or the lower part of this limit
- 33:39to something else. Now, remember a value
- 33:42of zero in terms of our speed would give
- 33:45us basically a paused video. So, we
- 33:48might want to think about increasing
- 33:50that just a hair above zero in order to
- 33:54get some kind of playback out of our
- 33:56movie file. So, I might try something
- 33:57like 0.01,
- 34:00maybe.
- 34:01And then for the upper limit to this
- 34:04output range, maybe we do actually want
- 34:06to be able to play the video two times
- 34:08speed or even five times speed if if you
- 34:11so choose. So, I could put a value of
- 34:14two in that output range. And now on the
- 34:17left edge we'll have 0.1
- 34:19and on the right edge a value of two.
- 34:23Let's go ahead and practice by making
- 34:25the chop channel from this null four and
- 34:27we can see all of this come into action.
- 34:31So, I'm going to select the movie file
- 34:34in top, once again.
- 34:36I've got my speed parameter visible.
- 34:39I'll come down to my null four
- 34:41and activate the viewer here, and then
- 34:44mouse over TX,
- 34:47left click, and drag, and keep holding
- 34:49the button down until we hit the speed
- 34:51parameter.
- 34:53Then we can let go and choose chop
- 34:55reference.
- 34:56And you can see as I move my mouse
- 34:58towards the left edge of the screen, the
- 35:00video starts playing really, really
- 35:02slowly.
- 35:04Somewhere in the middle of the display,
- 35:06we get 100% speed, and then we can start
- 35:10speeding up even beyond 100% and start
- 35:13playing it back two times speed. So, in
- 35:16this third example, we've used the exact
- 35:18same set of techniques that we looked at
- 35:20previously to pull out specific chop
- 35:23channels that we wanted to work with,
- 35:25change their output range with our math
- 35:28chop,
- 35:30make a chop reference from our null chop
- 35:33to allow us to control this parameter of
- 35:37our movie file in, and just to
- 35:39reiterate, to showcase that these chop
- 35:42channels can be applied to just about
- 35:45any parameter in your TouchDesigner
- 35:49network. At the same time, it's just as
- 35:51easy to replace the input for the
- 35:54network that we've built today
- 35:56with something like a connect chop, for
- 35:58example, or any number of other
- 36:01interactive devices. You could then
- 36:03follow the same technique of pulling out
- 36:06specific channels, let's say the X
- 36:09position of your left hand,
- 36:12maybe the X and Y position of your left
- 36:13hand,
- 36:14which could then be used along with the
- 36:16math chop and the null chop to control
- 36:19the position of the circle, as in the
- 36:22first example, or
- 36:24again, the speed of the movie file in as
- 36:26in our last example. These techniques
- 36:29are foundational to building up more
- 36:32complex networks in TouchDesigner and
- 36:34things that you'll revisit again and
- 36:37again as you continue working with the
- 36:39program and hopefully really set the
- 36:42stage and open up a lot of possibilities
- 36:45for experimenting with and creating
- 36:47interactive functionality in
- 36:50TouchDesigner.
About this transcript
This page contains the full transcript of 11 - Working with CHOPs (Updated 2026) - TouchDesigner Tutorial: Beginner Crash Course by The Interactive & Immersive HQ, generated from the public captions YouTube serves with the video. The transcript has 6,198 words across 916 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.