Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

How do I check OSCin Status?

General discussion about anything TouchDesigner

How do I check OSCin Status?

Postby bLackburst » Thu Apr 12, 2018 3:44 am

I need to make a ui indicator that my OSCin CHOP (with 0-1 integers) is connected, active and healthy. There doesn't seem to be any members in the class and the only way I've found to do so is to monitor the cooktime difference between when there are packets coming in and not, but this seems imprecise.
I've tried using the dat, but any callbacks (eg setting an absFrame at message time and comparing it to current absFrame in another chop) cost .5 millis, in contrast to .01 millis with the chop.
Until I can figure out osc timetags on a teensy, are there any better ways to do this?
bLackburst
 
Posts: 305
Joined: Thu Sep 01, 2011 3:56 am
Location: Melbourne, Australia

Re: How do I check OSCin Status?

Postby elburz » Thu Apr 12, 2018 12:58 pm

Have you checked the Info CHOP for useful info?

One thing to note about OSC in general though is that it's a "connection-less" protocol (when using the default UDP messaging), unlike TCP that does handshakes, so OSC nodes are just waiting for stuff to come down the pipe. You might be able to use the UDT setting since UDT is reliable connection, but I'm not quite sure how the behind the scenes UDT implementation is setup. Some more info at link below about general connection protocols:

https://www.derivative.ca/wiki099/index ... _Protocols
--
Elburz Sorkhabi
Creative + Technology
nVoid Art-Tech Limited
http://nvoid.com
elburz
 
Posts: 1996
Joined: Fri Jun 01, 2012 6:55 pm
Location: Toronto, Canada

Re: How do I check OSCin Status?

Postby nettoyeur » Thu Apr 12, 2018 6:36 pm

As Elburz said OSC over UDP protocol is connection-less, so there is no confirmation of connection or anything you send.

UDT protocol is deprecated by its developers and will also be removed from TD in future versions.

What I usually do for live environments is to make an OSC heartbeat which sends a message every x seconds so you know the connection is up. On the receiving end make each heartbeat trigger a Timer CHOP of x+2 seconds length, after which you declare the connection lost and you can do a reconnect action or whatever you want. Each received heartbeat message resets the Timer CHOP.

Also the TCP/IP DAT recently got connection information in TD experimental. If you connect an Info CHOP you'll see a new channel 'connections'.
Last edited by nettoyeur on Fri Apr 13, 2018 5:21 am, edited 1 time in total.
Idzard Kwadijk | freelance TouchDesigner consultant | LinkedIn
Checkout ChopChopChop.org - the TouchDesigner marketplace!
nettoyeur
 
Posts: 939
Joined: Mon Oct 15, 2012 12:00 pm
Location: Amsterdam, The Netherlands

Re: How do I check OSCin Status?

Postby bLackburst » Thu Apr 12, 2018 8:02 pm

I'm aware it's not socketed, but because it holds the last message it got the chop is identical to when it is actually receiving, apart from the cook time.
Heartbeat is not a bad idea, maybe I'll make a dummy channel come from the microcontroller. Thanks!
bLackburst
 
Posts: 305
Joined: Thu Sep 01, 2011 3:56 am
Location: Melbourne, Australia

Re: How do I check OSCin Status?

Postby elburz » Fri Apr 13, 2018 5:16 am

As Idz said, heart-beats are how we keep track of things, easy and clear and you can setup the interval to your own comfort level.
--
Elburz Sorkhabi
Creative + Technology
nVoid Art-Tech Limited
http://nvoid.com
elburz
 
Posts: 1996
Joined: Fri Jun 01, 2012 6:55 pm
Location: Toronto, Canada

Re: How do I check OSCin Status?

Postby hunt.casey » Wed Jun 20, 2018 12:08 am

Hey folks,

I was recently just asking myself this same question while making a "faux" modular synth in TD. I'd intended to light up a status LED on the panel UI if the iOS app TouchOSC was connected. I couldnt find a flag for it, so I created my own hacky workaround.

Basically just looking to see if the noisy accelerometer data is present, and setting a logic gate after some simple channel processing. Totally wouldnt work at all without acc data, but for my purposes it does the trick.

I'm a total newb, and was pretty stoked about this hack, so I thought I'd share.
Theres a few comment texts in the network for details.
Maybe someone will find this useful.

ALSO, happy to see the info here about OSC being connectionless, and the workarounds you've all developed. Super useful. Thanks!

-Casey
Attachments
OSCconnectionHack.toe
(7.71 KiB) Downloaded 26 times
hunt.casey
 
Posts: 23
Joined: Sat Feb 03, 2018 10:35 pm


Return to General TouchDesigner Discussion

Who is online

Users browsing this forum: Google [Bot] and 2 guests