Chapter 1
General format

An OSC message is made of an OSC address, followed by a message string, followed by zero to n parameters. The message string could be viewed as the method name of the object identified by the OSC address. The OSC address could be string or a regular expression matching several objects.

OSCMessage PICT

EXAMPLE

/ITL/scene/score x 0.5;

sends the message x to the object which address is /ITL/scene/score with 0.5 as parameter.

The address is similar to a Unix path and supports regular expressions as defined by the OSC specification (see at http://opensoundcontrol.org/). This address scheme is extended to address any host and applications (see section 16 p.157). Relative addresses have also been introduced for the scripting language (see section 17.2 p.175)

NOTE A valid legal OSC address always starts with /ITL that is the application address and that is also used as a discriminant for incoming messages.

OSCAddress PICT

Identifiers may include letters, hyphen, underscore and numbers apart at first position (see lexical definition section 21.2 p.229).

identifier PICT

Some specific nodes (like signals - see section 14.1.1) accept OSC messages without message string:

OSCMessage PICT

1.1 Parameters

Message parameters types are the OSC types int32, float32 and OSC-string. In the remainder of this document, they are used as terminal symbols, denoted by int32, float32 and string.

When used in a script file (see section 17), string should be single or double quoted when they include characters not allowed in identifiers (space, punctuation marks, etc.). If an ambiguous double or single quote is part of the string, it must be escaped using a ’\’.

Parameters types policy is relaxed: the system makes its best to convert a parameter to the expected type, which depend on the message string. With an incorrect type and when no conversion is applied, an incorrect parameter message is issued.

1.2 Address space

The OSC address space is made of static and dynamic nodes, hierarchically organized as in figure 1.1:


PIC

Figure 1.1: The OSC address space. Nodes in italic/blue are dynamic nodes.


OSC messages are accepted at any level of the hierarchy:

NOTE Since version 1.05, each component of a score may also be a container and thus, the hierarchy described above has a potential infinite depth level. Note also that a sync node is present at each level.

1.3 Aliases

An alias mechanism allows an arbitrary OSC address to be used in place of a real address. An alias message is provided to describe aliases:

alias PICT

EXAMPLE

/ITL/scene/myobject alias ’/1/fader1’;

  makes the object myobject addressable using the address /1/fader1.

NOTE Regular expressions are not supported by the alias mechanism and could lead to unpredictable results.