80 likes | 300 Vues
EI Toolkit. OSC Protocol - Quick Introduction Matthias Kranz matthias<at>hcilab<dot>org. 15.08.2005. Research Group Embedded Interaction www.hcilab.org. Open Sound Control (OSC).
E N D
EI Toolkit OSC Protocol - Quick Introduction Matthias Kranz matthias<at>hcilab<dot>org 15.08.2005 Research Group Embedded Interaction www.hcilab.org
Open Sound Control (OSC) • “OpenSound Control (OSC) is an open, transport-independent, message-based protocol developed for communication among computers, sound synthesizers, and other multimedia devices.” (from OSC specification, http://www.cnmat.berkeley.edu/OpenSoundControl/ )
Open Sound Control (OSC) Features • Open-ended, dynamic,plain-text, URL-style symbolic naming scheme • Numeric and symbolic arguments to messages • Pattern matching language (regular expressions) to specify multiple targets of a single message • High resolution time tags (via synchronized time) • ‘Bundles’ of messages whose effects must occur simultaneously • Query system to dynamically find out the capabilities of an OSC server and get documentation
OSC Atomic Data Types • int32 (big endian) • float32 (big endian) • OSC blob • OSC string • OSC timetag (big endian)
OSC Messages OSC Message OSC Address OSC Type Tag OSC Arguments OSC String, address parts separated by ‘/’, starting with ‘/’ OSC String, one character for each data type that is in the argument part of the message, starting with ‘,’ 0 to n arguments, in their binary representation, length with respect to its type e.g. /muc/particles/ 2.229.0.0.0.182.249/ setText/ binary form of “hello world”3 (big endian for float32, int32 and timetag) ,si (will send “hello world” to the named particle and display the text in row 3)
OSC Bundles OSC Bundle OSC String OSC TimeTag OSC Bundle Elem. #bundle 64 bit Size Contents int32 OSC Message OSC Bundle
Hierarchical Address Space / lancs/ muc/ locationX/ pinandplay/ smart-its/ particles/ technology1/ technologyN/ ip-address:port/ method1 methodN
OSC Example Message /muc/particle/2.229.0.0.0.182.249/setText, si,/location/id_of_sender\00b010101010101010 (hierarchical address as OSC String, null terminated, number of bits is multiple of 32, filled with \0, then the OSC data types in the message, also as null-terminated OSC String, number of bits is multiple of 32, followed by the data in binary form, big endian encoding for int32, float32 and timetag) The first string in the message (required!) is the ID (as string) of the sender. (EIToolkit specific extension).