OpenMusic 6 – User Manual

The Store Object

The store object is a general-purpose object , which is designed to store any type of data. For instance, one may want to be able to design one or more programs and use the same object everywhere without defining it from the beginning.

The icon of a store object represents a memory space.

  1. A store object can be manipulated in a patch just like any other type of object, via factory, instance or slot boxes .

  2. When a global variable1 is created in the Globals package , it is a store object, by default. Consequently, any type of object can be stored into it.

The Store Factory Box

To add a store factory box :

  • select Classes / OMKernel / Data / Store
  • type "store" directly in the patch editor.

The store factory box allows to create any type of variable from any type of object in a patch.

It has two inputs and outputs :

  • "self" : any object
  • "value" : any data, including instances of other classes.

The Store Default Global Variable

By default, a global variable created in the Globals package is an instance of the Store class.

Reminder : Creating a Global Variable

To create a global variable from the Store class :

    1. Open the Globals package window

    2. double click on the upper part of the suitcase icon or Ctrl / right click and choose Open.

  • Select File / New Variable.

Setting the Value of a Store Object

With a Store Factory Box
  1. Connect the "self" output of an object to the "value" input of a store factory box.

  2. Evaluate the store box.

Using a Slots Box and a Store Global Variable
The value of the variable is now a chord.
The value of the variable is now a chord.
  1. Add a store global variable .

  2. Add a store slots box : Cmd click, type "store" and press SHIFT while validating.

  3. Connect the "self" output of the store variable to the "self" input of the store slots box .

  4. Connect any type of box to the "value" input of the store slots box.

  5. Evaluate slots.

Editing a Store Global Variable With the Store Editor

This variable can then  be edited, from the Globals window, or from a patch editor.

Double click on the icon of a store object to open its editor.

  • If the value of the store object hasn't been set as described above, the editor displays the following icon : , which means "nil". It cannot be modified from the editor. The user must resort to the previous procedures to assign a value to this variable.

  • If the value of the store object has already been set, it can be modified :

    1. double click on the value icon to edit it

    2. validate.

Note that the editor is similar to the editor of the corresponding class.

If the store object is a global variable, the corresponding variable in the Globals package and all of its representations will be affected by possible modifications.

Reminder : Renaming Variables

Remember that global variables can be renamed from the Globals package of the Library window, and only from this location.

  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.

  • The Store Object
About...(c) Ircam - Centre PompidouMade with Scenari