Using Companion via OSC to control TD Animation

I’m going to study up on Ragans OSC tutorials but anyone already try using Companion (and the streamdeck keyboard) to trigger elements in TD? Any special suggestions?

used a streamdeck to control a high profile TouchDesigner installation, had zero issues

Thanks for the confidence-I used a simple ‘send integer’ option in companion to use as a trigger. Using TD as an animation engine for some possible web streaming with OBS…

Hi @nettoyeur , @VidE vide. I’m also trying to get streamdeck with companion to osc out to TD. They are running on the same PC and wondering what should be the target IP for companion osc configuration.

127.0.0.1 is the local loopback address in TCP/IP. Which means no matter what address your machine has (or if it is connected at all), anything sent from your machine to 127.0.0.1 will be rerouted to the receiving end of your network card on that same machine.

Indeed! It was too simple haha. I created a loopback adaptor and was fidling with it without success so far, but 127.0.0.1 just works. Thanks

This works pretty well using the generic OSC module, and I really like that I can use the web buttons when I’m working remotely, with bookmarks to specific pages and layouts. I have many pages of buttons in Companion for different projects.

Feedback is clumsy though. I’m using a Web Client DAT to update the button text and color in Companion, e.g.

http://127.0.0.1:8000/style/bank/<page>/<bank>?text=<text>

I have a few buttons with no actions just to display some status info. But this relies on the button and page number, so if I reorganize the buttons in Companion, I have to change the code in Touch. It would be cool to have a Companion module for this to support feedback properly instead of the generic OSC module.

hey folks, do you have an example .toe that you can share where you’re able to control Companion buttons?

I’ve been trying this for a while, haven’t been able to solve it. I think my challenge is that I’m not able to monitor/debug the messaging in some sort of log.

Here’s my post from a while ago, but no response: TD remote controlling BitfocusCompanion via OSC - General TouchDesigner Discussion - TouchDesigner forum (derivative.ca)

Update:
I found this OSC with Stream Deck through Bitfocus Companion - Techniques - TouchDesigner forum (derivative.ca)

Thanks to @cuetheFog1! I was able to communicate back and forth with Touch and Companion 3.3.1+7001. Though didn’t use the old ‘Deprecated OSC API’ that cuetheFog used, in Companion Settings > OSC I kept this disabled. … so the messages were using the current command syntax instead.

The feedback also worked, changing of the bgcolor of the buttons from Touchdesigner.

To summarize, OSC Out DAT is used to send commands from Touch. And a OSC IN CHOP was used to receive from Touchdesigner. Sending OSC strings from Companion I have yet to achieve though I suspect I’d need to get a OSC In DAT working for this.

Re: monitoring OSC messages:
I came across Protokol which I thought would be a great addition while i was debuging and troubleshooting OSC connectivity/commands, plus it’s free! mac and windows! Keep in mind your Ports can only be used once of course, Protokol can’t listen to the same port that you’re using to listen on, while Companion is listening to it. I missed this detail, I thought Protokol wasn’t working or was glitching. So just toggle between enabling Protokol or whatever platform you’re sending messages to.