The osc Reference Manual

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

The osc Reference Manual

This is the osc Reference Manual, version 0.5, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 05:31:13 2022 GMT+0.

Table of Contents


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


2 Systems

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


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

2.1 osc

The Open Sound Control protocol, aka OSC

Author

nik gaffney <nik@fo.am>

License

LLGPL

Version

0.5

Source

osc.asd.

Child Component

osc.lisp (file).


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   [Contents][Index]

3.1.1 osc/osc.asd

Source

osc.asd.

Parent Component

osc (system).

ASDF Systems

osc.


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

3.1.2 osc/osc.lisp

Source

osc.asd.

Parent Component

osc (system).

Packages

osc.

Public Interface
Internals

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.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

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


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

5.1 Public Interface


5.1.1 Ordinary 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.

Function: decode-message (message)

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

Package

osc.

Source

osc.lisp.

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.

Function: encode-message (address &rest data)

encodes an osc message with the given address and data.

Package

osc.

Source

osc.lisp.


5.2 Internals


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

5.2.1 Constants

Constant: +unix-epoch+
Package

osc.

Source

osc.lisp.


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

5.2.2 Macros

Macro: defint-decoder (num-of-octets &optional docstring)
Package

osc.

Source

osc.lisp.

Macro: defint-encoder (num-of-octets &optional docstring)
Package

osc.

Source

osc.lisp.


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

5.2.3 Ordinary functions

Function: cat (&rest catatac)
Package

osc.

Source

osc.lisp.

Function: decode-address (address)
Package

osc.

Source

osc.lisp.

Function: decode-blob (blob)

decode a blob as a vector of unsigned bytes.

Package

osc.

Source

osc.lisp.

Function: decode-float32 (s)

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

Package

osc.

Source

osc.lisp.

Function: decode-int32 (s)

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

Package

osc.

Source

osc.lisp.

Function: decode-int64 (s)

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

Package

osc.

Source

osc.lisp.

Function: decode-string (data)

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

Package

osc.

Source

osc.lisp.

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.

Function: decode-timetag (timetag)

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

Package

osc.

Source

osc.lisp.

Function: decode-uint32 (g0)

4 byte -> 32 bit unsigned int

Package

osc.

Source

osc.lisp.

Function: decode-uint64 (g0)

8 byte -> 64 bit unsigned int

Package

osc.

Source

osc.lisp.

Function: encode-address (address)
Package

osc.

Source

osc.lisp.

Function: encode-blob (blob)

encodes a blob from a given vector

Package

osc.

Source

osc.lisp.

Function: encode-bundle-elt (data)
Package

osc.

Source

osc.lisp.

Function: encode-data (data)

encodes data in a format suitable for an OSC message

Package

osc.

Source

osc.lisp.

Function: encode-float32 (f)

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

Package

osc.

Source

osc.lisp.

Function: encode-int32 (g1)

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

Package

osc.

Source

osc.lisp.

Function: encode-int64 (g1)

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

Package

osc.

Source

osc.lisp.

Function: encode-string (string)

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

Package

osc.

Source

osc.lisp.

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.

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.

Function: pad (n)

make a sequence of the required number of #Nul characters

Package

osc.

Source

osc.lisp.

Function: padded-length (s)

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

Package

osc.

Source

osc.lisp.

Function: padding-length (s)

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

Package

osc.

Source

osc.lisp.

Function: string-padding (string)

returns the padding required for a given osc string

Package

osc.

Source

osc.lisp.


Appendix A Indexes


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

A.1 Concepts


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

A.2 Functions

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

C
cat: Private ordinary functions

D
decode-address: Private ordinary functions
decode-blob: Private ordinary functions
decode-bundle: Public ordinary functions
decode-float32: Private ordinary functions
decode-int32: Private ordinary functions
decode-int64: Private ordinary functions
decode-message: Public ordinary functions
decode-string: Private ordinary functions
decode-taged-data: Private ordinary functions
decode-timetag: Private ordinary functions
decode-uint32: Private ordinary functions
decode-uint64: Private ordinary functions
defint-decoder: Private macros
defint-encoder: Private macros

E
encode-address: Private ordinary functions
encode-blob: Private ordinary functions
encode-bundle: Public ordinary functions
encode-bundle-elt: Private ordinary functions
encode-data: Private ordinary functions
encode-float32: Private ordinary functions
encode-int32: Private ordinary functions
encode-int64: Private ordinary functions
encode-message: Public ordinary functions
encode-string: Private ordinary functions
encode-timetag: Private ordinary functions
encode-typetags: Private ordinary functions

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

M
Macro, defint-decoder: Private macros
Macro, defint-encoder: Private macros

P
pad: Private ordinary functions
padded-length: Private ordinary functions
padding-length: Private ordinary functions

S
string-padding: Private ordinary functions

Jump to:   C   D   E   F   M   P   S  

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

A.3 Variables

Jump to:   +  
C  
Index Entry  Section

+
+unix-epoch+: Private constants

C
Constant, +unix-epoch+: Private constants

Jump to:   +  
C