[Csnd] Csound and WebOSC

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] Csound and WebOSC

zappfinger
Can Csound OSC react to WebOSC messages (OSC from the browser)?

It looks like sending a WebOSC message executes the following code:

     // create websocket client
     const protocol = secure ? 'wss' : 'ws'
     this.socket = new WebSocket(`${protocol}://${host}:${port}`)


Richard

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Csound and WebOSC

Tarmo Johannes-3
Hi,

This is WebSocket, not OSC, those are different protocols.
Csound does have Websocket support (or can be built) but I have tried it just a bit, not specialist. I remember it handles binary, not text messages.

Tarmo

21.06.2018 23:47 kirjutas kuupäeval "Richard" <[hidden email]>:
Can Csound OSC react to WebOSC messages (OSC from the browser)?

It looks like sending a WebOSC message executes the following code:

     // create websocket client
     const protocol = secure ? 'wss' : 'ws'
     this.socket = new WebSocket(`${protocol}://${host}:${port}`)


Richard

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Csound and WebOSC

zappfinger

You are right. OSC is not possible directly from JS in the browser, but indirectly via ws.
Mostly these solutions have a Node 'bridge' server running that does the translation into real OSC.
Like p5js-osc...

Richard


On 21/06/18 23:29, Tarmo Johannes wrote:
Hi,

This is WebSocket, not OSC, those are different protocols.
Csound does have Websocket support (or can be built) but I have tried it just a bit, not specialist. I remember it handles binary, not text messages.

Tarmo

21.06.2018 23:47 kirjutas kuupäeval "Richard" <[hidden email]>:
Can Csound OSC react to WebOSC messages (OSC from the browser)?

It looks like sending a WebOSC message executes the following code:

     // create websocket client
     const protocol = secure ? 'wss' : 'ws'
     this.socket = new WebSocket(`${protocol}://${host}:${port}`)


Richard

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here