-
Notifications
You must be signed in to change notification settings - Fork 3
Function Reference
float :: Float -> Tree Float
Make a Haskell Float usable by LambdaDesigner.
int :: Int -> Tree Int
Make a Haskell Int usable by LambdaDesigner.
bool :: Bool -> Tree Bool
Make a Haskell Bool usable by LambdaDesigner.
str :: String -> Tree ByteString
Make a Haskell String usable by LambdaDesigner as a python string.
bstr :: String -> Tree ByteString
Make a Haskell String usable by LambdaDesigner as a python expression.
ternary :: Tree Bool -> Tree a -> Tree a -> Tree a
Create a ternary python expression.
scycle :: Float -> Float -> Tree Float
Cycle from 0 to the second argument at a speed of seconds multiplied by the first argument.
sincycle :: Float -> Float -> Tree Float
Same as scycle but cycling in a sin pattern.
Note: These might cause an error in python if you try to multiply expressions that can't be multiplied together.
(!+) :: (Show a) => Tree a -> Tree a -> Tree a
Add two python expressions together. (float 1) !+ (float 2) works, as does (str "hello, ") !+ (str "world")
(!*) :: (Show a) => Tree a -> Tree a -> Tree a
Multiply two python expressions together. (float 1) !* (float 2) works.
(!%) :: (Show a) => Tree a -> Tree a -> Tree a
Modulo two python expressions together. (float 1) !* (float 2) works.
(!*) :: Tree a -> Tree a -> Tree Bool
Check for equality between two python expressions.
floor :: (Num n) => Tree n -> Tree n
Floor a numeric python expression.
ceil :: (Num n) => Tree n -> Tree n
Ceil a numeric python expression.
osin :: (Num n) => Tree n -> Tree n
Sin a python expression
pmax :: (Num n) => Tree n -> Tree n -> Tree n
Use python's max function
pyMathOp :: (Num n) => String -> Tree n -> Tree n
Use Python's math library
seconds :: Tree Float
The number of seconds since starting TD.
frames :: Tree Int
The number of frames since starting TD.
chopChan :: Int -> Tree CHOP -> Tree Float
Take the specified channel by index of a CHOP operator as a python expression.
chopChan0 :: Tree CHOP -> Tree Float
Shorthand for chopChan 0
chopChanName :: String -> Tree CHOP -> Tree Float
Take the specified channel by name of a CHOP operator as a python expression.
numRows :: Tree DAT -> Tree Int
Get the number of rows of a table DAT as a python expression.
emptyV4 = (Nothing, Nothing, Nothing, Nothing)
emptyV3 = (Nothing, Nothing, Nothing)
emptyV2 = (Nothing, Nothing)
Generate an empty vector of size X
vec2Map :: (ByteString, ByteString) -> String -> (Maybe (Tree a), Maybe (Tree a)) -> [(ByteString, Tree ByteString)]
Map a Haskell Vec2 to parameter names.
vec2Map' :: String -> Vec2 -> [(ByteString, Tree ByteString)]
Shorthand for vec2Map ("x", "y")
dimenMap :: String -> IVec2 -> [(ByteString, Tree ByteString)]
Shorthand for vec2Map ("w", "h")
vec3Map :: (ByteString, ByteString, ByteString) -> String -> Vec3 -> [(ByteString, Tree ByteString)]
Map a Haskell Vec3 to parameters
vec3Map' :: String -> Vec3 -> [(ByteString, Tree ByteString)]
Shorthand for vec3Map ("x", "y", "z")
rgbMap :: String -> Vec3 -> [(ByteString, Tree ByteString)]
Shorthand for vec3Map ("r", "g", "b")
vec4Map :: (ByteString, ByteString, ByteString, ByteString) -> String -> Vec4 -> [(ByteString, Tree ByteString)]
Map a Haskell Vec4 to parameters.
vec4Map' :: String -> Vec4 -> [(ByteString, Tree ByteString)]
Shorthand for vec4Map ("x", "y", "z", "w")
xV3 :: Tree Float -> Vec3
xV4 :: Tree Float -> Vec4
Map only the first argument of a VecX
iv2 :: (Int, Int) -> IVec2
Create an integer vec2.
casti :: (Integral i) => Tree f -> Tree i
Cast to an integer.
castf :: (Floating f) => Tree i -> Tree f
Cast to a float.
caststr :: (Show a) => Tree a -> Tree ByteString
fix :: (Op a) => BS.ByteString -> Tree a -> Tree a
Give an operator the specified name in TouchDesigner.