parallaxis/node_modules/node-osc
Rob Canning 136e1459b7 moving old projects from cold storage to git for possible revival 2023-12-06 12:05:01 +01:00
..
examples moving old projects from cold storage to git for possible revival 2023-12-06 12:05:01 +01:00
lib moving old projects from cold storage to git for possible revival 2023-12-06 12:05:01 +01:00
node_modules moving old projects from cold storage to git for possible revival 2023-12-06 12:05:01 +01:00
README.rst moving old projects from cold storage to git for possible revival 2023-12-06 12:05:01 +01:00
index.js moving old projects from cold storage to git for possible revival 2023-12-06 12:05:01 +01:00
lesser.txt moving old projects from cold storage to git for possible revival 2023-12-06 12:05:01 +01:00
package.json moving old projects from cold storage to git for possible revival 2023-12-06 12:05:01 +01:00

README.rst

--------
node-osc
--------

A very basic OSC client (so far) implementation based heavily on pyOSC_.


Relies on current trunk of node.js for the dgram library.

.. _pyOSC: https://trac.v2.nl/wiki/pyOSC

Install using npm

npm install node-osc

Example
-------

Sending OSC messages:

::
  
  var osc = require('node-osc');
  
  var client = new osc.Client('127.0.0.1', 3333);
  client.send('/oscAddress', 200);
  
Listening for OSC messages:

::
  
  var osc = require('./lib/osc');
  
  var oscServer = new osc.Server(3333, '0.0.0.0');
  oscServer.on("message", function (msg, rinfo) {
  	console.log("TUIO message:");
  	console.log(msg);
  });
  
Example of received TUIO (based on OSC) messages:

::

  TUIO message:
  [ [ '/tuio/2Dcur', 'alive', 3 ],
    [ '/tuio/2Dcur',
      'set',
      3,
      0.5218750238418579,
      0.3895833194255829,
      0,
      0,
      0 ],
    [ '/tuio/2Dcur', 'fseq', 2842 ] ]
  
  TUIO message:
  [ [ '/tuio/2Dcur', 'alive', 3 ],
    [ '/tuio/2Dcur',
      'set',
      3,
      0.5218750238418579,
      0.3895833194255829,
      0,
      0,
      0 ],
    [ '/tuio/2Dcur', 'fseq', 2843 ] ]
  
  TUIO message:
  [ [ '/tuio/2Dcur', 'alive' ],
    [ '/tuio/2Dcur', 'fseq', 2844 ] ]

Licensing
---------

LGPL.  Please see the file lesser.txt for details.