-
Notifications
You must be signed in to change notification settings - Fork 3
TD Operator Reference
These map directly to the TouchDesigner operator of the same name.
The (Op -> Op) argument is there to apply parameters using lenses. Any operator with a ' at the end also has a version without the ' where the first argument is id. For example, audioFileIn = audioFileIn' id.
Most are pretty self-explanatory. Where it isn't, notes have been added.
analyze :: Tree Int -> Tree CHOP -> Tree CHOP
First argument is the function index.
audioDevOut' :: (CHOP -> CHOP) -> Tree CHOP -> Tree CHOP
Parameters: audioDevOutVolume :: Maybe (Tree Float)
audioFileIn' :: (CHOP -> CHOP) -> Tree ByteString -> Tree CHOP
Parameters: audioFileInVolume :: Maybe (Tree Float)
, audioFileInPlayMode :: Maybe (Tree Int)
, audioFileInIndex :: Maybe (Tree Int)
, audioFileRepeat :: Maybe (Tree Int)
First argument is the file name.
audioMovie :: Tree TOP -> Tree CHOP
First argument is the movie TOP.
audioIn :: Tree CHOP
lowPass :: Tree CHOP -> Tree CHOP
highPass :: Tree CHOP -> Tree CHOP
bandPass :: Tree Float -> Tree CHOP -> Tree CHOP
AudioFilter passes. For bandPass the first argument maps to the filter cutoff.
audioSpectrum :: Tree CHOP -> Tree CHOP
constC :: [Tree Float] -> Tree CHOP
Create a CHOP from a list of input channels.
count' :: (CHOP -> CHOP) -> Tree CHOP -> Tree CHOP
Parameters: countReset :: Maybe (Tree CHOP)
, countThresh :: Maybe (Tree Float)
, countLimType :: Maybe (Tree Int)
, countLimMin :: Maybe (Tree Float)
, countLimMax :: Maybe (Tree Float)
, countResetCondition :: Maybe (Tree Int)
delay :: Tree Int -> Tree CHOP -> Tree CHOP
First argument is the number of frames to delay.
feedbackC :: Tree CHOP -> (Tree CHOP -> Tree CHOP) -> (Tree CHOP -> Tree CHOP) -> Tree CHOP
Feedback CHOP. The first argument is the initial conditions. The second argument is the CHOP chain between the initial conditions and the output. The third argument is the CHOP chain between the output and the source input.
fan' :: (CHOP -> CHOP) -> Tree CHOP -> Tree CHOP
Paramaters: fanOp :: Maybe (Tree Int)
, fanOffNeg :: Maybe (Tree Bool)
hold' :: (CHOP -> CHOP) -> Tree CHOP -> Tree CHOP -> Tree CHOP
The first argument is the source. The second is the trigger.
lag :: Tree Float -> Tree Float -> Tree CHOP -> Tree CHOP
First argument is the rising delay, second is the falling delay.
Parameters:
logicPreop :: Maybe (Tree Int)
logicConvert :: Maybe (Tree Int)
logic' :: (CHOP -> CHOP) -> [Tree CHOP] -> Tree CHOP
math' :: (CHOP -> CHOP) -> [Tree CHOP] -> Tree CHOP
mergeC' :: (CHOP -> CHOP) -> [Tree CHOP] -> Tree CHOP
mchan :: String -> Tree Float
A channel by name from the Midi input.
noiseC' :: (CHOP -> CHOP) -> Tree CHOP
nullC' :: (CHOP -> CHOP) -> Tree CHOP -> Tree CHOP
oscin :: Int -> Tree CHOP
The first argument is the Osc input port.
opsadd :: CHOP -> CHOP
opaddf :: Float -> CHOP -> CHOP
opmultf :: Float -> CHOP -> CHOP
Shorthand for performing mathematical operations on CHOPs.
sopToC :: Tree SOP -> Tree CHOP
selectC :: Tree CHOP -> Tree CHOP
switchC :: Tree Int -> [Tree CHOP] -> Tree CHOP
First argument is the index.
data TimerSegment = TimerSegment { segDelay :: Float
, segLength :: Float
}
timerSeg' :: (CHOP -> CHOP) -> [TimerSegment] -> Tree CHOP
Segment timer.
timerF' :: (CHOP -> CHOP) -> Tree Int -> Tree CHOP
Frame timer
timerS' :: (CHOP -> CHOP) -> Tree Float -> Tree CHOP
Seconds timer.
cell :: (Integral a, Integral b) => (Tree a, Tree b) -> Tree DAT -> Tree ByteString
Gets the cell specfied by (Tree a, Tree b) from the specified DAT as a Python expression.
chopExec' :: (DAT -> DAT) -> Tree CHOP -> Tree DAT
Parameters: chopExecChop :: Tree CHOP, ceOffToOn :: Maybe BS.ByteString, ceWhileOn :: Maybe BS.ByteString, ceOnToOff :: Maybe BS.ByteString, ceWhileOff :: Maybe BS.ByteString, ceValueChange :: Maybe BS.ByteString
datExec' :: (DAT -> DAT) -> Tree DAT -> Tree DAT
Parameters: datExecDat :: Tree DAT, deTableChange :: Maybe BS.ByteString, datVars :: [(ByteString, Tree ByteString)]
fileD' :: (DAT -> DAT) -> String -> Tree DAT
Parameters: textBlob :: Maybe BS.ByteString, textFile :: Maybe (Tree BS.ByteString), datVars :: [(ByteString, Tree ByteString)]
Loads the file specified by String. It will reload the file whenever the file changes.
scriptD :: String -> Tree DAT -> Tree DAT
Loads the file specified by String as a script.
selectD' :: (DAT -> DAT) -> Tree DAT -> Tree DAT
Parameters: selectDRI :: Maybe (Tree Int), selectDRStartI :: Maybe (Tree Int), selectDREndI :: Maybe (Tree Int), selectDRStartN :: Maybe (Tree ByteString), selectDREndN :: Maybe (Tree ByteString), selectDRExpr :: Maybe (Tree ByteString), selectDat :: Tree DAT
table :: Matrix ByteString -> Tree DAT
Transforms the given Matrix ByteString into a TableDAT.
tcpipD' :: (DAT -> DAT) -> Tree DAT -> Tree DAT
Parameters: tcpipMode :: Maybe (Tree Int), tcpipCallbacks :: Tree DAT, tcpipCallbackFormat :: Maybe (Tree Int), datVars :: [(ByteString, Tree ByteString)]
textD' :: (DAT -> DAT) -> String -> Tree DAT
Parameters: textBlob :: Maybe BS.ByteString, textFile :: Maybe (Tree BS.ByteString), datVars :: [(ByteString, Tree ByteString)]
constM' :: (MAT -> MAT) -> Tree MAT
Parameters: constColor :: Vec3, constAlpha :: Maybe (Tree Float), constMatMap :: Maybe (Tree TOP)
topM :: Tree TOP -> Tree MAT
Turn a TOP into a MAT.
chopToS' :: (SOP -> SOP) -> Tree CHOP -> Maybe (Tree SOP) -> Tree SOP
Parameters: chopToSopChop :: Tree CHOP, chopToSopAttrScope :: Maybe (Tree BS.ByteString), chopToSResample :: Maybe (Tree Bool)
Turns a CHOP into a SOP with a possible additional SOP as input.
circleS' :: (SOP -> SOP) -> Tree SOP
Parameters: circType :: Maybe (Tree Int), circArc :: Maybe (Tree Int)
lineS :: Tree SOP
mergeS :: [Tree SOP] -> Tree SOP
metaball' :: (SOP -> SOP) -> Tree SOP
Paramters: metaballRadius :: Vec3, metaballCenter :: Vec3
noiseS' :: (SOP -> SOP) -> Tree SOP -> Tree SOP
Parameters: noiseSTranslate :: Vec3
sphere' :: (SOP -> SOP) -> Tree SOP
Parameters: sphereType :: Maybe (Tree Int)
sweep :: Tree SOP -> Tree SOP -> Tree SOP
outS :: Tree SOP -> Tree SOP
transformS' :: (SOP -> SOP) -> Tree SOP -> Tree SOP
Parameters: transformSUniformScale :: Maybe (Tree Float)
scaleS :: Tree Float -> Tree SOP -> Tree SOP
Common parameters: topPasses :: Maybe (Tree Int), topResolution :: IVec2, pixelFormat :: Maybe (Tree Int)
blur' :: (TOP -> TOP) -> Tree Float -> Tree TOP -> Tree TOP
Blurs the TOP by the first argument.
chopToT :: Tree CHOP -> Tree TOP
circleT = circleT' id
compT' :: (TOP -> TOP) -> Int -> [Tree TOP] -> Tree TOP
Combines all the TOPs using the operand of the first argument.
crop' :: (TOP -> TOP) -> Tree TOP -> Tree TOP
Parameters: cropLeft :: Maybe (Tree Float), cropRight :: Maybe (Tree Float), cropTop :: Maybe (Tree Float), cropBottom :: Maybe (Tree Float)
displace :: Tree TOP -> Tree TOP -> Tree TOP
edges' :: (TOP -> TOP) -> Tree TOP -> Tree TOP
feedbackT :: Tree TOP -> (Tree TOP -> Tree TOP) -> (Tree TOP -> Tree TOP) -> Tree TOP
First argument is the source, second is the chain between the source and the feedback TOP, third is the loop between the feedback TOP out and the feedback TOP selector.
flipT' :: (TOP -> TOP) -> Tree TOP -> Tree TOP
Parameters: flipx :: Maybe (Tree Bool), flipy :: Maybe (Tree Bool), flipFlop :: Maybe (Tree Int)
glslT' :: (TOP -> TOP) -> String -> [Tree TOP] -> Tree TOP
Parameters: glslTDat :: Tree DAT, glslTUniforms :: [(String, Vec4)]
Loads the specified glsl file with the given TOP inputs.
glslTP' :: (TOP -> TOP) -> String -> [(String, Vec4)] -> [Tree TOP] -> Tree TOP
Parameters: glslTDat :: Tree DAT, glslTUniforms :: [(String, Vec4)]
Loads the specified glsl file with the given uniforms and TOP inputs.
hsvT' :: (TOP -> TOP) -> Tree TOP -> Tree TOP
Parameters: hsvAdjSatMult :: Maybe (Tree Float), hsvAdjValMult :: Maybe (Tree Float), hsvAdjHueOffset :: Maybe (Tree Float)
levelT' :: (TOP -> TOP) -> Tree TOP -> Tree TOP
Parameters: levelOpacity :: Maybe (Tree Float), levelBrightness :: Maybe (Tree Float)
movieFileIn' :: (TOP -> TOP) -> Tree ByteString -> Tree TOP
Parameters: movieFileInFile :: Tree BS.ByteString, moviePlayMode :: Maybe (Tree Int), movieIndex :: Maybe (Tree Int)
Load the specified movie file.
noiseT' :: (TOP -> TOP) -> Tree TOP
Parameters: noiseTMonochrome :: Maybe (Tree Bool), noiseTResolution :: IVec2, noiseTTranslate :: Vec3
nullT :: Tree TOP -> Tree TOP
outT :: Tree TOP -> Tree TOP
ramp' :: (TOP -> TOP) -> Tree DAT -> Tree TOP
Parameters: rampType :: Maybe (Tree Int), rampPhase :: Maybe (Tree Float), rampValues :: Tree DAT
rampC' :: (TOP -> TOP) -> [(Float, Float, Float, Float, Float)] -> Tree TOP
Parameters: rampType :: Maybe (Tree Int), rampPhase :: Maybe (Tree Float), rampValues :: Tree DAT
Ramp evenly between a list of colors.
rectangle' :: (TOP -> TOP) -> Vec2 -> Tree TOP
Parameters: rectangleSize :: Vec2, rectangleCenter :: Vec2, rectangleColor :: Vec3, rectangleBorderColor :: Vec3, rectangleBorderWidth :: Maybe (Tree Float)
render' :: (TOP -> TOP) -> Tree Geo -> Tree Camera -> Tree TOP
Render a Geometry and Camera.
selectT :: Tree TOP -> Tree TOP
switchT' :: (TOP -> TOP) -> Tree Float -> [Tree TOP] -> Tree TOP
Parameters: switchTIndex :: Tree Float, switchTBlend :: Maybe (Tree Bool)
Switch between TOPs based on the first argument.
textT' :: (TOP -> TOP) -> Tree ByteString -> Tree TOP
Parameters: textText :: Tree ByteString, textColor :: Vec3
transformT' :: (TOP -> TOP) -> Tree TOP -> Tree TOP
Parameters: transformTranslate :: Vec2, transformExtend :: Maybe (Tree Int), transformScale :: Vec2, transformRotate :: Maybe (Tree Float)
vidIn :: Tree TOP
Get the input from a video device. This creates a TOP at the project root and you can choose input in TD.
Common parameters: baseParams :: [(ByteString, Tree ByteString)], externalTox :: Maybe (Tree ByteString)
geo' :: (Geo -> Geo) -> Tree SOP -> Tree Geo
Parameters: geoTranslate :: Vec3, geoScale :: Vec3, geoMat :: Maybe (Tree MAT), geoUniformScale :: Maybe (Tree Float)
Create a geometry from the given SOP.
cam' :: (Camera -> Camera) -> Tree Camera
Parameters: camTranslate :: Vec3
light :: Tree Light
base :: (Baseable a, Baseable b) => (Tree a -> Tree b) -> Tree a -> Tree b
Create a custom COMP from the (Tree a -> Tree b) network.
tox :: (Op a, Op b) => String -> [(ByteString, Tree ByteString)] -> Maybe (Tree a) -> Tree b
Load the specified .tox file with the specified parameters and an optional input.