A scene may be viewed as a window on the score elements. Its address is /ITL/sceneIdentifier where sceneIdentifier is the scene name.
The following messages are available at scene level, to control the scene appearance and behaviour:
- new: creates a new scene and opens it in a new window.
- del: deletes a scene and closes the corresponding window.
- reset: clears the scene (i.e. delete all components) and resets the scene to its default state (position, size and color).
- foreground: display scene window in foreground of all other windows in the system windows manager.
- rootPath: rootPath of a scene is the default path where the scene reads or writes a file when a relative path is used for this file. When no value has been specified, the application rootPath is used. Calling rootPath without argument clears the scene rootPath.
- preprocess: evaluates the input file script and print the result to the log window.
load: loads an INScore file to the scene. Note that the OSC addresses are translated to the scene OSC address.
fullscreen: requests the scene to switch to full screen or normal screen. The parameter is interpreted as a boolean value. Default value is 0.
- frameless: requests the scene to switch to frameless or normal window. The parameter is interpreted as a boolean value. Default value is 0.
- absolutexy: requests the scene to absolute or relative coordinates. Absolute coordinates are in pixels relative to the top left corner of the screen. Relative coordinates are in the range [-1, 1] where [0,0] is the center of the screen. The message parameter is interpreted as a boolean value. Default value is 0.
- windowOpacity: switch the scene window to opaque or transparent mode. When in transparent mode, the scene alpha channel controls the window opacity (from completely opaque to completely transparent). In opaque mode, the scene alpha channel controls the background brush only. Default value is 0 (transparent).
- commonMsg: a scene support the common graphic attributes. See section common.
- forwardingMsg: a scene support message forwading and filtering. See section forwarding.
Example Setting a scene current path:
/ITL/scene rootPath "/path/to/my/folder";
Loading an INScore file:
/ITL/scene load "myscript.inscore";
will load /path/to/my/folder/myscript.inscore into the scene.
Setting a scene to fullscreen:
/ITL/scene fullscreen 1;
Creating a new score named myScore:
- opengl: requests the scene to switch to OpenGl or normal rendering. The parameter is interpreted as a boolean value. Default value is 0.
Note: OpenGl rendering improves significantly the performance of graphic operations but at the cost of dirty rendering for text and scores.
A scene may respond to queries regarding its elements:
- count: count the number of elements in the scene.
- rcount: recursively count the number of elements in the scene.
Example Counting the elements in a scene:
/ITL/scene get count; will give a message like the following as output: /ITL/scene count 200;