raganmd
10/24/2018 - 10:44 PM

TouchDesigner to Node-Red

Example of sending a json blob as a json object to NR

sender 	= op('tcpip1')
import json

def onOffToOn(channel, sampleIndex, val, prev):
	msg 	= {
				"time"		: absTime.frame
				}
	j_msg 	= json.dumps(msg)
	sender.sendBytes(str(j_msg))

	return