Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hook.io-oscserver

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hook.io-oscserver

a simple Hook for making an OSC server

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

hook.io-oscserver

a simple Hook for making an OSC server

Installation

 [sudo] npm install hook.io-oscserver -g

Usage

 hookio-oscserver

Hook Events Names

osc-out-message sends an OSC message

osc-in-message event emitted when an OSC message is recived

Incomming Message format:

{
  address:'/an/osc/address',
  typetag:'isf' //matches params type and index
  params:[0,"string",0.5]
}

Outgoing Message format:

{
  address:'/an/osc/address',
  typetag:'isf' //must match params type and index
  params:[0,"string",0.5] //must match typetag
  deviceId:'dummyDeviceId' //[OPTIONAL] if deviceId specified on options the sender will only send those messages.
}

Example loggin all incoming messages.

    var Hook = require('hook.io-oscserver').OSCServerHook;
    var options = {
      inPort: 9001
      ,outPort: 9000
    };
    var hook = new Hook(options);
    
    hook.on('osc-in-message',function(message){
      console.log(message);
    });
    hook.start();

Example sending a messages.

    var Hook = require('hook.io-oscserver').OSCServerHook;
    var options = {
      inPort: 9001
      ,outPort: 9000
      //,deviceId: "dummyDeviceId" //[OPTIONAL]
    };
    var hook = new Hook(options);
    var oscMessage = {
      address:'/an/osc/address'
      ,typetag:'isf' //must match params type and index
      ,params:[0,"string",0.5] //must match typetag
      //,deviceId:'dummyDeviceId' //[OPTIONAL] if deviceId specified on options the sender will only send those messages.
    }
    hook.on('hook::ready',function(){
      hook.emit('osc-out-message',oscMessage);
    });
    hook.start();
    

Keywords

FAQs

Package last updated on 21 Feb 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc