Skip to content

Routes OSC, MIDI, websocket messages to the clients (nodejs and Python)

License

Notifications You must be signed in to change notification settings

videodromm/videodromm-nodejs-router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

videodromm-nodejs-router

Routes OSC, MIDI, websocket messages to the clients (nodejs and Python) from https://github.com/colinbdclark/osc.js-examples/tree/master/udp-browser

Router

Bi-directional UDP <-> web browser example

This example opens a Web Socket in a web page that communicates with a Node.js server. The server is responsible for relaying OSC messages bidirectionally between the web page and set of example Python scripts.

Installation

From the command line:

  1. Run npm install
  2. In the web folder, run bower install
  3. Use pip to install pyosc: sudo pip install pyosc --pre ** On Mac OS X, pip can be easily installed using the command sudo easy_install pip.
  4. Use pip to install colorama sudo pip install colorama

Running the Demo

  1. In the udp-browser folder, start the Node.js server: node .
  2. In web folder, open index.html in a web browser; a log message will be printed to the terminal when you have connected.
  3. To send an OSC message via UDP to the browser, run python testSend.py in a new terminal window; an OSC message should appear in the web browser window.
  4. To send an OSC message from the browser to the UDP socket, run python testReceive.py. This will start a Python-based UDP OSC server. Then in the browser, click the 'Send OSC message' button. An OSC message should appear in the terminal window where you ran testReceive.py.

Run http server (optional)

  1. python -m SimpleHTTPServer 8000
  2. Open in your browser: http://localhost:8000/

Mobile

About

Routes OSC, MIDI, websocket messages to the clients (nodejs and Python)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages