OpenMusic 6 – User Manual

Creation, Import, Export

Creating an Instance Box

An instance can be materialized out of any output of a factory box, provided this output can return an instance or a list. Creating an instance box is especially significant when done from the "self" outlet of a factory box, which returns the object itself .

There are two types of instance boxes :

  • class instances, which are created from objects,
  • list instances, which are created from lists.
Procedure

To create an instance box, SHIFT + Cmd click on an output.

The corresponding object will appear in the patch editor.

The resulting box represents a specific object that cannot be reinitialized, but can be used and evaluated again in a patch.

This is why this box shows only one "self" outlet.

The name of the instance box can – and should – be edited.

Note

Specific procedures allow to modify instance boxes.

How to Modify Instance Boxes
List Instances

An instance derived from a list returns its content when evaluated.

A list can be used for creating an instance box.
A list can be used for creating an instance box.

Just like any list, it can be connected to other boxes to be manipulated, or to create new objects.

Exporting and Importing an Instance Box

Instance boxes can be exported out of a factory box via the contextual menu. Ctrl / right click on a factory box and choose Export.

To import an instance :

  • Ctrl / right click on a factory box and choose Import in the contextual menu
  • drag and drop an instance file in a patch editor. The instance is materialized as an instance box.

Instances can be imported from any location in the user's hard drive.

Instances and Global Variables

Instances are a means to save an object within a patch, where it can possibly be used as a source of data.

Instances can also be used in other patches :

  • they can be copied
  • they can saved as global variables1, which is much more convenient and coherent from the view of OM.
For Full Information about Global Variables, See :
  1. Global variable

    An instance of OM object that has been saved in order to be used in other programs. Global variables are visible from the Library window and stored as .omi files in the Globals folder of the workspace.

About...(c) Ircam - Centre PompidouMade with Scenari