Timecode CHOP
Summary
The Timecode CHOP generates Timecode data (channels, a .timecode
python object and other python members). Its Mode menu provides a variety of ways to get, set and generate timecode through its parameters, including being driven from a timecode string, a set of channels, or other OPs that have timecode such as video input devices. You can also set timecode with python functions.
The timecode data is output as both channel data in the CHOP, and as a Timecode object via its .timecode
member in Python.
The timecode can follow the SMPTE standard (ie. non-negative, frames-per-second up to 60, loops at 24 hours), or a more general format (ie. any number of frames per second, negative timecode allowed, loops at 100 hours).
When being driven by channels, an input with channels named negative
, hour
, minute
, second
, or frame
can be provided that is added to the Timecode CHOP's output.
See also: Timecode, Timecode Class and the OP Snippets for the Timecode CHOP.
Parameters - Timecode Page
smpte
- When enabled the generated timecode will follow the SMPTE timecode standard, meaning no negative timecodes, and the timecode will loop at 24 hours. When disabled, the format will be more general, allowing for negative numbers and a maximum timecode of 100 hours.
mode
- ⊞ - The source used for generating the timecode
- Locked to Timeline
lockedtotimeline
- Generates the timecode from the timeline's time.
- Specify Index
specifyindex
- Generates the timecode from a single index value.
- Timecode String
timecodestr
- Generates the timecode from a timecode string following the format:hh:mm:ss:ff
orhh:mm:ss.ff
- Hour, Minute, Second, Frame Parameters
timecodepar
- Generates the timecode from hour, minute, second, and frame parameters. The parameters will overflow from one to the next, eg. specifying 120 seconds will output timecode as00:02:00:00
. Fractional values are also allowed.
- Sequential
sequential
- The timecode increases sequentially over time.
- Timecode Object
timecodeobj
- Generates the timecode from a timecode object.
- CHOP Channels
chop
- Generates the timecode from a CHOP reference with some or all of the channels: negative, hour, minute, second, frame.
- OP Reference
op
- Generates the timecode from an OP with a timecode Python member, eg. MoviefileinTOP_Class.
rate
- The timecode FPS. The timecode's max frame value is equal to rate-1
. If a fractional rate is provided then the rate is rounded up to the nearest whole number and drop-frames will be calculated if enabled on the Drop Frame parameter.
dropframe
- ⊞ - Specify how to calculate drop-frames. Drop frames are used when the FPS is fractional. FPS cannot increment a fractional amount per frame so FPS is rounded to the next whole number and the accumulation of error is accommodated for by adding drop frames.
- Off
off
- Drop-frames will not added.
- Automatic
auto
- Drop-frames will be added to the timecode when the rate is fractional. For special rate values such as 29.97, the defined standard solution is used (ie. 2 frames added every minute, except minutes that are divisible by 10). In other cases, a general solution is used by calculating the accumulated error.
index
- The index used to generate the timecode. Value is used in conjunction with the specified units.
indexunit
- ⊞ - The index value units.
- I
indices
-
- F
frames
-
- S
seconds
-
timecodestr
- A timecode string following the format: hh:mm:ss:ff
or hh:mm:ss.ff
frame
- Frame component of the timecode.
second
- Second component of the timecode.
minute
- Minute component of the timecode. Allows for overflow.
hour
- Hour component of the timecode.
init
- Used in sequential mode. Initializes the timecode value.
start
- Used in sequential mode. Starts the timecode sequential increment.
play
- When enabled, the sequential timecode will step forward.
chop
- A CHOP reference which contains some or all of the following channels: negative, hour, minute, second, frame.
customlength
- When enabled, a custom length can be specified for the timecode. If not, the default length will be 23:59:59:ff-1 for a SMPTE timecode and 99:59:59:ff-1 otherwise.
length
- Specifies the custom length in either samples, frames, or seconds. If it is desired to reference a Timecode Object then either tdu.Timecode().totalSeconds
or tdu.Timecode().totalFrames
, depending on the unit value.
lengthunits
- ⊞ - The unit of the custom length.
- I
samples
-
- F
frames
-
- S
seconds
-
cycle
- When enabled, the timecode value will cycle back to 00:00:00:00
upon reaching the custom length, rather than holding the last value.
Parameters - Output Page
negativechan
- When enabled, outputs the negative channel, which is true when the timecode is negative. Always false when using SMPTE standard.
framechan
- When enabled, outputs the frame channel.
secondchan
- When enabled, outputs the second channel.
minutechan
- When enabled, outputs the minute channel.
hourchan
- When enabled, outputs the hour channel.
totalseconds
- When enabled, outputs the total_seconds channel, which is the timecode converted into seconds.
totalframes
- When enabled, outputs the total_frames channel, which is the timecode into frames.
dropframechan
- When enabled, outputs the drop_frame channel, which is true when the timecode is drop-frame.
fpschan
- When enabled, outputs the fps channel.
Parameters - Common Page
timeslice
- Turning this on forces the channels to be "Time Sliced". A Time Slice is the time between the last cook frame and the current cook frame.
scope
- To determine which channels get affected, some CHOPs use a Scope string on the Common page.
srselect
- ⊞ - Handle cases where multiple input CHOPs' sample rates are different. When Resampling occurs, the curves are interpolated according to the Interpolation Method Option, or "Linear" if the Interpolate Options are not available.
- Resample At First Input's Rate
first
- Use rate of first input to resample others.
- Resample At Maximum Rate
max
- Resample to the highest sample rate.
- Resample At Minimum Rate
min
- Resample to the lowest sample rate.
- Error If Rates Differ
err
- Doesn't accept conflicting sample rates.
exportmethod
- ⊞ - This will determine how to connect the CHOP channel to the parameter. Refer to the Export article for more information.
- DAT Table by Index
datindex
- Uses the docked DAT table and references the channel via the index of the channel in the CHOP.
- DAT Table by Name
datname
- Uses the docked DAT table and references the channel via the name of the channel in the CHOP.
- Channel Name is Path:Parameter
autoname
- The channel is the full destination of where to export to, such hasgeo1/transform1:tx
.
autoexportroot
- This path points to the root node where all of the paths that exporting by Channel Name is Path:Parameter are relative to.
exporttable
- The DAT used to hold the export information when using the DAT Table Export Methods (See above).
Operator Inputs
- Input 0: - Optional input CHOP with some or all of following channels: negative, hour, minute, second, frame. The input timecode value is added to the Timecode CHOP's output.
TouchDesigner Build: