The term 'Frame' is used (1) in the Timeline, (2) as a time-unit in CHOPs, (3) as a time-unit in TOPs, and (4) in movies read and created with TOPs.
'Frame' is sometimes also used in image processing and TOPs to refer to the image of pixels, but we refer to these as 'images' in TouchDesigner as much as possible, to avoid confusion.
Frames on the Timeline
The frame bar on the Timeline at the bottom of the TouchDesigner window states what is the current frame. TouchDesigner is fixed at a specific number of frames per second, which you can query by using
project.cookRate in the textport. It is also displayed in the Timeline settings on the left of the timeline. The default is 60 frames per second, which is the refresh rate of most common LCD monitor and projectors.
The current frame is tied to the current time in TouchDesigner: The first frame of the timeline is frame 1, which is time 0 seconds, and at 60 frames per second, frame 61 is time 1 seconds.
Frames per second will be the most that TouchDesigner will cook in a second. If you know you want to cook and render only 25 frames per second, set it to 25 in the Frames Per Second field at the bottom left of the Timeline. (NOTE: It is suggested you do this at the start of your project.)
You can set your global timeline length to any number of frames using the timeline's UI.
The timeline length doesn't matter for most realtime playback because when TouchDesigner hits its last frame, it will then go back to frame 1 and play in a loop. Most things in TouchDesigner don't pay attention to the timeline looping as they have their own time counters, like in the Movie File In TOP which by default just plays forward until it reaches its own movie end, and all time filters which ignore the timeline.
On the other hand, you can lock some things to the timeline using
me.time.seconds expression in a parameter set to use index to drive it.
With frames per second set to 60, the frame step is 1/60 second. Because TouchDesigner will not always be able to render in realtime, when it is playing forward in realtime, it will skip frames to keep up, but CHOPs that are Time Sliced will internally compute in-between frames as best it can.
Although it may skip frames, you can be assured that after 4 seconds playing in realtime, it has stepped forward by 240 frames.
Frames in CHOPs
CHOPs have their own view of frames and time. Parameters involving time in CHOPs (length-trim time) can be expressed in any of three time units: seconds, samples (indexes), or frames. A CHOP may have its own sample rate set to 120 samples per second, but a frame step to a CHOP is exactly the same as a frame step on the timeline. So with the timeline set to 60 frames per second, it will be the same as 120/60 = 2 samples in the CHOP. So 60 frames in a CHOP is still 1 second, no matter what the sample rate of the CHOP is.
Frames in TOPs and Movie Files
Although the timeline may be set to 60 frames per second, incoming movies like QuickTimes will have their own idea of "frame", and will typically have a built-in setting of 30 frames per second. When the Movie File In TOP reads the QuickTime file, the user can refer to the images in terms of 'index', 'frames', 'seconds' or 'fraction'. As in CHOPs, 'frames' is still the timeline frames and frame 61 is one second after frame 1 in the movie. To refer to the movie's built-in setting of say, 30, you need to use 'index' to specify those images, where index of 0 is the first image, and index 30 is the 30th image (one second later).