TD -> OSC -> NodeMCU

Hello,

I’m trying to get TD to send information to a NodeMCU. I was able to get touchOSC to blink and LED on the NodeMCU by following this tutorial.

youtube.com/watch?v=GKnuqrTxj9k

I was also able to get TouchDesigner and TouchOSC to send/receive data using this tutorial.

matthewragan.com/2013/10/10/sen … hdesigner/

But for some reason I cant pass the info from TouchOSC to TD and over to the NodeMCU. I’m using the exact same command sent from TouchOSC. I’m going from TouchOSC → oscin1 → select → oscout, the IP and Ports are copied from the working TouchOSC settings.

Is there something I’m missing here?

Thanks,

Andrew

Update:

I tried this on my PC and it also didn’t work, but i can pass info between my mac and PC and touchOSC just fine.

I also tried it using the OSC Send.amxd object from the MFL Ableton Live Connection kit and it worked out of the gate.

:question:

Hey man,
It’s been a long time, don’t know if you remember me from college.

Anyway, if you upload an example here of what isn’t working, I can help you get it to work.

I have done a lot with the ESP chips and touchdesigner as well as OSC communications between them.

Hey Harvey!

I definitely remember you and have been following your fantastic work for a while. I’m living in providence with Tate who i think you know as well.

Anyway,

Here is an image of the touchOSC settings that work. Im sending /1/toggle1 from TouchOSC and it works great, but when i try to do the same from TD, it fails.

LMK if you have any clues.

Thank you!

Ah, it’s probably your numerical format. You’re probably sending a float from TD right now. Maybe try changing the Data Format parameter in the OSC Out Chop to Int(32-bit).

You might also consider using a OSC DAT instead. I added an example of that to your scene. Curious if this works as expected.
OSCButton_oscDat.toe (4.48 KB)

So the Dat WORKS! sort of… Thank you! It turns on but wont turn off… but the message is getting there!!! YES! Thanks for putting this together.

the 32 bit int. from the OSC Chop still wont work.

I’m still using .25000, I’ll try and update and see if that solves anything.

Thank you!

  • Andrew

Right, the chop execute in that file only sends out the message when the channel goes from off to on. If you want to get both states, delete the code on the onOffToOn() callback and add this in:

def onValueChange(channel, sampleIndex, val, prev): op('oscout2').sendOSC('/1/toggle1', [int(val)]) return

So the chop channel value gets passed into the callback as ‘val’ and is cast to an int before being sent out via the osc dat. Similarly, you could just copy the function in onOffToOn() to onOnToOff() and change the value to 0.

Regarding the osc chop, I think you might just have your channel name wrong. Currently you have ‘1/toggle1’ but you should probably add that forward slash before the 1 like so ‘/1/toggle1’

Thanks! Ill give this a shot.

I’ve tried adding the / and get a message saying its automatically added and not needed.