adzialocha / osc-js

OSC library for Node.js, Electron, Chrome Apps, Webpages or any other JS application. It comes with a customizable Plugin API for WebSocket, UDP or bridge networking
https://adzialocha.github.io/osc-js
MIT License
258 stars 30 forks source link

From maxmsp to browser #71

Open robthepaper opened 1 year ago

robthepaper commented 1 year ago

Hello, the Example: OSC between MaxMSP/PD/SC etc. and your browser, works. It let us send from browser to maxmsp (UDP) but I can't figure out how to send from Maxmsp to browser.

Does anyone know how to?

adzialocha commented 1 year ago

Hi @robotpapier! I assume you're using the BridgePlugin? In MaxMSP I think one needs to use the udpsend object which should use the BridgePlugin UDP server as an endpoint.

The communication looks like that:

1. [Browser WebSocket Client]    --WebSocket-->  [Bridge WebSocket Server]
2. [Bridge UDP Server]           -----UDP----->  [MaxMSP / UDP Client `udpreceive`]
3. [MaxMSP] `udpsend` UDP Client -----UDP----->  [Bridge UDP Server]

The default ports are:

Can you share the ports you're using? Did you try different ones as well?