sendosc
v1.0.1
Published
Simple NodeJS utility for sending osc
Downloads
47
Readme
sendosc
Simple NodeJS script for sending OSC via TCP or UDP originally inspired by this c++ utility of the same name.
Usage
Usage: sendosc [options]
simple util to sendosc
Options:
-V, --version output the version number
--protocol <protocol> Network protocol (choices: "tcp", "udp", default: "udp")
--host <host> the host to send osc to
--port <port> the port to send osc to
--address <address> OSC address
--args <args...> osc args (default: [])
--slip slip encode message (default: false)
--types <types...> osc arg types (choices: "s", "i", "f", "b", default: [])
-h, --help display help for command
- using npx
npx sendosc@latest --host 127.0.0.1 --port 9999 --address /hello
- install using
npm install -g sendosc@latest
and runsendosc --host 127.0.0.1 --port 9999 --address /hello
Notes
--types
option is a space seperate list of type characters that will determine what the corresponding argument type will be set to- optional
- uses type codes from the OSC spec
--args
option is a space-separated list of arguments. If a corresponding type is not found in the--types
option it will default to string (s
).- blobs (
b
) are to be entered as hex string representing the buffer to be sent so the ASCII stringhello
would be68656c6c6f
- blobs (
- the default protocol is UDP but can be changed to TCP using the
--protocol
flag
Examples
sendosc --host 127.0.0.1 --port 8000 --address /test --args 1.0
sendosc --protocol tcp --host 127.0.0.1 --port 8000 --address /this/is/sent/via/tcp
sendosc --host 127.0.0.1 --port 8000 --address /test/with/types --args 1 2.0 three --types i f
- note that
types
is not the same length asargs
so the remaining argument (three
) will default to string
- note that
sendosc --host 127.0.0.1 --port 8000 --address /blob --args 68656c6c6f --types b