Giter Site home page Giter Site logo

lambdadesigner's Introduction

λDesigner

A type-safe EDSL for TouchDesigner written in Haskell. Instead of connecting nodes by hand, use the power of algebraic data types to program TouchDesigner projects in Haskell.

Getting Started

Prerequisites

  • TouchDesigner
  • dictdiffer python3 library
  • Haskell (only tested with haskellstack)

Installing

  1. Clone or download LambdaDesigner-sample.
  2. Run stack build in the created directory
  3. Open LambdaDesigner.toe
  4. Run stack exec LambdaDesigner-exe
  5. Check TouchDesigner - you should be seeing a banana!

Using

Setup

This takes you through Main.hs. Note that you must be running LambdaDesigner.toe to see the results of running code.

The first thing you need to do is grab a reference to the runner.

topRunner :: IO ( Tree TOP -> IO () )

main = do
  r <- topRunner
  ...

This will let us run a Tree TOP which will show up as an output connector on the lambda COMP in TouchDesigner. Lets see this happening by creating a movieFileIn top with the sample image.

main = do
  r <- topRunner
  r $ movieFileIn (bstr "app.samplesFolder+'/Map/Banana.tif'")

We have something we can run!

$ stack build
$ stack exec LambdaDesigner-sample-exe

Take a look at it running in TouchDesigner! To experiment with different node types check out the wiki. Not every TouchDesigner node is represented yet, but the most common ones are there.

You can also experiment with LambdaDesigner in ghci. The following code will create a node with the text "Hello, World!"

$ stack ghci
> r <- topRunner
> r $ textT id (bstr "Hello, world!")

More complex networks

  • If you're new to TouchDesigner, check out the TouchDesigner wiki for some examples of nodes! You can play around with nodes in TouchDesigner until you get an idea of how everything works. Even if you solely use LambdaDesigner, it's useful to understand what's happening in TouchDesigner to debug. Most of the nodes are implemented, but if you need a new node or parameter, please file an issue.

  • Try out intero. It's a good way to compile and run hs files easily.

  • Check out some of Oscillare's node functions, they give a good idea of what LambdaDesigner can do. Everything under "Gens" is a Tree TOP and everything under "Effects" is a Tree TOP -> Tree TOP. Note that some of them depend on the .frag files found in TD/scripts/Visuals

Troubleshooting

The scripts node has errors

Click on the red X on the top right of the node. If it says that dictdiffer isn't found, make sure you have installed the dictdiffer python library using pip, and that TouchDesigner knows which python module directory to use. Check out the TouchDesigner wiki article.

If it's a different error, then please file an issue.

lambdadesigner's People

Contributors

ulyssesdotcodes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lambdadesigner's Issues

Install instructions

Would be good if this was broken down a bit more, starting from stack install LambdaDesigner

Post to hackage

... To enable import LambdaDesinger from e.g. a .tidal file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.