aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorneauoire <[email protected]>2020-01-07 09:11:29 -0500
committerneauoire <[email protected]>2020-01-07 09:11:29 -0500
commitcdc41e38b0b9e1e40e2cdc8bb9a34a5e3d8c5e70 (patch)
treeacd9ea923bab91fb3913e30ab05fea2989335a8c
parent5017e6f428c2000c2ab53147fe4de351f2fc00b1 (diff)
downloadOrca-cdc41e38b0b9e1e40e2cdc8bb9a34a5e3d8c5e70.tar.gz
Orca-cdc41e38b0b9e1e40e2cdc8bb9a34a5e3d8c5e70.zip
Added send message example to the listener
-rw-r--r--listener.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/listener.js b/listener.js
index 2c3b44f..582955a 100644
--- a/listener.js
+++ b/listener.js
@@ -1,3 +1,4 @@
+const IP_ADDR = '127.0.0.1'
const UDP_PORT = 49161
const OSC_PORT = 49162
@@ -5,7 +6,7 @@ const dgram = require('dgram')
const udpserver = dgram.createSocket('udp4')
const osc = require('./desktop/node_modules/node-osc')
-const oscserver = new osc.Server(OSC_PORT, '127.0.0.1')
+const oscserver = new osc.Server(OSC_PORT, IP_ADDR)
console.log(`Started Listener\n\nUDP:${UDP_PORT}\nOSC:${OSC_PORT}\n`)
@@ -32,3 +33,7 @@ oscserver.on('message', (msg, rinfo) => {
})
udpserver.bind(UDP_PORT)
+
+// Send a run message to orca
+
+udpserver.send('run', 0, 3, 49160, IP_ADDR) \ No newline at end of file