Comments (6)
Hi @jarmitage! :-) This is hard to tell, since it might also be related to your network configuration and backend. Did you try using ip address 0.0.0.0
?
from osc-js.
Hi, have same problem with this trivial example:
const plugin = new OSC.WebsocketBrowserPlugin({ port: 19912 }) const osc = new OSC( { discardLateMessages: false, plugin: plugin }); osc.open({ host: '127.0.0.1' }); function activator(id) { var message = new OSC.Message('/test/random', Math.random()); osc.send(message); }
tried also 0.0.0.0 with same results. Is there anything i could check?
from osc-js.
@triceratupuz do you have more information regarding your setup / server implementation?
from osc-js.
By further reading the docs/examples seems that what i'd like to do is not possible but I'll explain anyhow:
On the same computer I'd like to send messages from the browser (running the script above) to an audio program (csound). I'm currently not using csound but a software to monitor osc messages.
Could you confirm that an additional server is required?
from osc-js.
@triceratupuz in most of the cases you might need a bridging server in the middle to translate from websocket (browser) to udp / tcp protocols, in this sense you are right that it might not work as you planned it.
But it also looks like csound offers a websocket library (http://www.csounds.com/manual/html/websocket.html), maybe you try using this one to talk to the browser?
from osc-js.
Hi.
For the about the same reasons than @jarmitage I'm trying to implement osc-js in an node.js app, and I'm getting the same results.
I'm trying to build an app using Webrtc with which people can get and send streams of OSC to use with SuperCollider, Pd, OpenFrameworks, etc.
I haven't linked the osc part with the webrtc, which is working.
When I test it locally the OSC msgs go fine between the browser and SC, but when I deploy the app I get the same errors from jarmitage, both in Firefox and Chrome.
I tried to use the options like so in the node server.js:
const oscoptions = {
receiver: 'ws', // @param {string} Where messages sent via 'send' method will be delivered to, 'ws' for Websocket clients, 'udp' for udp client
udpServer: { port: 54321 },
udpClient: { port: 57120 },
wsServer: {
host: '0.0.0.0', // @param {string} Hostname of WebSocket server
port: 8080, // @param {number} Port of WebSocket server
},
};
const osc = new OSC({ plugin: new OSC.BridgePlugin(oscoptions) });
osc.on('/hello', (message) => {
console.log(message.args);
});
osc.open(); // start a WebSocket server on port 8080
and so in the app itself:
const options = {
udpServer: { port: 54321 },
udpClient: { port: 57120 },
wsServer: {
host: '0.0.0.0', // @param {string} Hostname of WebSocket server
port: 8080, // @param {number} Port of WebSocket server
},
wsClient: {
host: '0.0.0.0',
port: 8080,
},
};
let osc = new OSC(options);
osc.open(); // connect by default to ws://localhost:8080
document.getElementById('send-osc').addEventListener('click', () => {
let message = new OSC.Message('/test/random', Math.random());
osc.send(message);
});
I'm doing it from home, so there is no firewall-fancy-stuff here.
If there is any information I could give to circumvent what is causing the problem, please let me know.
best regards,
Gil
from osc-js.
Related Issues (20)
- Accept full URL in osc.open() HOT 1
- Uncaught ReferenceError: OSC is not defined HOT 1
- ModuleNotFoundError: Module not found: Error: Can't resolve 'dgram' in [...] HOT 8
- Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.
- Connecting to another device on the network fails with host: localhost. need 0.0.0.0
- Browser(http) osc message to Reaper(udp) HOT 4
- Use TypeScript HOT 4
- Implement booleans HOT 5
- Integer bundle timetags ignored HOT 3
- Use another documentation generator
- Export `Message` class (and possibly other classes)
- ERR_SOCKET_DGRAM_NOT_RUNNING HOT 1
- Can we avoid using websocket and use the library in the browser? HOT 2
- From maxmsp to browser HOT 1
- TypeScript compile error because of incompatible override of Atomic.unpack by its subclasses HOT 2
- Event listener on server on client connect
- Trouble sending osc message to UDP client in LAN network HOT 1
- Handling errors in unpack in Node.js HOT 2
- Nested bundles cannot be processed
- http package is deprecated, so I cannot install osc-js. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osc-js.