- Edited
Oh wait I see what your issue is:
adowty var socket = io.connect('http://127.0.0.1:7562');
If you are trying to send OSC over the websocket, then the Bela program will not be able to handle it, because it does not support websocket or TCP. Even when I'll fix the TCP in [netreceive]
, it will not be enough: websocket is built on top of TCP and some additional patching is required, see e.g. this patch which does not even use [netereceive]
, rather it uses [mrpeach/tcpserver]
.
Long story short: I'd suggest NOT to try and handle a websocket connection from within libpd:
LiamDonovan When you change the scope-sliders, some js running in the browser sends the data over a websocket to node.js on the board which then relays it over OSC to Bela.
As Liam suggests, the easiest way to handle a websocket connection with the browser (assuming it is what you want) is to have node
handle the websocket with the browser and relay the messages to the Bela program over UDP.
Not sure about how scope-worker.js
is loaded, but you may want to start your experiments with running your script in a stand-alone script, in a different node
process, it is surely going to make debugging easier in the beginning: make it an entirely different script and run it with node yourscript
. As long as you listen on different ports than the ones used by the Bela IDE, your stand-alone script should work fine, the script will be fast at starting / stopping and development is easier.