Csound Csound-dev Csound-tekno Search About

[Csnd] Csound and WebOSC

Date2018-06-21 21:47
FromRichard
Subject[Csnd] Csound and WebOSC
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
Csound@listserv.heanet.ie
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

Date2018-06-21 22:29
FromTarmo Johannes
SubjectRe: [Csnd] Csound and WebOSC
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" <zappfinger@gmail.com>:
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
Csound@listserv.heanet.ie
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 Csound@listserv.heanet.ie 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

Date2018-06-23 11:00
FromRichard
SubjectRe: [Csnd] Csound and WebOSC

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" <zappfinger@gmail.com>:
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
Csound@listserv.heanet.ie
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 Csound@listserv.heanet.ie 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