OpenSoundControl.org: /pages /contents /spec/1.0 /spec/1.1 /implementations /publications /about
(contents of this file: links to each section)
version 1.0, March 29 2002, Matt Wright
This document provides examples to support the OpenSound Control 1.0 Specification.
The string “OSC” is represented as an OSC-string with these four bytes:
O | S | C | \0 |
The string “data” is represented as an OSC-string with these eight bytes:
d | a | t | a | \0 | \0 | \0 | \0 |
Argument types | OSC Type Tag String |
One float32 argument | “,f” |
Two int32 arguments followed by one OSC-string argument followed by three float32 arguments | “,iisfff” |
No arguments | “,” |
An int32 argument followed by two OSC-blob arguments | “,ibb” |
Suppose a particular OSC Address Space includes an OSC Method with the name “frequency”. This method is contained in an OSC Container with the name “3”, which is contained in another OSC container named “resonators”, which is contained in the OSC container that is the root of the address space tree. The method’s OSC Address is “/resonators/3/frequency”.
The OSC Address “/a/b/c/d/e” means that:
There are three parts of the OSC Address “/a/b/cde”: “a”, “b”, and “cde”. Note that the last part is the name of the OSC Method and the other parts are the names of the OSC Containers that (recursively) contain the method.
There are three parts of the OSC Address pattern “/?/b/*c”: “?”, “b”, and “*c”.
In each of these examples, each byte of a message is printed first in hexadecimal, followed by the corresponding ASCII character in parentheses.
The OSC Message with the OSC Address Pattern “/oscillator/4/frequency” and the floating point number 440.0 as the single argument would be represented by the following 32-byte message:
2f (/) 6f (o) 73 (s) 63 (c)
69 (i) 6c (l) 6c (l) 61 (a)
74 (t) 6f (o) 72 (r) 2f (/)
34 (4) 2f (/) 66 (f) 72 (r)
65 (e) 71 (q) 75 (u) 65 (e)
6e (n) 63 (c) 79 (y) 0 ()
2c (,) 66 (f) 0 () 0 ()
43 (C) dc (Ü) 0 () 0 ()
The next example shows the 40 bytes in the representation of the OSC Message with OSC Address Pattern “/foo” and 5 arguments:
2f (/) 66 (f) 6f (o) 6f (o)
0 () 0 () 0 () 0 ()
2c (,) 69 (i) 69 (i) 73 (s)
66 (f) 66 (f) 0 () 0 ()
0 () 0 () 3 () e8 (è)
ff (ÿ) ff (ÿ) ff (ÿ) ff (ÿ)
68 (h) 65 (e) 6c (l) 6c (l)
6f (o) 0 () 0 () 0 ()
3f (?) 9d () f3 (ó) b6 (¶)
40 (@) b5 (µ) b2 (”) 2d (-)
Suppose an OSC Servers’ OSC Address Space includes methods with the following OSC Addresses:
Suppose an OSC Bundle is received that contains three OSC Messages, and that the three OSC Messages have these OSC Address Patterns:
Six methods will be invoked in this order:
(2-3) Either /second/1 followed /second/2 or /second/2 followed by /second/1; then
(3-6) /third/a, /third/b, and /third/c, in any order.
There are twelve possible orders in which an OSC server may invoke these six methods:
This page of OpenSoundControl website updated Wed Apr 7 15:47:11 PDT 2021 by matt (license: CC BY).