aboutsummaryrefslogtreecommitdiffstats
path: root/random241osc.py
diff options
context:
space:
mode:
authorDavid Runge <david.runge@frqrec.com>2014-02-15 01:35:49 +0100
committerDavid Runge <david.runge@frqrec.com>2014-02-15 01:35:49 +0100
commitde627b641caf475df43dc3bb6cf6a59ae2297bd0 (patch)
tree69890a197bf84a6c89b48f575d8d22b545b87b4c /random241osc.py
parent29d861e10548e25339e24cfd2db1e3a9fc748e41 (diff)
downloadrandom241-de627b641caf475df43dc3bb6cf6a59ae2297bd0.tar.gz
random241-de627b641caf475df43dc3bb6cf6a59ae2297bd0.tar.bz2
random241-de627b641caf475df43dc3bb6cf6a59ae2297bd0.tar.xz
random241-de627b641caf475df43dc3bb6cf6a59ae2297bd0.zip
Committing deletes, updating .gitignore
Diffstat (limited to 'random241osc.py')
-rwxr-xr-xrandom241osc.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/random241osc.py b/random241osc.py
deleted file mode 100755
index 1e06917..0000000
--- a/random241osc.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#import OSC as osc
-import liblo as osc
-import logging
-
-# Declare an empty target
-target = None
-
-
-# Connect to the server
-def connect_to_server(hostname, port):
- global target
- if (hostname or port) is None:
- target = osc.Adress('127.0.0.1', 57121, osc.UDP)
- else:
- try:
- target = osc.Address(hostname, port, osc.UDP)
- except osc.AddressError, err:
- logging.error(err)
-
-
-# Send a osc_message to the server
-def send_msg(time_delta, randomness):
- global target
- # if the message is not empty and longer than 1
- if randomness is not None and len(randomness) > 1:
- msg = osc.Message("/random")
- msg.add(time_delta)
- msg.add(randomness[0], randomness[1])
- try:
- osc.send(target, msg)
- except:
- logging.error('OSC: Sending of message failed.')