Home Creators Posts Import Register Favorites Logout

Downloads

Content

Hey! In this beginner series, we'll go over how to use WebSockets to control TouchDesigner with a website in real-time and vice versa. We'll cover step by step how to implement everything from scratch. We'll also cover some programming concepts assuming little to no experience with programming.

In this tutorial, we'll go over how to send and receive WebSocket messages from our website to TouchDesigner. 

If you'd like to follow along and program the website here is a link to the starter template.

If you want to work off the completed website, it is available for free here. If you make a login on Glitch you can 'remix' the website and have your own version available for use.

Files

maxresdefault.jpg

Hey! In this beginner series, we'll go over how to use WebSockets to control TouchDesigner with a website in real-time and vice versa. We'll cover step by step how to implement everything from scratch. We'll also cover some programming concepts assuming little to no experience with programming. In this tutorial, we'll go over how to send and receive WebSocket messages from our website to TouchDesigner. If you'd like to follow along and program the website here is a link to the starter template: https://glitch.com/edit/#!/websocket-td-starter If you want to work off the completed website it is available for free here: https://glitch.com/edit/#!/websocket-td-example. If you make a login on Glitch you can 'remix' the website and have your own version available for use. The final component that we'll create in TouchDesigner is available for download on my Patreon: https://patreon.com/tblankensmith. 0:00 Intro 0:57 Website Overview & Docs 2:34 Sending Slider Data 6:55 Receiving WebSocket Messages in our Website 10:55 Controlling our Website with TouchDesigner

Comments

Joel Reodica

hey torin, thanks for this - its great! whats the best way to send text/strings via a text field or button?

Torin Blankensmith

You can send your data through the websocket using JSON. It's up to you to decide how to format your JSON in a way that's easy to use and reference :)

Bernardus

Hey Torin, I was just testing this web to Touch thing and it is all working fine, apart from the fact that I can send and receive everything I type, so not just Json. If I type Banana.... TouchDesigner receives 'Banana', If I send values in Json format, I just receive the complete Json command. I am new to this web-stuff, and not having a clue what I am doing wrong here!? any thoughts from your side? Thanks, Cheers, B

Tucker Grams

Hi Torin, I followed this series to the end successfully using Render and Codesandbox as alternatives, hoping to use what I learn in an installation project. As a novice with all things web-based, though, I am not sure how to take what I make in Codesandbox to my render -hosted website. Will I send the Codesandbox to a new github repository to make a new web service, or can I somehow incorporate it into the Render web service I used to test the websocket? I'll be looking for the answer, but I could use a push in the right direction. Thank you.