Skip to content

deno-plc/adapter-osc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TypeScript implementation of OSC (Open Sound Control)

Installation

Use JSR: JSR

Usage

Encoder

import { encodeOSC } from "@deno-plc/adapter-osc";

const packet = encodeOSC("/foo/bar", [5, true]);

This might thro an OSCProtocolError if the supplied data is invalid

Decoder

import { decodeOSC } from "@deno-plc/adapter-osc";

const [address, args] = decodeOSC(packet);

This might thro an OSCProtocolError if the supplied data is invalid

OSC over TCP

This package has support for OSC-over-TCP (=OSC packets are transmitted SLIP (Serial Line Internet Protocol) encoded over a TCP socket) usable in conjunction with adapter-tcp. For usage instructions see examples/tcposc.ts

Supported data types

  • string (s) (string)
  • int32 (i) (number)
  • blob (b) (Uint8Array)
  • float32 (f) (number)
  • float64 (d) (number)
  • boolean (T,F) (boolean)

License (GPL-3.0-or-later)

(C) 2024 Hans Schallmoser

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.