18 Feb 2025
2 min
OSC Global Remote for TouchDesigner
Driving any operator over OSC
TouchDesigner has Global OP Shortcuts: a name you set once, anywhere in your network, that you can then reach from any script. I wanted to extend that to OSC, so that a control surface (TouchOSC, my phone, a controller) could address any parameter of any operator via a clean address pattern.
The result is OSC_Globalremote on GitHub.
How it works
- Create a Base or Container and give it a Global OP Shortcut like
para1 - Add custom parameters to it:
Gain,Color, whatever you need - Drop the
OSC_GlobalremoteBase into the project. It spins up to 10 OSC-In DATs that all share one callback
The address format
/<GlobalOPShortcut>/<Parameter>
So a TouchOSC fader sending to /para1/Gain writes straight into op('para1').par.Gain. No mapping table, no per-project config.
The callback
The onReceiveOSC handler is the whole trick. It parses the address, splits it into shortcut + parameter, and writes the value:
def onReceiveOSC(dat, rowIndex, message, bytes, timeStamp, address, args, peer):
parts = address.strip('/').split('/')
if len(parts) < 2: return
shortcut, param = parts[0], parts[1]
target = op(shortcut)
if not target: return
try:
target.par[param] = args[0]
except Exception:
pass
I run the actual write through a tiny Table → CHOP path so I can re-use the values inside the network without re-parsing.
Feedback back to TouchOSC
Use the OSC_GlobalFeedback Base, but you have to put it inside the target object, so the script knows whose value to publish. That's the one constraint of the system; everything else just works.
Repo
github.com/CALKLECLE/OSC_Globalremote