genekogan / p5js-osc

OSC for p5.js with examples
216 stars 39 forks source link

Broadcast from P5JS? #13

Closed owenmcateer closed 3 years ago

owenmcateer commented 3 years ago

Hello, Is it possible to send OSC data from a P5js webpage to be received by Processing or another P5js app? Thanks

genekogan commented 3 years ago

I think the way to do this would be sending data from p5 to the server over websocket, and then sending OSC from the server to Processing.

owenmcateer commented 3 years ago

I tried using the following function in the examples but it doesn't appear to work. I think I need to study up on OSC a bit more.

function sendOsc(address, value) {
    socket.emit('message', [address].concat(value));
}