Skip to content

Instantly share code, notes, and snippets.

Created June 19, 2020 17:21
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Touchdesigner - python communication via OSC
setup instruction
for Install pythonosc
pip install python-osc
from pythonosc import dispatcher
from pythonosc import osc_server
from pythonosc import udp_client
def messege_handler(unused_addr, *p):
client.send_message("/message_echo", p)
except ValueError: pass
dispatcher = dispatcher.Dispatcher()"/message", messege_handler)
server = osc_server.ThreadingOSCUDPServer(("", 5005), dispatcher)
print("Serving on {}".format(server.server_address))
client = udp_client.SimpleUDPClient("", 5006)
n = op('oscout1')
n.sendOSC('/message',['something', 9999])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment