Hardware integration best practices


I’m very new to TouchDesigner and I was wondering how to best integrate hardware that isn’t supported in TD yet, for example Serial(RS232/RS485) or USB protocol based devices.

Taking a high baud rate RS485 device as an example, I’ve got a proof of concept using Python and pyserial to establish communication, however the more data I send the more the framerate drops. (I haven’t tried using the TD built-in Serial operators yet)

Having a quick look at the Wiki I’ve spotted the Custom OPs and C++ DAT sections.

Is that the most efficient way of integrating hardware with TD ?
What the recommended method and best practices ?

Thank you,

The Custom OPs are all C++ and can be very fast, but I would recommend starting with the Serial DAT first and see how it works with your data since the built in OPs are all C++ as well and usually fast. Python is the most flexible option but can suffer from slow performance when used in some ways.