Audio::OSC - OpenSound Control client and server implementation


NAME

Audio::OSC - OpenSound Control client and server implementation


SYNOPSIS

  use Audio::OSC;

  # see below


DESCRIPTION

    OpenSound Control ("OSC") is a protocol for communication among computers,
    sound synthesizers, and other multimedia devices that is optimized for
    modern networking technology.
    L<http://www.cnmat.berkeley.edu/OpenSoundControl/>;

This suite of modules provides an implementation of the protocol in Perl, according to version 1.0 (March 26, 2002) of the specification.

To actually create an OSC client or server, take a look at the Audio::OSC::Client manpage and the Audio::OSC::Server manpage. This module only provides several helper functions. Normally, there shouldn't be a need for you to use this module directly.

This is an alpha-quality release. Data structures and interfaces are subject to change.


DATA FORMAT

OSC data is represented in a form closely related to the original binary format.

MESSAGES

A message is an array reference containing an OSC address followed by zero or more pairs of type identifiers and data. Examples:

    ['/Fader', f, 0.2]
    ['/Synth/XY', i, 10, i, 200]

BUNDLES

A bundle is an array reference that contains the bundle identifier #bundle and a timestamp, followed by zero or more messages. Examples:

    ['#bundle', 0.1, ['/Pitch', 'f', rand(1)]
    ['#bundle', 0.1, ['/Slider', 'f', $s],
                     ['/Synth/XY', 'i', $x, 'i', $y]


FUNCTIONS

protocol()
Returns information about the version of the OSC protocol implemented. Currently OSC/1.0.

types()
Returns information about the data types implemented. Currently bfis (blobs, floats, ints and strings).

decode($data)
Decodes binary OSC message or bundle data into a Perl data structure

encode($data)
Encodes OSC messages or bundles into their binary representation

toInt($n)
Returns the binary representation of an integer in OSC format

toFloat($n)
Returns the binary representation of a floating point value in OSC format

toString($str)
Returns the binary representation of a string in OSC format

toBlob($d)
Returns the binary representation of a BLOB value in OSC format


BUGS

Doesn't work with Unicode data. Remember to use bytes if you use Unicode Strings.

Time tags are currently not encoded.


SEE ALSO

The OpenSoundControl website at http://www.cnmat.berkeley.edu/OpenSoundControl/

the Audio::OSC::Client manpage

the Audio::OSC::Server manpage


AUTHOR

Christian Renz, <crenz@web42.com>


COPYRIGHT AND LICENSE

Copyright 2004 by Christian Renz <crenz@web42.com>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

 Audio::OSC - OpenSound Control client and server implementation