UnityOSC v1.1 October 2012
Open Sound Control classes
and API interface for Unity 3d
Author: Jorge Garcia Martin
Email: info@jorgegarciamartin.com
1. Introduction
Open Sound Control (OSC) is a protocol for communication among computers, sound
synthesizers, and other multimedia devices that is optimized for modern networking
technology. Bringing the benefits of modern networking technology to the world of
electronic musical instruments, OSC's advantages include interoperability, accuracy,
flexibility, and enhanced organization and documentation [1].
UnityOSC implements the 1.0 specification of the protocol [2] over UDP transport, except
of Bundles time-stamps. This library is released under the MIT license [3].
[1] http://opensoundcontrol.org/introduction-osc
[2] http://opensoundcontrol.org/spec-1_0
[3] http://opensource.org/licenses/mit-license.php
2. Architecture
The UnityOSC namespace comprises the core of the library with the following classes:
OSCBundle, OSCMessage, OSCPacket, OSCClient and OSCServer. They don't include
dependencies with the Unity API, so you can use them apart if you want. Take into account
that they are based on the mono .NET 2.0 implementation.
OSCHandler is a proxy class that serves as tracker of the defined clients and servers. It
includes a declaration of two structs, ServerLog and ClientLog, that act as containers for
user-defined length logs, including date and time for each of the OSC messages. You can
also use them to track incoming/outgoing packets for debugging purposes. At the moment,
allowed data types that can be sent and received are: integer, long, float, double, string
and byte.
Finally, OSCHelper.cs implements an User Interface for the Unity editor. It actually is a
panel with buttons to monitor the logs that are generated from OSCHandler. You should
include this script into the 'Editor' folder of your project. To launch the panel, simply go to
Window -> OSC Helper. You have to enter the play mode in the editor to see the running
servers and clients in the panel.
评论0
最新资源