Common messages

Common messages are intended to control the graphic and the time space of the components of a scene. They could be sent to any address with the form /ITL/scene or /ITL/scene/\textit{identifier} where identifier is the unique identifier of a scene component.

commonMsg

Example Export of a scene to a given file as jpeg at the current root path:

/ITL/scene export 'myexport.jpg';

Saving a scene to myScore.inscore at the current root path, the second form saves only the x, y and z attributes, the third form uses the append mode:

/ITL/scene save 'myScore.inscore';
/ITL/scene save x y z 'thePositions.inscore'; 
/ITL/scene save 'myScore.inscore' '+';

Hiding an object:

/ITL/scene/myObject show 0;

Positioning

PositionMsg

Graphic position messages are absolute position or relative position messages. They can also control an object origin and transformations like rotation around an axis.

Absolute positioning

absPosMsg

Example Moving and scaling an object:

/ITL/scene/myObject x -0.9; 
/ITL/scene/myObject y 0.9; 
/ITL/scene/myObject scale 2.0;

Relative positioning

relPosMsg

Example Relative displacement of an object:

/ITL/scene/myObject dx 0.1;

Components origin

The origin of a component is the point (xo, yo) such that the (x, y) coordinates and the (xo, yo) point coincide graphically. For example, when the origin is the top left corner, the component top left corner is drawn at the (x, y) coordinates.

originMsg

Example Setting an object graphic origin to the top left corner.

/ITL/scene/myObject xorigin -1. ;
/ITL/scene/myObject yorigin -1. ;

Components transformations

A component tranformation specifies 2D transformations of its coordinate system. It includes shear and object rotation on x, y and z axis.

transformMsg

Example Rotating an object graphic on the z axis.

/ITL/scene/myObject rotatez 90. ;

Note: angle and rotatez are equivalent. angle has been introduced before the transformation messages and is maintained for compatibility reasons.

Color messages

ColorMsg

Color messages are absolute or relative color control messages. Color may be expressed in RGBA or HSBA.

Absolute color messages

absColorMsg

red, green, blue, hue, saturation, brightness, alpha messages address a specific part of a color using the RGB or HSB scheme.

colorvalue

The value may be specified as integer or float. The data range is given in table colorrange. When the alpha component is not specified, the color is assumed to be opaque.

Component integer range float range
red [R] [0,255] [-1,1]
green [G] [0,255] [-1,1]
blue [B] [0,255] [-1,1]
alpha [A] [0,255] [-1,1]
hue [H] [0,360] [-1,1] mapped to [-180,180]
saturation [S] [0,100] [-1,1]
brightness [B] [0,100] [-1,1]

Color components data ranges when expressed as integer or float.

Example The same alpha channel specified as integer value or as floating point value:

/ITL/scene/myObject alpha 51 ;
/ITL/scene/myObject alpha 0.2 ;

The color messages

color

color sets an object color in the RGBA space. The color can be specified in different ways:

The default color value is [0,0,0,255].

The hsb messages

hsb

hsb sets an object color in the HSBA space. When A is not specified, the color is assumed to be opaque.

Relative color messages

relColorMsg

Example Moving a color in the RGBA space:

TL/scene/myObject dcolor 10 5 0 -10 ,

will increase the red component by 10, the blue component by 5, and decrease the transparency by 10.

Note: Objects that are carrying color information (images, SVG) don't respond to color change but are sensitive to transparency changes.

Pen control

Pen messages accepted by all the components and result in 2 different behaviors:

penMsg

penstyle

The pen style default value is solid.

Example Setting a rectangle border width and color:

/ITL/scene/rect set rect 0.5 0.5 ;
/ITL/scene/rect penWidth 2. ;
/ITL/scene/rect penColor 255 0 0 ;  

The 'effect' messages

The effect message sets a graphic effect on the target object.

effectMsg

Note: An effect affects the target object but also all the target slaves.

The blur effect

blurParams

Blur parameters are the blur radius and a rendering hint. The radius is an int32 value. By default, it is 5 pixels. The radius is given in device coordinates, meaning it is unaffected by scale.

blurHint

Use the performance hint to say that you want a faster blur, the quality hint to say that you prefer a higher quality blur, or the animation when you want to animate the blur radius. The default hint value is performance.

Example Setting a 8 pixels effect on myObject

/ITL/scene/myObject effect blur 8;

The colorize effect

colorizeParams

Colorize parameters are a strength and a tint color. The strength is a float value. By default, it is 1.0. A strength 0.0 equals to no effect, while 1.0 means full colorization. The color is given as a RGB triplet (see section colormsg) by default, the color value is light blue (0, 0, 192).

Example Setting a red colorize effect on myObject with a 0.5 strength.

/ITL/scene/myObject effect colorize 0.5 200 0 0;

The shadow effect

shadowParams

xoffset and yoffset are the shadow offset and should be given as int32 values. The default value is 8 pixels. The offset is given in device coordinates, which means it is unaffected by scale. The color is given as a RGBA color (see section colormsg) by default, the color value is a semi-transparent dark gray (63, 63, 63, 180) The blur radius should be given as an int32 value. By default, the blur radius is 1 pixel.

Example Setting a shadow effect on myObject. The shadow offset is (10,10) pixels, the color is a transparent grey (100,100,100, 50) and the blur is 8 pixels.

/ITL/scene/myObject effect shadow 10 10 100 100 100 50 8;

The 'edit' message

The edit message opens a small editor that allows to edit the target object attributes.

editMsg

Each object maintains the current content of the editor, that is initialized at first edit message or when this content is cleared. Successive call to edit will preserve the editor content unless it is cleared.

Note: Since the editor preserves its content, it doesn't take account of changes that may result from received messages and thus may not reflect the target object changes. To synchronize the editor content with the current attributes values, you can clear the editor content, which will refresh the attributes to their current values.

Note: Although initialized with the target object attributes, the editor supports arbitrary INScore messages, i.e. addressed to any other object or even making use of extended OSC addresses.

Example Editing an object on double click:

/ITL/scene/myObject watch doubleClick (/ITL/scene/myObject edit);

Editing some specific attributes:

/ITL/scene/myObject watch doubleClick (/ITL/scene/myObject edit x y);