Tutorial: Agentic Programming Custom TouchDesigner Operators with C++

Vibe code your very own Sloperator™ with your agent of choice

Ever since StyleGAN was published way back in 2019, I've always wanted a way to control GAN's via MIDI and/or audioreactivity as a trippy tool in my VJ kit. This led to several experiments back in the day, including this primitive approach where I essentially stapled an OSC listener onto the existing StyleGAN repo from NVIDIA:

Few things go together better than Generative Adversarial Networks and Beyoncé. Prototyped with an OSC bridge between TouchDesigner and the official StyleGAN repo.

While this did effectively get us (me & my friend Devin) to a working prototype, the installation process was a mess, inference required two programs to be open simultaneously, and the whole thing was just not practical for an actual live VJ setup. So we shelved it as a fun experiment, with no real plans to make a production-ready StyleGAN+TD bridge.

Flash forward to the modern agentic age: now every side project can have it's moment in the Sun! Shoutout to Elburz at the Interactive & Immersive HQ for letting me drop a 1-hour, "vibe code with me"-style introduction to creating custom C++ operators (sloperators, we lovingly call them) in TouchDesigner using Claude Code. We start with the basics of setting up agentic tools on our machine, generating a thorough SPEC.md blueprint, and finally grinding out an optimized styleganTOP capable of infinite, realtime interpolation- all on a humble gaming laptop...

Running StyleGAN directly within TouchDesigner using a custom TOP.

Even with the time savings, building something like this can still be a slog, but the same principles will apply to projects large and small: create an airtight spec document, give your agent eyes with MCP server to see its own work (and correct itself), and keep your context tight with regular compaction. You'll have your own bizarre TD operator faster than you can say "Generative Adversarial Networks" !