summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2022-09-29 11:28:48 -0700
committeryum <yumfood@airmail.cc>2022-09-29 11:28:48 -0700
commit6aecadd5f73fc92992435b2d210a55a01280de95 (patch)
tree6528205f74e40ead88eeab7e541a0c0284703ee5
parenta4df4f826e377eeb3171fc927ed8ec6205ea7dac (diff)
add 'hello world' osc controller
simply sends numbers to a parameter's osc address of course, nothing is showing up in game. More debugging is needed.
-rw-r--r--osc_ctrl.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/osc_ctrl.py b/osc_ctrl.py
new file mode 100644
index 0000000..9a986a1
--- /dev/null
+++ b/osc_ctrl.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python3
+
+import argparse
+import random
+import time
+
+from pythonosc import udp_client
+
+def usage():
+ print("python3 -m pip install python-osc")
+ print("python3 ./osc_ctrl.py")
+
+parser = argparse.ArgumentParser()
+parser.add_argument("-i", default="127.0.0.1", help="OSC server IP")
+parser.add_argument("-p", type=int, default=9000, help="OSC server port")
+args = parser.parse_args()
+
+client = udp_client.SimpleUDPClient(args.i, args.p)
+
+for i in range(1,100):
+ addr="/avatar/parameters/_Letter_Row00_Col00_03"
+ msg = ((15 << 24) | (16 << 16) | (17 << 8) | 18)
+ print("send {} to {}".format(msg, addr))
+ client.send_message(addr, msg)
+ time.sleep(1)