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

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 interaction). Relative addresses have also been introduced for the scripting language (see section scriptmsgs)

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

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

identifier

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

SigOSCMessage

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 scripting), 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.

Address space

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

fig:addrspace
The OSC address space. Nodes in italic/blue are dynamic nodes.

OSC messages are accepted at any level of the hierarchy:

Each component includes a static node named debug that provides debugging information. - the signals level contains signals i.e. objects that accept data streams and that may be graphically rendered as a scene component (see Signals and Graphic signals section graphsig).

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.

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

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

Example

# makes the address /ITL/scene/myobject available using /1/fader1
/ITL/scene/myobject alias '/1/fader1';

# the following input message:
/1/fader1 0.5;
# will be translated into:
/ITL/scene/myobject 0.5;
# create an alias with an implicit 'x' message
/ITL/scene/myobject alias '/1/fader1' x;

# the following input message:
/1/fader1 0.5;
# will be translated into:
/ITL/scene/myobject x 0.5;

Scaling

In INScore, the parameter values are generally in the range [-1, 1]. However, some devices can generate messages with their own values range (e. g. accelerometers). An optional scaling string allows to convert any input range into the [-1, 1] range.

The general form of the scaling string is [n,m], where and are 2 numbers describing the minimum and maximum input values. Any input value is then transformed into a value such that:

Example

# create an alias with an implicit 'x' message using a scaling specification
/ITL/scene/myobject alias '/1/fader1' x[0,100];

# the following input message:
/1/fader1 5;
# will be translated into:
/ITL/scene/myobject x -0.9;

Using more than one implicit message

You can you any arbitrary number of message strings in an alias message. In any case, an input message with the corresponding values is expected. For example, when the alias message has 3 messages strings, input messages are expected to have 3 associated values. These values are distributed in sequence with each message string, which also means that the input message is translated into 3 different messages.

Example

# create an alias with implicit 'x' 'y' and 'angle' messages using scaling
/ITL/scene/myobject alias '/1/fader1' x[0,100] y[0,100] angle;

# the following input message:
/1/fader1 5 60 12;
# will be translated into:
/ITL/scene/myobject x -0.9;
/ITL/scene/myobject y  0.2;
/ITL/scene/myobject angle 12;