OSC WebSocket stream using Tornado
Python Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
static first commit Apr 14, 2012
templates first commit Apr 14, 2012
tornado fresh tornado Apr 14, 2012
.gitignore ignore and delete Apr 14, 2012
OSC.py first commit Apr 14, 2012
README just derpin around with a reamde Apr 15, 2012
main.py first commit Apr 14, 2012
simple_test.py first commit Apr 14, 2012


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:


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.