Tutorial 5 – Receiving a WebSocket Message in TD. Control TD with a Website using WebSockets
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 receive a WebSocket message in TouchDesigner and assign the value to a Constant CHOP, then we’ll generalize it to work with multiple messages using the JSON DAT to easily transform out data from a DAT into a CHOP.
The final component that we’ll create in TouchDesigner is available for download on my Patreon: https://patreon.com/tblankensmith.
0:00 Overview
1:54 Setup WebSocket Heart Beat
2:27 Sending our First Message
2:50 Reading JSON
3:52 Getting our Value into a TD Constant CHOP
6:56 Overview of dictionaries in Python
8:50 Using the JSON DAT to get our data into table