The osc Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The osc Reference Manual

This is the osc Reference Manual, version 0.5, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 04:23:01 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Open Sound Control

This is a common lisp implementation of the Open Sound Control Protocol aka OSC. The code should be close to the ansi standard, and does not rely on any external code/ffi/etc+ to do the basic encoding and decoding of packets. since OSC does not specify a transport layer, messages can be send using TCP or UDP (or carrier pigeons), however it seems UDP is more common amongst the programmes that communicate using the OSC protocol. the osc-examples.lisp file contains a few simple examples of how to send and recieve OSC via UDP, and so far seems reasonably compatible with the packets send from/to max-msp, pd, supercollider and liblo. more details about OSC can be found at http://www.cnmat.berkeley.edu/OpenSoundControl/

the current version of this code is avilable from github

git clone https://github.com/zzkt/osc 

or via quicklisp.. .

(ql:quickload "osc")

limitations

things to do in :osc

things to do in :osc-ex[tensions|tras]

changes


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 osc

Author

nik gaffney <nik@fo.am>

License

LLGPL

Description

The Open Sound Control protocol, aka OSC

Version

0.5

Source

osc.asd (file)

Component

osc.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 osc.asd

Location

osc.asd

Systems

osc (system)


Previous: , Up: Lisp files   [Contents][Index]

3.1.2 osc/osc.lisp

Parent

osc (system)

Location

osc.lisp

Packages

osc

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 osc

OSC aka the ’open sound control’ protocol

Source

osc.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: decode-bundle DATA

decodes an osc bundle into a list of decoded-messages, which has an osc-timetagas its first element

Package

osc

Source

osc.lisp (file)

Function: decode-message MESSAGE

reduces an osc message to an (address . data) pair. ..

Package

osc

Source

osc.lisp (file)

Function: encode-bundle DATA &optional TIMETAG

will encode an osc message, or list of messages as a bundle with an optional timetag (symbol or 64bit int). doesnt handle nested bundles

Package

osc

Source

osc.lisp (file)

Function: encode-message ADDRESS &rest DATA

encodes an osc message with the given address and data.

Package

osc

Source

osc.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Constants

Constant: +unix-epoch+
Package

osc

Source

osc.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: cat &rest CATATAC
Package

osc

Source

osc.lisp (file)

Function: decode-address ADDRESS
Package

osc

Source

osc.lisp (file)

Function: decode-blob BLOB

decode a blob as a vector of unsigned bytes.

Package

osc

Source

osc.lisp (file)

Function: decode-float32 S

ieee754 float from a vector of 4 bytes in network byte order

Package

osc

Source

osc.lisp (file)

Function: decode-int32 S

4 byte -> 32 bit int -> two’s compliment (in network byte order)

Package

osc

Source

osc.lisp (file)

Function: decode-int64 S

8 byte -> 64 bit int -> two’s compliment (in network byte order)

Package

osc

Source

osc.lisp (file)

Function: decode-string DATA

converts a binary vector to a string and removes trailing #nul characters

Package

osc

Source

osc.lisp (file)

Function: decode-taged-data DATA

decodes data encoded with typetags... NOTE: currently handles the following tags i => #(105) => int32
f => #(102) => float
s => #(115) => string
b => #(98) => blob
h => #(104) => int64

Package

osc

Source

osc.lisp (file)

Function: decode-timetag TIMETAG

decomposes a timetag into unix-time and a subsecond,. . .

Package

osc

Source

osc.lisp (file)

Function: decode-uint32 S

4 byte -> 32 bit unsigned int

Package

osc

Source

osc.lisp (file)

Function: decode-uint64 S

8 byte -> 64 bit unsigned int

Package

osc

Source

osc.lisp (file)

Function: encode-address ADDRESS
Package

osc

Source

osc.lisp (file)

Function: encode-blob BLOB

encodes a blob from a given vector

Package

osc

Source

osc.lisp (file)

Function: encode-bundle-elt DATA
Package

osc

Source

osc.lisp (file)

Function: encode-data DATA

encodes data in a format suitable for an OSC message

Package

osc

Source

osc.lisp (file)

Function: encode-float32 F

encode an ieee754 float as a 4 byte vector. currently sbcl/cmucl specifc

Package

osc

Source

osc.lisp (file)

Function: encode-int32 I

convert an integer into a sequence of 4 bytes in network byte order.

Package

osc

Source

osc.lisp (file)

