Code Monkey home page Code Monkey logo

osc-websocket-example's Introduction

osc-websocket-example

Examples about receiving OSC data through WebSocket.

p5js-max

Background

Sometimes I meet situations where I need OSC but cannot use UDP.

Such as sending OSC message from browser-based p5js to Processing / MaxMSP / Unity.
And my OSC controller called BugOSC, a WeChat Mini Program, which also does not support UDP. WeChat Mini Program has supported UDP at May 2019.

However, although they don't support UDP, they support WebSocket, another network transmission protocol.

Here are examples about receiving OSC data through WebSocket sent from p5js for example.
The transporting data are binary packets (ArrayBuffer, byte[]) following the standard OSC format.

p5js-processing

WebSocket Client

The p5js sketch in p5js-client.

Use library osc.js to pack and parse OSC data.
And osc.js itself supports UDP (NodeJS), Serial port, WebSocket (browser and NodeJS) and TCP, Wow!

WebSocket Server

Click the first level links for detail README.

*Bridge

Of course also can make a third party NodeJS/Processing/Python/etc BRIDGE focus on receiving data through WebSocket and forwarding to other OSC receivers:
p5js-client <---WebSocket---> BRIDGE <---OSC---> Max/Processing/Unity/Arduino/etc


Welcome PR! 👏

Cheers~

Contra

osc-websocket-example's People

Contributors

avantcontra avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.