mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 13:48:34 +00:00
it seems the custom handler wasn't being used
This commit is contained in:
parent
d0d19778a4
commit
330263028e
@ -1,3 +1,4 @@
|
||||
const dgram = require('dgram')
|
||||
const OSC = require('osc-js');
|
||||
|
||||
const config = {
|
||||
@ -18,6 +19,9 @@ const config = {
|
||||
port: 8080, // @param {number} Port of WebSocket server
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
|
||||
const osc = new OSC({ plugin: new OSC.BridgePlugin(config) });
|
||||
|
||||
osc.open(); // start a WebSocket server on port 8080
|
||||
@ -27,15 +31,15 @@ console.log('osc server running on port', config.udpServer.port);
|
||||
console.log('websocket server running on port', config.wsServer.port);
|
||||
|
||||
// listen for messages from the client
|
||||
osc.on('*', (m) => {
|
||||
console.log("hmm!");
|
||||
const ts = m.args.shift();
|
||||
const message = new OSC.Message(m.address, ...m.args);
|
||||
console.log(m.args);
|
||||
const bundle = new OSC.Bundle([message], new Date(ts))
|
||||
osc.send(bundle);
|
||||
console.log('forward:', bundle);
|
||||
});
|
||||
// osc.on('*', (m) => {
|
||||
// console.log("hmm!");
|
||||
// const ts = m.args.shift();
|
||||
// const message = new OSC.Message(m.address, ...m.args);
|
||||
// console.log(m.args);
|
||||
// const bundle = new OSC.Bundle([message], new Date(ts))
|
||||
// osc.send(bundle);
|
||||
// console.log('forward:', bundle);
|
||||
// });
|
||||
|
||||
/*
|
||||
example tidal messages:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user