Function: encode-int64 I

convert an integer into a sequence of 8 bytes in network byte order.

Package

osc

Source

osc.lisp (file)

Function: encode-string STRING

encodes a string as a vector of character-codes, padded to 4 byte boundary

Package

osc

Source

osc.lisp (file)

Function: encode-timetag UTIME &optional SUBSECONDS

encodes an osc timetag from a universal-time and 32bit ’sub-second’ part. for an ’instantaneous’ timetag use (encode-timetag :now)
for a timetag with the current time use (encode-timetag :time)

Package

osc

Source

osc.lisp (file)

Function: encode-typetags DATA

creates a typetag string suitable for the given data. valid typetags according to the osc spec are ,i ,f ,s and ,b non-std extensions include ,{h|t|d|S|c|r|m|T|F|N|I|[|]} see the spec for more details. ..

NOTE: currently handles the following tags
i => #(105) => int32
f => #(102) => float
s => #(115) => string
b => #(98) => blob
h => #(104) => int64
and considers non int/float/string data to be a blob.

Package

osc

Source

osc.lisp (file)

Function: pad N

make a sequence of the required number of #Nul characters

Package

osc

Source

osc.lisp (file)

Function: padded-length S

returns the length of an osc-string made from a given length of string

Package

osc

Source

osc.lisp (file)

Function: padding-length S

returns the length of padding required for a given length of string

Package

osc

Source

osc.lisp (file)

Function: string-padding STRING

returns the padding required for a given osc string

Package

osc

Source

osc.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   O  
Index Entry  Section

F
File, Lisp, osc.asd: The osc<dot>asd file
File, Lisp, osc/osc.lisp: The osc/osc<dot>lisp file

L
Lisp File, osc.asd: The osc<dot>asd file
Lisp File, osc/osc.lisp: The osc/osc<dot>lisp file

O
osc.asd: The osc<dot>asd file
osc/osc.lisp: The osc/osc<dot>lisp file

Jump to:   F   L   O  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   C   D   E   F   P   S  
Index Entry  Section

C
cat: Internal functions

D
decode-address: Internal functions
decode-blob: Internal functions
decode-bundle: Exported functions
decode-float32: Internal functions
decode-int32: Internal functions
decode-int64: Internal functions
decode-message: Exported functions
decode-string: Internal functions
decode-taged-data: Internal functions
decode-timetag: Internal functions
decode-uint32: Internal functions
decode-uint64: Internal functions

E
encode-address: Internal functions
encode-blob: Internal functions
encode-bundle: Exported functions
encode-bundle-elt: Internal functions
encode-data: Internal functions
encode-float32: Internal functions
encode-int32: Internal functions
encode-int64: Internal functions
encode-message: Exported functions
encode-string: Internal functions
encode-timetag: Internal functions
encode-typetags: Internal functions

F
Function, cat: Internal functions
Function, decode-address: Internal functions
Function, decode-blob: Internal functions
Function, decode-bundle: Exported functions
Function, decode-float32: Internal functions
Function, decode-int32: Internal functions
Function, decode-int64: Internal functions
Function, decode-message: Exported functions
Function, decode-string: Internal functions
Function, decode-taged-data: Internal functions
Function, decode-timetag: Internal functions
Function, decode-uint32: Internal functions
Function, decode-uint64: Internal functions
Function, encode-address: Internal functions
Function, encode-blob: Internal functions
Function, encode-bundle: Exported functions
Function, encode-bundle-elt: Internal functions
Function, encode-data: Internal functions
Function, encode-float32: Internal functions
Function, encode-int32: Internal functions
Function, encode-int64: Internal functions
Function, encode-message: Exported functions
Function, encode-string: Internal functions
Function, encode-timetag: Internal functions
Function, encode-typetags: Internal functions
Function, pad: Internal functions
Function, padded-length: Internal functions
Function, padding-length: Internal functions
Function, string-padding: Internal functions

P
pad: Internal functions
padded-length: Internal functions
padding-length: Internal functions

S
string-padding: Internal functions

Jump to:   C   D   E   F   P   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   +  
C  
Index Entry  Section

+
+unix-epoch+: Internal constants

C
Constant, +unix-epoch+: Internal constants

Jump to:   +  
C  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   O   P   S  
Index Entry  Section

O
osc: The osc system
osc: The osc package

P
Package, osc: The osc package

S
System, osc: The osc system

Jump to:   O   P   S