A type-safe TouchDesigner node programming language

For the past few months I’ve been working on LambdaDesigner, an embedded domain specific language for TouchDesigner written in Haskell. It’s a way of creating TouchDesigner node trees in a strongly typed functional language.

For example, the following code creates a basic movieFileIn and blurs it ((absTime.seconds % 1) * 100).

r $ movieFileIn (bstr "app.samplesFolder+'/Map/Banana.tif'") 
  & blur ((seconds !% float 1) !* float 100)

Since each component is type safe and composable, you can create libraries of small effects and combine them together to create more complex compositions. You can also use Haskell itself to map over lists of nodes, compose nodes as functions, and create custom data types.

In the backend, it represents a node tree as json data. A python script diffs any new json input and updates only those nodes that have changed (to avoid scrapping nodes in a live-coding/repl situation).

So far only a small number of node types and parameters have been implemented (because TouchDesigner is incredible and has so many node types).

Haskell repo and README at [url]https://github.com/ulyssesp/lambdadesigner[/url].

If you’d just like to see the TouchDesigner json parsing .toe that’s at [url]https://github.com/ulyssesp/LambdaDesigner-sample/tree/master/TD[/url]. The json parsing script is at scripts/scripts.py

More complex examples (and some custom data types) are in my live-coding environment at [url]https://github.com/ulyssesp/oscillare/blob/master/src/Visuals.hs[/url]

If there are any questions about setup/technique, post here and I’ll try to answer.

Cheers!

Whoa, that is pretty wild! I look forward to seeing some example uses for this. I’d dive in but that sounds like one deep rabbit hole!

Amazing! Thanks so much for sharing this!

Wow, this looks amazing!!! Can’t wait to check it out! :smiley: :smiley: :smiley: