Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

OSC WebSocket stream using Tornado

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 static
Octocat-spinner-32 templates
Octocat-spinner-32 tornado
Octocat-spinner-32 .gitignore
Octocat-spinner-32 OSC.py
Octocat-spinner-32 README
Octocat-spinner-32 main.py
Octocat-spinner-32 simple_test.py
README
This is an example of catching OSC messages in a thread, adding them to a Queue and streaming them via WebSockets with Python using the Tornado framework.

Here is a 14 second demo video:

http://www.flickr.com/photos/lateplate/7076516411/in/photostream

Capable of being run in production as is, but would recommend running behind NGINX.

To use:

1) run the server:
$>python main.py

2) load the page to create a websocket connection to the server
open a browser and navigate to localhost:8888

3) run an OSC sender, i provide a simple test:
$>python simple_test.py

If these powers combine, you'll see the values streamed to your browser window.

The communication is bidirectional.  This technique can be used for all sorts of cool projects, with a minor modification you can even stream video/audio with just javascript on the front-end.
Something went wrong with that request. Please try again.